Forum Discussion

Suresh_Jo_32729's avatar
Suresh_Jo_32729
Icon for Nimbostratus rankNimbostratus
Aug 06, 2018

F5 Auto backup script for SCP for V12

All,

I have deployed one script in F5 for Auto backup script for SCP for V12.

Script:

!/bin/bash /admin/home/bigipbackup.sh UCS Files will be saved to /var/local/ucs/ 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}"

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" [email protected]:/

EOF

It's asking the password for the remote server, this is defeating the automation purpose. I want that in every five minutes ucs file will generate and without any password promt it will send ucs file to the remote server.

Can someone pls tell me how this can be achieve?

7 Replies