F5 backup config script
Jump to navigation
Jump to search
#!/bin/bash set -eu hosts=" myhost.example.com " ts=`date +%Y-%m-%d_%H-%M-%S` for host in ${hosts[@]}; do echo $host mkdir -p bkp sshpass -p ${USERPASS} ssh ${USERNAME}@${host} "cd /;show running-config recursive" > bkp/$host.${ts}.config cp bkp/$host.${ts}.config $host.config done