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”
Reblogged this on androideia and commented:
Tremenda dica para fazer um backup das configurações do dd-wrt! 🙂
Very nice way to backup a dd-wrt! Kudos! 😀
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
@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!
This is a great script. Unfortunately have not been able to get this to work as an additional cron job.