Backup F5 archive to backup server daily
Problem this snippet solves:
When you want to create auto archive file and send this file to remote server automatically or manually, you should this scripts.
How to use this snippet:
1- Connect F5 as a root
2- open text editor such as "vi"
3- copy the script
4- save the script.sh
5-chmod +x script.sh
Code :
#! /bin/bash time=`date +%Y_%m_%d_%H%M` unit=`tmsh list sys global-settings one-line | grep -oP '(?<=hostname\s)[^\.]*'` tmsh save /sys ucs /shared/ucs/autoarchive_${unit}_${time}.ucs passphrase 'topsecret' scp /shared/ucs/autoarchive_${unit}_${time}.ucs tayfunftp@10.128.1.246:/var/tmp/ find /shared/ucs/ -name "autoarchive*" -mtime +7 -ls >> /var/log/ucsdelete find /shared/ucs/ -name "autoarchive*" -mtime +7 -ls -exec rm -f {} \;
Published Jan 06, 2017
Version 1.0TayF5un
Nimbostratus
Joined May 23, 2019
TayF5un
Nimbostratus
Joined May 23, 2019
No CommentsBe the first to comment