the options for restoring settings after firmware update

Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions
Author Message
adFFhd1
DD-WRT Novice


Joined: 14 Feb 2022
Posts: 41

PostPosted: Mon Nov 25, 2024 20:11    Post subject: the options for restoring settings after firmware update Reply with quote
On this site, I read that, "It's always recommended that you reset to default settings before and after the flash."

I am trying to understand the ways that you can approach getting your settings back after the flash. From reading this forum, I think that these are the options:
1) Don't reset the settings at all. (Often works fine?)
2) Use a script or some kind of a "crutch" to do this.
As an example of "crutch," I mean running diff on nvram show results before and after clearing your settings.
3) In this thread
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=331163
yoyoma2 mentions the idea of having some limited persistent storage. Does that mean that you can use a USB thumb drive to store some/all of the router settings and then be able to always carry the settings over to the new firmware?

I am most interested in option 3, and so I am trying to understand that one better.
Sponsor
Alozaros
DD-WRT Guru


Joined: 16 Nov 2015
Posts: 7065
Location: UK, London, just across the river..

PostPosted: Mon Nov 25, 2024 21:41    Post subject: Reply with quote
when flashing via GUI do not choose the reset option after flash, its not good option...and your settings will stay after the flash...if you need to reset use the button hold it for 10-20 sec...
same is when you are flashing via CLI if you do not nvram erase settings will stay after the flash...

usually settings are not reset after flashing unless you want to do so on purpose...

you can save your settings via GUI option (backp)...
you can also save your settings via CLI too..

nvram backup / nvram restore

nvram backup /opt/nvram.bin
nvram restore /opt/nvram.bin

you'd need a USB drive with mouted partition either /opt or /jffs or in case if you don't have router with mounted USB, than you need to export those via the TMP folder and than copy using SCP.. https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=263735

_________________
Atheros
TP-Link WR1043NDv2 -DD-WRT 62606 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPN
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear XR500 -DD-WRT 63257 GTW/SmDNS/DoT,AD-Blk,Forced DNS,AP&Net Isolation,x2VLAN,Vanilla
Netgear R7800 --DD-WRT 62606 Gateway/DNSCryptv2,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla,VPN cli
Netgear R9000 --DD-WRT 62606 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Dynalink DL-WRX36-DDWRT 62606
Broadcom
Netgear R7000 --DD-WRT 63257 GTW/DNScrypt-proxy2/AD-Block,IPset Firewall,Forced DNS,x4VLAN,VPN cli
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913
adFFhd1
DD-WRT Novice


Joined: 14 Feb 2022
Posts: 41

PostPosted: Tue Nov 26, 2024 1:25    Post subject: Reply with quote
Alozaros wrote:

you can save your settings via GUI option (backp)...
you can also save your settings via CLI too..

nvram backup / nvram restore

nvram backup /opt/nvram.bin
nvram restore /opt/nvram.bin

you'd need a USB drive with mouted partition either /opt or /jffs or in case if you don't have router with mounted USB, than you need to export those via the TMP folder and than copy using SCP.. https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=263735


Ok. I had read on this forum that the bin file is made as a backup of settings only for the firmware version that it was exported from.
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 13880
Location: Netherlands

PostPosted: Tue Nov 26, 2024 8:27    Post subject: Reply with quote
Quote:
Ok. I had read on this forum that the bin file is made as a backup of settings only for the firmware version that it was exported from.


That is true indeed, you can cheat a little if builds are not changed in essential parts.

What is not useful is making a backup, reset to defaults and upload the old config, that is garbage out, garbage in.

Do you have to reset to default and build from scratch after each upgrade?
No, unless you experience problems that is not necessary, you can simply upgrade.

However it happens that after some time there might creep some inconsistencies in the settings so once in a while a reset to defaults and rebuilding from scratch is not a bad idea, I do it about once a year as spring cleaning, so I can also check my settings.
I add my static lease to the Additional config so that those can be copy pasted.

A reset to defaults and rebuild from scratch is also recommended after major changes e.g. major kernel updates like going from K4 > K6

If you reset you do that after the upgrade, resetting before upgrade is not necessary nowadays (there might be exceptions with routers with very little nvram, where a reset before upgrade is necessary to make an upgrade possible)

This is just how I do it. Smile

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
adFFhd1
DD-WRT Novice


Joined: 14 Feb 2022
Posts: 41

