Forum Discussion
Srinath_K_S
Mar 01, 2019Altostratus
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 remove IPv6/IPv4 compatibility prefix (LTM passes addresses in IPv6 format)IP=
echo ${1} | sed 's/::ffff://'
PORT=${2}
PIDFILE="/var/run/basename ${0}
.${IP}_${PORT}.pid"
kill of the last instance of this monitor if hung and log current 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
mark node UP if expected response was received
if [ $? -eq 0 ] then echo "UP" fi rm -f $PIDFILE exit