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 [email protected] '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 [email protected]

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 to androideia Cancel reply