Wednesday, March 30, 2016

Automation backups F5 with bash & tmsh and GNU's gpg ( pgp )

Here in this current role ,  we use F5-LTMs. As you know or should know, the F5 appliances are running  linux currently ( previously they ran NetBSD ). If you have advance console access, you can do just about anything and everything in a  linux bash shell.

Here's a simple script that can be used on the appliance that I'm sharing &  that does the following;

1: builds a archive  ucs type file that's compressed  ( UserConfigurationSet )

2:  symmetrical encrypt the file using a static passphrase and with GNU's gpg

You can run this commands as a crontab  job and even scp, ftp or even  get creative push it via  a HTTP POST and curl to a upload site since the file is encrypted.

e,g


curl  -H "X_F5: backup "  -X POST -d @backupfilename  http://myusername:mypassword@ftp1.socpuppets.com/backups/ltms
 
 
Here's the backup script contents and execution.
 
 
 


Enjoy.


Ken Felix
NSE ( network security expert) and Route/Switching Engineer
kfelix  -----a----t---- socpuppets ---dot---com

     ^      ^
=(  @  @ )=
         o 
        /  \

No comments:

Post a Comment