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]