Forum Discussion

Srinath_K_S's avatar
Srinath_K_S
Icon for Altostratus rankAltostratus
Mar 01, 2019

Backup using External Monitor

Hi,

We are trying to automate the backup using external monitor.Tried using the below script.Looks like monitor is marking the pool as UP but the content(UCS)is not getting copied over to the destination. Please suggest.

!/bin/bash IP=

echo ${1} | sed 's/::ffff://'
PORT=${2} PIDFILE="/var/run/
basename ${0}
.${IP}_${PORT}.pid" if [ -f $PIDFILE ] then kill -9
cat $PIDFILE
> /dev/null 2>&1 fi echo "$$" > $PIDFILE tmsh save sys ucs today && scp /var/local/ucs/today.ucs user@${IP}:/var/tmp/backups/ && ssh user@${IP} ls /var/tmp/backups |grep "today" 2>&1 > /dev/null if [ $? -eq 0 ] then echo "UP" fi rm -f $PIDFILE exit