Forum Discussion
Scheduled Automatic Backup of LTM's
I am after a script either in powerhsell or F5 scipting which can create a UCS file daily and then copy it to a centralized location for 5 days Any help or guidance would be appreciated
8 Replies
- Mark_22062
Nimbostratus
Have you checked out: https://devcentral.f5.com/s/articles/icontrol-apps-06-configuration-archiving - The_Bhattman
Nimbostratus
Here are others
https://devcentral.f5.com/wiki/advdesignconfig.BIG-IP-10-2-backup-script-with-SCP-transfer.ashx
https://devcentral.f5.com/wiki/iapp.configuration_backup_scheduler_v11_2.ashx
https://devcentral.f5.com/wiki/AdvDesignConfig.LTM_Backup_Shell_Script.ashx
I hope this helps
-=Bhattman=-
- uni
Altocumulus
I run a perl script from cron, which uses SSH to run a bash script on the remote F5 to create a UCS backup, then SCP to copy the UCS off.
Here's a simplified version of my script:
!/usr/bin/perl $ip = 10.1.2.3; $hostname = "myF5"; $remotefile = "/var/tmp/backup.ucs"; $localfile = "/backup/$hostname.ucs"; $cmd = << CMD; if [ -n "`file -L /bin/bigpipe|grep text`" ]; then tmsh save /sys ucs $remotefile 2>/dev/null else bigpipe config save $remotefile 2>/dev/null fi CMD open SSH, "| /usr/bin/ssh -q -T -o \"ConnectTimeout 10\" -l root $ip"; print SSH "$cmd"; close SSH; if ($? != 0) { die "SSH to $hostname failed with $?\n"; } system("$scp -o \"ConnectTimeout 10\" root\@$ip:$remotefile $localfile 2>/dev/null"); if ($? != 0) { die "SCP to $hostname failed with $?\n"; }- F5Zan_89516
Nimbostratus
Thanks uni, can you let me know how you have configured it to run as a scheduled task? And what if i want to save it on some smb share for a week and then delete the older ones... I am a windows guy , not much idea on Linux systems :-)
- uni_87886
Cirrostratus
I run a perl script from cron, which uses SSH to run a bash script on the remote F5 to create a UCS backup, then SCP to copy the UCS off.
Here's a simplified version of my script:
!/usr/bin/perl $ip = 10.1.2.3; $hostname = "myF5"; $remotefile = "/var/tmp/backup.ucs"; $localfile = "/backup/$hostname.ucs"; $cmd = << CMD; if [ -n "`file -L /bin/bigpipe|grep text`" ]; then tmsh save /sys ucs $remotefile 2>/dev/null else bigpipe config save $remotefile 2>/dev/null fi CMD open SSH, "| /usr/bin/ssh -q -T -o \"ConnectTimeout 10\" -l root $ip"; print SSH "$cmd"; close SSH; if ($? != 0) { die "SSH to $hostname failed with $?\n"; } system("$scp -o \"ConnectTimeout 10\" root\@$ip:$remotefile $localfile 2>/dev/null"); if ($? != 0) { die "SCP to $hostname failed with $?\n"; }- F5Zan_89516
Nimbostratus
Thanks uni, can you let me know how you have configured it to run as a scheduled task? And what if i want to save it on some smb share for a week and then delete the older ones... I am a windows guy , not much idea on Linux systems :-)
- F5Zan_89516
Nimbostratus
Thanks Mark - Mahmoud_Eldeeb_
Cirrostratus
I prefer to go with Config Backup for F5 utility its a VM appliance with GUI interface and very easy to manage.find it in below link http://sourceforge.net/projects/f5configbackup/
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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