Posted: Sat Sep 10, 2022 10:21 Post subject: nvram-save.sh: where do I get NVRAM variable from ?
Hi
Current firmware version:
Code:
Firmware: DD-WRT v3.0-r44719 std (11/04/20)
Time: 12:14:17 up 5 days, 2:10, load average: 0.02, 0.02, 0.00
WAN IP: 185.219.109.4
Router type:
Code:
Netgear Nighthawk R7800
-----------------------------------------------
I am attempting to preserve some of my router settings before upgrading my router firmware and have been pointed at easyddup as a means that may allow me to do this.
I downloaded easyddup and am going through the instructions in QuickStart.txt. I got to the point where I run:
Code:
nvram-save.sh: NVRAM variable file not found: nvram-dd-wrt.ini
but this came up with a message:
Code:
nvram-save.sh: NVRAM variable file not found: nvram-dd-wrt.ini
Does anyone know where I should get this file from ?
Is it simply a matter of using the provided nvram-dd-wrt.ini.sample for this or do I need to somehow generate this file from my current routing settings ?
Just take screenshots, or valid webpage saves, and log nvram show output then start over.
nvram show > /tmp/backupfilename.txt then download with WinSCP or do whatever below.
macOS terminal copying to clipboard: 'cat /tmp/file.txt | pbcopy' or 'pbcopy < /tmp/file.txt'
also macOS has scp command. Fairly certain R7800 has sftp too so FileZilla, Cyberduck etc.
Another way is Telnet/SSH as root in PuTTY with logging enabled and then run nvram show,
or click upper-left corner of PuTTY window copy all to clipboard then paste into Notepad++.
After a successful Ethernet webUI flash upgrade (dropdown select do not reset) or CLI flash,
verify the new build is up running perform webUI factory defaults or nvram erase && reboot.
Most search engines support 'site:forum.dd-wrt.com' to narrow scope of keywords or terms,
web search engine operators - + "" AND OR | * and more for better results. DD-WRT forum:
Search for all terms, Display results as: Posts & Return first 1000, or all characters of posts.
Posted: Sun Sep 11, 2022 18:50 Post subject: Re: nvram-save.sh: where do I get NVRAM variable from ?
Shaggy1 wrote:
Does anyone know where I should get this file from ?
Is it simply a matter of using the provided nvram-dd-wrt.ini.sample for this or do I need to somehow generate this file from my current routing settings ?
You can just run easyddup -n (the -n ensures no firmware upgrade is done) once and the missing nvram variables file will be there (or copy the nvram sample file manually).
Before upgrading, to test if all the settings you care about are restored by the script you can do a backup in Administration->Backup. Reset your settings and run the restore script. If a setting is missing; restore the backup just created. Add the missing variable name to the nvram variable file and repeat the process.
I ran easyddup -n and it did indeed generate a .ini file.
After that I ran nvram-save.sh which ran through this time.
The easydup run also generated a file:
backup/nvram-restore-202209251018-C648.sh
To confirm: once I have downloaded the new firmware I should be able to run backup/nvram-restore-202209251018-C648.sh to re-configure the router to what I had on the previous build ?
And once I have done that, I should then be able to run nvram-save.sh again to generate a text file that writes the new config to a txt file (eg backup50176.txt) and check for any differences by doing a diff between the previous backupr44719.txt and backup50176.txt
I see you have an r7800. One of my dev/backup routers is an r7800 so I can participate with you.
Dd-wrt's Administration->Backup is great and saves everything but it can only be used to restore to the same exact build you backed up from. Conversely, nvram-save cherry picks certain user settings variables only and is safe to use between builds.
The problem is that unless you are lucky, you may notice that the restore script doesn't bring back absolutely all of the settings you care about. Note that when you run easyddup.sh -n and say Y to "Save user settings restore point y/n ?" it runs nvram-save so no need to run nvram-save separately. When you run many times you end up with multiple dated restore scripts but nvram-restore-latest.sh always points to the latest one.
After nvram erase, reboot, nvram-restore-latest.sh; if we notice a missing setting, we restore the dd-wrt backup, add the missing variable to nvram-dd-wrt.ini and create the restore point again, nvram erase, nvram-restore-latest.sh and see if everything is restored.
Once the nvram-dd-wrt.ini saves & restores all we need, we can use easyddup without the -n, upgrade and after rebooting and preferably creating a new dd-wrt backup for the new build, run nvram-restore-latest.sh to get the settings back.
Future upgrades are trivial with easyddup after that or just restoring our correct settings when something gets messed up in dd-wrt.
Joined: 31 Jul 2021 Posts: 2146 Location: All over YOUR webs
Posted: Sun Oct 02, 2022 10:44 Post subject:
Actually the backup is not restricted to the same exact build (what gave you this idea?), I have backups from 49051 which work perfectly fine on 50308 (funnily enough I just did this yesterday for testing something unrelated, but I went back to the bakup I took before I reset the router and restored the older backup). But I know what Im doing more or less (enough to do serious damage), I follow development and know what nvram variables have been removed/added.
Please start a thread in the appropriate forum if you want to encourage restoring backups to different builds. Don't hijack a thread in Contributions Upload.
I should simply need to:
1) run ./easyddup.sh
2) Go to Administration->Firmware Upgrade, select my downloaded bin file, press Upgrade *
3) once the the firmware has upgraded reboot
4)run ./backup/nvram-restore-latest.sh
* what do I select for 'After flashing, reset to' don't reset, Reset to Default settings (or it doesn't matter?) ?