bash

All posts tagged bash

I’ve whipped up a script to backup Edgemax/Vyatta routers and push it to a RCS system, download a copy here

Prerequesites

sshpass (Sourceforge page)
bzr here (or something else like CVS/Git)

Usage

./edgemax-backup.sh <userid> <passwd> <router IP address> <filename>

Notes

Whilst it’s not a great idea to embed SSH passwords in scripts, you could use SSH keys with a bit of jiggery pokery of the script, it’s upto you, personally I only allow access to ssh from the my trusted management platforms and even the above user SSH userid could be restricted to only allow “show configuration”

* Big thanks to [email protected] for allowing me access to his test box for final testing.