Forum Discussion
Marvin
Nov 20, 2014Cirrocumulus
Also I used the following scripts to automate backup using SFTP and the sent an email if the upload failes. The local created backup files are automatically on the Big IP to save disk space.
!/bin/bashDATE=
date "+%m_%d_%y"
Here we create the ucs archive and append the date
tmsh save sys ucs bigip.backup.$DATE
upload SFTP to SFTP_servercd /var/local/ucs/ sftp backupuser@SFTP_server <
check if the upload has succeeded or failed. If failed mail error messageif [ $? -eq 0 ] then sleep 5 rm /var/local/ucs/bigip.backup.$DATE.ucs else ftp session failed mail -s "ftp backup file failed from BigIP" mail@mail.com < /dev/null fi