What's new

Backup scripts

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

DrTeeth

Senior Member
It is waaayyyyy beyond my capabilities, but I for one would pay for some backup scripts that would backup and restore user data/choices without interfering with the firmware defaults when doing a reset. It would save hours of time.

It is the complete palaver (http://www.urbandictionary.com/define.php?term=palava) of reinstalling all my setting that is stopping me from upgrading and experimenting. I would also have to do a reset when changing between wireless SDK 5 and SDK 6 builds.

I suppose the more I do it the easier it gets, but I would rather not go there. Looks like an opportunity for somebody.
 
Here's a simple script I use to restore my settings. It could be improved a lot. It takes a file that contains the output of nvram show, with only the settings you want to backup. I do not know what all the relevant settings are. I would also guess that most of the nvram settings can be changed from the web interface. So backing up all the "user defined settings" would be the same as a backup from the web interface and defeat the purpose. I'm not even sure I got all the necessary settings, I just scanned the output of nvram show for what I thought looked applicable to my setup.

restore-settings.sh
Code:
#!/bin/sh

while read line
do
        echo ${line}
        nvram set ${line} || exit 1
done < "$1"

nvram commit

settings.txt
Code:
dhcp_end=10.0.0.254
dhcp_start=10.0.0.2
dhcp_staticlist=<ff:ff:ff:ff:ff:ff>10.0.0.20>sabre<ff:ff:ff:ff:ff:fe>10.0.0.21>khopesh
dhcp_static_x=1
ipv6_service=dhcp6
lan_ipaddr=10.0.0.1
lan_ipaddr_rt=10.0.0.1
lan_netmask=255.255.255.0
lan_netmask_rt=255.255.255.0

Example usage

Code:
# ./restore-settings.sh settings.txt

This script worked for me, but use it at your own risk!
 

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!

Staff online

Top