Forum Discussion
Afroz_Ahmad_114
Nimbostratus
Apr 01, 2014F5 Ltm Backup Script
Hello Experts,
Reference:- https://devcentral.f5.com/wiki/AdvDesignConfig.LTM_Backup_Shell_Script.ashx
I have taken reference from above URL and modified and have used below script to take backup o...
Brad_Parker
Cirrus
Oct 22, 2015This is how I've done it via SFTP and key authentication. You need to first create a dsa key to use for authentication to your SCP/SFTP server. Then put the script in a file named /config/backup and create a chron job using this,
chmod +x /config/backup; ln -s /config/backup /etc/cron.daily/backup
!/bin/bash
Set variables for UCS file name
dt=`date +%Y%m%d`
hostname=`uname -n |cut -d. -f1`
DDIR=/var/tmp
SFTPhost=
Delete old ucs file created by this script
rm $DDIR/$hostname*.ucs
Send syslog message to log servers
logger -p local0.info -t BIGIP configuration backup started.
Commit configuration from memory to files
cd /config
tmsh save /sys config
Create configuraiton archive
tmsh save /sys ucs $DDIR/$hostname-$dt.ucs
Send to admin server via SFTP
cd $DDIR
sftp -oIdentityFile=/config/sftp_dsa $hostname@$SFTPhost<< EOF
cd $hostname
put $hostname-$dt.ucs
quit
EOF
Send syslog message to log servers
logger -p local0.info -t BIGIP configuration backup completed.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects