Making a backup of your DD-WRT config

Assuming you have ssh enabled on your DD-WRT, and that your DD-WRT is at ddwrt.lab.test, the following will generate a shell script that can be used to restore your config:

ssh root@ddwrt.lab.test 'nvram show | grep = | cut -d"=" -f 1 | while read key; do echo nvram set $key="$(nvram get $key)"; done' > ddwrt.config

Restore is then simply:

cat ddwrt.config | ssh -q root@ddwrt.lab.test

5 thoughts on “Making a backup of your DD-WRT config

  1. Does this work when changing models? e.g. I am linksys and upgrade to xyz netgear and want to move my settings in one swoop vs. page by page manual

    Like

    1. @spiicytuna: Unknown, I have not tried this. But I would anticipate this would /not/ necessarily work. My understanding is that different hardware handles the network ports differently, so things like VLAN configuration would not necessarily be identical.

      If you try, please comment here with the results!

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s