Forum Discussion
Oct 26, 2015
BIG-IP : tmsh script to retrieve bigip.conf
F5 BIG-IP Virtual Edition v11.4.1 (Build 635.0) LTM on ESXi
I need a scheduled automated solution to retrieve bigip.conf from the active device in an HA pair.
Is this realistic with via a cron jo...
Ryannnnnnnnn
Altocumulus
Oct 27, 2015Sure mate. It's run from the BIG-IP's shell every night via a crontab entry:
[xxx@yyy:Active:Changes Pending] ~ crontab -l -u admin
30 3 * * * /config/BIG-IP_backup.sh
shell script:
!/bin/sh -x
tmsh save /sys ucs /var/tmp/BIG-IP_backup
export a=`date +"%y%m%d"`
export aa=$HOSTNAME.$a.ucs
export b=/var/tmp/$aa
mv /var/tmp/BIG-IP_backup.ucs $b
tar -cf /var/tmp/certs.tar /config/ssl
export ff=$HOSTNAME.$a.certs.tar
export f=/var/tmp/$ff
mv /var/tmp/certs.tar $f
export c=$HOSTNAME.$a.crontab
export cc=/var/tmp/$c
cp /etc/crontab $cc
export MName=1.2.3.4
export Log=/var/tmp/log.bigip
export UserName=SomeUserName
export UserPassword=SomePassWord
export Machine1f2=$aa
export Machine1f3=$c
export Machine1f4=$ff
ftp -nvd ${MName} 14 <<-END 1>&2 > ${Log}
user ${UserName} ${UserPassword}
bin
passive
put ${b} ${Machine1f2}
put ${cc} ${Machine1f3}
put ${f} ${Machine1f4}
quit
END
rm -f ${b}
rm -f ${cc}
rm -f ${f}
RTN_CODE=$?
exit $RTN_CODE
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
