OpenWrt backup script

Discuss Networking
Post Reply
User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

OpenWrt backup script

Post by Void Main » Mon Dec 22, 2008 1:46 am

I have 4 WRT54G/GS routers running OpenWrt. I wrote a little backup script to back these devices up in a couple different ways. I save the config files and some other info as well as creating a *.trx image and bundling everything up in a single tar ball for each device:

http://voidmain.is-a-geek.net/files/scripts/bkupwrt

You can back up a single device with "bkupwrt devicehostname" or all your devices with "bkupwrt all" assuming you have the "ROUTERS" variable defined in the script with all your router names. Works best if you set up your authorized_keys (in /etc/dropbear) for your account so the script doesn't prompt for a password. Just modify the script and put your router names in it and the directory you want the backups to go.

Enjoy...

Post Reply