Forum Discussion
swo0sh_gt_13163
Jul 20, 2014Altostratus
F5 Auto backup script for SCP for V10 and 11.
Hello Guys,
I have tried looking for the subjected topic within DevCentral, but unfortunately that didn't help. (I must be doing something wrong for sure). By the way I couldn't find any script ...
swo0sh_gt_13163
Jul 23, 2014Altostratus
Hi All!
Thank you very much guys for your help. I have successfully achieved the requirement!!!
I have managed to transfer backup to the SCP server. Following is the final version of the script which made it working.
!/bin/bash
/admin/home/bigipbackup.sh
UCS Files will be saved to /var/local/ucs/
SCF Files will be saved to /var/local/scf/
Create current date/time stamp variable
DATETIME="`date +%Y_%m_%d`"
Note the correct ` character must be used above,
this can be found near the top left of most keyboards
just under the [ESCAPE] key.
Uncomment the following line for troubleshooting
echo $DATETIME
Create filename variable
UCS_FILENAME="${DATETIME}_$HOSTNAME"
Uncomment the following line for troubleshooting
echo $UCS_FILENAME
Create a UCS archive with the filename specified above
The file extension will be .ucs � will be available in the GUI
tmsh save sys ucs "${UCS_FILENAME}"
Also create an SCF file with the same filename
The file extension will be .scf � won�t be available in the GUI
tmsh save sys config file "${UCS_FILENAME}.scf"
If you don�t delete these files /var will become full fairly quickly
Change the +31 value (31 days) to whatever suits you
find /var/local/ucs/ �mtime 21 -delete
scp "/var/local/ucs/${UCS_FILENAME}.ucs" f5-user@10.254.55.22:/home/f5-user/tmp/S1DZILB01/
EOF
Without defining the source and destination complete path, it was giving different errors. Many thanks for sharing the script, that really helped.
Cheers!
- What_Lies_Bene1Jul 23, 2014CirrostratusGood news, you're right about the source path, I'll know for next time. Cheers
- swo0sh_gt_13163Jul 23, 2014AltostratusThank you very much for the script. That made my life easier.
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