Forum Discussion
- Kevin_Davies_40Nacreous
!/bin/bash host=`echo $HOSTNAME | awk -F. '{ print $1 }'` date=`date +%Y%m%d` /usr/bin/tmsh save /sys ucs backup_${host}_${date}.ucs /usr/bin/find /var/local/ucs -name backup_${host}_\*.ucs -mtime +30 -exec rm {} \;
Save the above to a new file called /config/mybackup and add the following line to /config/startup.
[ ! -L /etc/cron.daily/mybackup ] && ln -s /config/mybackup /etc/cron.daily/mybackup
Now run the following commands to complete the configuration.
chmod +x /config/mybackup ln -s /config/mybackup /etc/cron.daily/mybackup
- Kevin_Davies_40NacreousThe mybackup script should carry over to an upgraded config and be stored in a UCS archive. If for any reason the symbolic link goes away the command in /config/startup will recreate it. The find will remove any backups older than thirty days. Just check the backup size as 30 of them may take up too much space.
- Viv_RichardsCirrostratus
Dear Kevin,
I am trying to configure automated backup by following above script. Could you please confirm where backup will be stored in this case ? /etc/cron.daily/mybackup is not directory
Thanks
- Samir_Jha_52506Noctilucent
Find the below details
mybackup --> Script file Name & it store inside /config/ Directory /var/local/ucs --> backup file will be store
- ogozar_275571Nimbostratus
Hello,
Hello, when I generate an automatic backup it shows me this error when I execute the script:
Error, invalid characters in UCS file name. The dash, period, forward-slash, plus sign, and underscore are the only special characters allowed.
What is the problem?
Thank's
- Nik_108945Nimbostratus
here's a python script i wrote that will create a text backup or download a ucs. i use the text backup to submit to git in order to track changes, and the ucs backup run via cron once a day for a ucs backup. run the script and it will print usage for you.
https://github.com/nambrosch/misc-scripts/blob/master/f5backup.py
you'll need f5's bigsuds module v1.0.4 or newer.. it can be installed using
or downloads here:sudo pip install bigsuds
https://github.com/F5Networks/bigsuds
hope this helps!
- Cyril_MAltostratus
There is an extra feature you can add to your daily backup, it's committing your bigip.conf to a GIT or a SVN so you can keep track of the changes that have been done, with your favorite repo browser (sourceTree for instance :)