PostPosted: Sat Nov 30, 2024 16:35    Post subject: Reply with quote
thank you for all of your responses so far. I am learning and I understand that what you say might not work 100% of the time. Instead, it's a trade off between 'saving time' and 'having the firmware/router work as intended.'

egc wrote:

What is not useful is making a backup, reset to defaults and upload the old config, that is garbage out, garbage in.

Is this an accurate rephrasing of what you are saying? I'm just trying to be clear.

1) making a backup via exporting to .bin file
2) update firmware and reset to defaults
3) upload the .bin from step 1 of this list
is garbage in, garbage out.

Instead, your recommended approach is
1) making a backup via exporting to .bin file
2) update firmware and DO NOT reset to defaults
3) upload the .bin from step 1 of this list

egc wrote:

A reset to defaults and rebuild from scratch is also recommended after major changes e.g. major kernel updates like going from K4 > K6


when you say
going from K4 > K6

This means...
going from firmware that is based on Linux kernel version 4.xx to firmware that is based on Linux kernel version 6.xx

correct?
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 13880
Location: Netherlands

PostPosted: Sat Nov 30, 2024 19:32    Post subject: Reply with quote
Both wrong.

When there is a large jump reset to defaults after the upgrade and rebuild from scratch is recommended.

So save settings to a pdf file and use that to rebuild.

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 7112
Location: Romerike, Norway

PostPosted: Sat Nov 30, 2024 19:48    Post subject: Reply with quote
You can export nvram to text with:

nvram show >nvram.txt

The hassle is that the output is not quoted and quotes are needed when re-entering them with "nvram set variable="value". Finish with nvram commit.
adFFhd1
DD-WRT Novice


Joined: 14 Feb 2022
Posts: 41

PostPosted: Sun Dec 01, 2024 15:57    Post subject: Reply with quote
egc wrote:

When there is a large jump reset to defaults after the upgrade and rebuild from scratch is recommended.


How do you define "large jump?"
Is it in terms of Linux Kernel
a.bb. to c.dd.
for certain values of a, b, c, and d?

I realize that there is no 100% reliable answer. But, at least this gives me a general sense.

egc wrote:

So save settings to a pdf file and use that to rebuild.


So there would be 1 PDF for each setting screen? (Or, at least each settting screen that the user has changed from defaults.)
bushant
DD-WRT Guru


Joined: 18 Nov 2015
Posts: 2194

PostPosted: Sun Dec 01, 2024 16:27    Post subject: Reply with quote
adFFhd1 wrote:
So there would be 1 PDF for each setting screen? (Or, at least each settting screen that the user has changed from defaults.)


Yes
And be sure to enable all advanced options boxes and expand all text boxes on each page.
Some won't expand so copy those to a text file.

_________________
Forum Guide Lines (with helpful pointers about how to research your router, where and what firmware to download, where and how to post and many other helpful tips!)
How to get help the right way

Before asking for help - Read the forum guidelines AND Upgrade DD-WRT!
adFFhd1
DD-WRT Novice


Joined: 14 Feb 2022
Posts: 41

PostPosted: Sun Dec 01, 2024 16:30    Post subject: Reply with quote
Per Yngve Berg wrote:
You can export nvram to text with:

nvram show >nvram.txt

The hassle is that the output is not quoted and quotes are needed when re-entering them with "nvram set variable="value". Finish with nvram commit.


Thanks. This seems like a path worth exploring. It can't be that hard to put quotes around certain things in a bulk manner.

I am guessing that's an SSH or Telnet command? I am not familiar with all of the ways to connect to the router that result in a command line interface.
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 16703
Location: Texas, USA

PostPosted: Sun Dec 01, 2024 21:20    Post subject: Reply with quote
The large jump referred to is DD-WRT version number, regardless of kernel changes.
Rudimentary discussion that is discussed several times and places in this forum.

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
RSS feed for DD-WRT releases (2025)
RSS feed for DD-WRT releases (2024)
RSS feed for DD-WRT releases (2023)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
adFFhd1
DD-WRT Novice


Joined: 14 Feb 2022
Posts: 41

PostPosted: Sun Dec 01, 2024 21:51    Post subject: Reply with quote
kernel-panic69 wrote:
The large jump referred to is DD-WRT version number, regardless of kernel changes.
Rudimentary discussion that is discussed several times and places in this forum.


Thanks.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum