Forum Discussion
- samstepCirrocumulusYou might be interested in evaluating AutoBackup for F5 software created by Integralis. It allows you to perform centralized Automated Scheduled backups of multiple F5 devices. It does not require you to install any scripts/cron jobs on the F5 device.
- jelmore_42505NimbostratusI have question similar to this one. I have been backing up my LTM using bigpipe save for over a year now and it worked great. We just started using GTM on the same box but when I open up the config-archive file with winrar I notice the /gtm directory is empty. I have also tried to use bigpipe export into a scf but the GTM configuration does not transfer there either. Am I missing something?
- samstepCirrocumulusIf your box is licensed for GTM and you do a bigpipe save all your configuration including GTM is safely backed up inside the UCS file.
- jelmore_42505NimbostratusThanks, I checked that out and I guess it is pulling the wideip.conf from var\tmp\gtm_tmp\gtm\wideip.conf.
- charlestips_149NimbostratusCan someone help me with my script which ftps the backup? It will connect via FTP but will not put the file correctly, when I remote the put entry in the script it connects and disconnects as it should.
- jelmore_42505NimbostratusThis is what I did to automate my backup. I am sure there are better ways but I was going for quick and simple.
- swo0sh_gt_13163Altostratus
Hello Folks,
It seems I need the same solution but for version 11.2.1, where I need to save the backup file locally to the F5, rather than the external server.
I have tried using following script, somehow the script doesn't seems to be working. I am pretty sure I am making mistake somewhere. Can you please help?
[root@F5] / cat > /etc/cron.daily/abc
00 9 * * * tmsh save /sys ucs /var/local/ucs/F5_INT_1.test.gov.uk.ucs
Ctrl+C 3. [root@F5] / chmod +x /etc/cron.daily/abc
Thanks, Darshan
- mdicarlo_60024NimbostratusBelow is a script that should work. If you typed the above text into your /etc/cron.daily/abc exactly as listed above, you mixed a cron command and a shell script (with the !/bin/sh part). The cron stuff is the scheduling info. The script is what gets run. You could try running "crontab -l" to verify what is listed. Our crontab looks like this and captures output in the event of any problems or errors. Use "crontab -e" and add a simliar line to your crontab. 30 00 * * * /path/to/script/config_save.bash >> /path/to/scriptlog/config_save.log 2>&1 Then create your backup script - something like this. SCRIPT for config_save.bash IS BELOW Set variables for UCS file name dt=`date +%Y%m%d` hostname=`uname -n |cut -d. -f1` Delete old ucs file created by this script rm /var/tmp/$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 /var/tmp/$hostname-$dt.ucs Send syslog message to log servers logger -p local0.info -t BIGIP configuration backup completed. If you want to only run one command via cron, you would use "crontab -e" and add your line into it. 00 9 * * * tmsh save /sys ucs /var/local/ucs/F5_INT_1.test.gov.uk.ucs
- Steve_KnappAltostratus
Hi Darshan, below is the one we use for version 11.4 but I would think it would work for your version also. Maybe you need to have the fully path to TMSH? That is the only thing I notice. HTH.
~ cat /home/sknapp/bin/bigip-archive.sh
year="$(date +%Y)" mth="$(date +%m)" day="$(date +%d)" filedate="$year-$mth-$day"
/usr/bin/tmsh save /sys ucs /var/local/ucs/$HOSTNAME.$filedate find /var/local/ucs -mtime +30 -print0 | xargs -r rm -rf *ucs
- Donald_Rogers_2Nimbostratus
Here is the one I use on Version 11.2.1
!/bin/bash daily_backup.sh A shell scrpt that takes a daily backup of the system configuration and FTP's the file off to a ftp server, in the event of a system failure and the system needs to be restored. This job will also delete files older than 45 days from the device itself. Get the Hostname of the deviceHOST=$HOSTNAME
Get today's date.DATE=
Get the passphrase to encrypt the file with.date +%m%d
passph=
set the local directorycat /root/passph
LDIR="/var/local/ucs/"
set daily directoryDDIR="/var/local/ucs/daily/"
Backup configuration filestmsh save sys ucs $LDIR$HOST.ucs passphrase $passph
backup config for archivalmv $LDIR$HOST.ucs $DDIR$HOST.$DATE.ucs
Delete older files/usr/bin/find /var/local/ucs/daily/ -mtime +45 -exec rm {} \;
Set config paramsUSER= PASS=
Push config file to FTP Servercd $DDIR ftp -nv ..com<< SCRIPT quote USER $USER quote PASS $PASS bin cd $HOST put $HOST.$DATE.ucs quit SCRIPT
exit 1
and then add the crontab -e command and add in this line 20 23 * * * bash /var/scripts/daily_backup.sh
This can be easily modified to save to a local directory and not a ftp server.
- swo0sh_gt_13163Altostratus
Thank you all! I just need a small snippet which can take daily backup and store the UCS locally to the appliance rather than contacting the external server. :)
Any help for that? Sincerely appreciated your response.
Thanks again. Darshan