Backup multiple F5s
- Tags:
Needs refining, should also add the license files to the tar archive and not use the "ls -t ¦ head -n 1" bodge...
for h in 192.168.1.1 192.168.1.2 \ 192.168.2.3 192.168.2.4; do ssh -o ConnectTimeout=5 ${h} "cd /var/local/ucs/; b config save `date +%Y.%m.%d-%H.%M.%S.%N`.${h}; ls -t | head -n 1 | xargs cat" > `date +%Y.%m.%d-%H.%M.%S.%N`.${h}.ucs ; done; tar -czvf F5.configs.`date +%Y.%m.%d-%H.%M.%S.%N`.tar.gz `date +%Y.%m.%d-%H`*
