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
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=-
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";
}
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";
}
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 ![]()
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 ![]()
Thanks Mark
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/