What's new

NVRAM [Release] NVRAM Save/Restore Utility

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Status
Not open for further replies.
Would this script be helpful when upgrading from a non HND router to a HND one? For example, it seems the dhcp client list is stored differently.
 
Would this script be helpful when upgrading from a non HND router to a HND one? For example, it seems the dhcp client list is stored differently.
From the instructions on https://github.com/Xentrk/nvram-save-restore-utility

nvram-hnd-migr.sh Usage Notes
HND router models RT-AC86U and RT-AX88U store some nvram values in the /jffs/nvram directory. Run nvram-hnd-migr.sh if performing a migration from a non-HND router to an HND router (RT-AC86U and RT-AX88U). This script will create a script in the NVRAM Save/Restore Utility folder called restore-hnd-migr.sh. Run restore-hnd-migr.sh after running the scripts nvram-restore.sh and jffs-restore.sh on the HND router to copy the HND specific nvram parameters stored in the the /jffs/nvram directory.

Since I lack an HND router to test on, I have only been able to perform limited testing. I have confirmed the nvram parameters do get created in the /jffs/nvram directory. Please provide feedback if you happen to use this script during a non-HND to HND router migration.
 
Couple of queries:
  • If I use this script to restore the backup made of the nvram and jffs, would the router be restored and configured exactly as it was before the factory reset, even including all setting for the scripts & addons?
  • I often have read on this forum that restoring settings is not really advised and kind of goes against what the factory restore is used for. Is this still the case with this utility, or does it do things in a 'cleaner' way somehow?
Thanks
 
Couple of queries:
  • If I use this script to restore the backup made of the nvram and jffs, would the router be restored and configured exactly as it was before the factory reset, even including all setting for the scripts & addons?
  • I often have read on this forum that restoring settings is not really advised and kind of goes against what the factory restore is used for. Is this still the case with this utility, or does it do things in a 'cleaner' way somehow?
Thanks
If your router needs a factory reset, usually importing saved configs of any kind will just import the existing problem with it. There is still no replacement for a M&M.
 
If your router needs a factory reset, usually importing saved configs of any kind will just import the existing problem with it. There is still no replacement for a M&M.
Indeed, and entirely true if the factory reset is being done to eradicate known glitches or problems. However, if the factory reset is called for by Merlin when installing an update, or if your are migrating to a new router, or you have decided to carry out a factory reset as a preventative, good-practice measure, then this Utility is your friend. Having said that, I think I would do an M&M for a new router anyway.
 
@Xentrk I'm not having any problems after doing a dirty conversion from ASUS 385.10000 to 384.15, except my NVRAM is dangerously full. After doing some manual cleanup, I managed to get about 2K free. But due to my many dirty updates, I suspect there's many more settings that are left-over from old ASUS days.

I've run your latest nvram_save.sh script. So, I'm wondering if I could purge junk by doing an nvram erase, followed immediately by running the generated nvram-restore-nnnnnnnnnnn.sh . Then commiting.

In my ignorance, I'm hoping the restore script only restores known (current) NVRAM name/value pairs. This assumption comes from the way you've grouped the name/values in specific categories. I also assume that the saved settings are all that are necessary for normal operation. Possibly all or some of the packages might need to be re-installed - but that isn't a big deal.

Sorry if this has already been covered. I've been overwhelmed by all the new stuff I'm dealing with since switching to Merlin and installing all these scripts.
 
Last edited:
@Ronald Schwerer a few points:

@martinr is not the script author. @Xentrk is the current one. :)

The script won't know what is 'current' or not, I would not be using it in this case. ;)

Moving from stock to RMerlin firmware (and vice versa) I would suggest a full M&M Config be performed. Not only does it start you with the defaults of the firmware you will be using, but it should also get you to question any settings you think you may need to carry over to a new version too. Start with the M&M Config suggested defaults and only change what you need.

With all the above said, if you aren't having any problems currently, I would put this off.

But, with the knowledge that if unexplainable gremlins and bugs show up in the future a full M&M Config will probably be needed. Of course, do a quick search for these future gremlins and even post a question or two to get a possible solution. But often, an M&M Config is a faster and better way to get your router and network back to a good/known state.
 
... a full M&M Config will probably be needed. Of course, do a quick search for these future gremlins and even post a question or two to get a possible solution. But often, an M&M Config is a faster and better way to get your router and network back to a good/known state.
+1 on this. Solved a suite of gremlins I had.
 
@Ronald Schwerer a few points:

@martinr is not the script author. @Xentrk is the current one. :)

The script won't know what is 'current' or not, I would not be using it in this case. ;)

Moving from stock to RMerlin firmware (and vice versa) I would suggest a full M&M Config be performed. Not only does it start you with the defaults of the firmware you will be using, but it should also get you to question any settings you think you may need to carry over to a new version too. Start with the M&M Config suggested defaults and only change what you need.

With all the above said, if you aren't having any problems currently, I would put this off.

But, with the knowledge that if unexplainable gremlins and bugs show up in the future a full M&M Config will probably be needed. Of course, do a quick search for these future gremlins and even post a question or two to get a possible solution. But often, an M&M Config is a faster and better way to get your router and network back to a good/known state.
+2 Just got this new RMAed router. Same model and all but still manual config was called for as it shipped with stock firmware.
 
Being prepared for a manual setup is like being prepared for a hard drive failure, in that you need a plan and short down time. Get setup so that you are able to deal with this if it happens to you. If this seems un doable then stay away from testing alphas and betas and stick with dirty upgrades to new firmware stable versions. You will do fine, this way. It wouldn't hurt to have screen shots though of settings you cannot memorize.
 
With in an hour of my new router warming to room temp, I had it configured totally. Not because I know what I'm doing, but because I had a plan for it ahead of time. I'm trying not to sound condescending, just be prepared people. :D
 
@Ronald Schwerer a few points:

@martinr is not the script author. @Xentrk is the current one. :)
OOOps. Sure enough. Sorry Xentrk (I bet he's in bed asleep by now). I'll edit my post.
The script won't know what is 'current' or not, I would not be using it in this case. ;)
I suspected at first it was a rote dump of name/values pairs, but when I saw the organization of the tags under many specific categories, I thought maybe the nvram_save.sh script only went after specific tags.

UPDATE: on further examination, I see that the script gets the names tags from nvram-merlin.ini and the comment says these were from "Updated for 384.13 nvram variables". If so, that would seem to filter out very old & obsolete variables.
With all the above said, if you aren't having any problems currently, I would put this off.
Yah, that's how I feel at the moment. I installed Merlin on an identical backup router. First I cleared NVRAM then I installed the original one's backup settings file. It went so well, I swapped out the old one as a test. I expected problems but other than NVRAM space and ssh keys needing to be regenerated (for communicating between the other clients), it was "perfect". I did have to re-discover my AiMesh node. It's been running fine for a couple days.
 
Last edited:
@Ronald Schwerer, using a saved backup config file between routers (even identical models) isn't recommended. You're asking for possible major future trouble doing this.

The script can't possibly know what future firmware(s) you'll try to restore these settings to. :)

Nor can it adjust to those future unknowns in any intelligent way. It may be able to guess, but for me, that is not enough. ;)
 
@Ronald Schwerer, using a saved backup config file between routers (even identical models) isn't recommended. You're asking for possible major future trouble doing this.

The script can't possibly know what future firmware(s) you'll try to restore these settings to. :)

Nor can it adjust to those future unknowns in any intelligent way. It may be able to guess, but for me, that is not enough. ;)
Exactly! Take for instance the changes from 384.13 to 384.14 using this utility to restore settings from .13 to .14 would have messed things up pretty bad nvram wise. This is just one of many examples. ;)
 
Excellent little app. The only thing I could suggest would be encryption and compression of the data (I note how merlins exports are unreadable in a text editor), and the ability to run all of this from the nvram-save-restore-utility installation script
 
@Xentrk

FYI ...you have missed the additional NVRAM variables for the VPN Clients - without them, any restore will truncate the VPN Client Custom Configuration GUI, resulting in the failure of the affected VPN Client from correctly initialising.

Also should 'dns_local_cache' be defined?
 
Last edited:
amtm 3.1.3 is now available

What's new
- Adds support for nsrum - NVRAM Save/Restore Utility to amtm.
I have installed NVRAM Save/Restore Utility earlier before it was added to amtm.

I updated amtm to the latest version and now I have NVRAM Save/Restore Utility visible in amtm, and it is waiting for update (8 open nsrum v30.3.0 -> min upd).

However, I cannot get rid of this "waiting for update". I have tried to update NVRAM Save/Restore Utility both normally checking for updates and force update.

Code:
[2]  Check for updates to existing installation
[3]  Force update existing installation

But there won't be any update available. But amtm keeps showing info that there is a min update.

Code:
Option ==> 2


This option will check your current installation and update any files that have changed
since you last installed the repository.  Updating is highly recommended to get the most recent.
files. Chosing this option will not update missing files. Select the install option from the
menu to reinstall missing files

Would you like to check and download any files that have been updated?
[1]  --> Confirm
[2]  --> No

[1-2]: 1
MD5 hash of clear-maclist.sh matches - skiping download clear-maclist.sh
No new version of jffs-restore.sh to update - latest is 30.3.0
MD5 hash of jffs-restore.sh matches - skiping download jffs-restore.sh
MD5 hash of nvram-excp-merlin.sh matches - skiping download nvram-excp-merlin.sh
MD5 hash of nvram-hnd-migr.sh matches - skiping download nvram-hnd-migr.sh
MD5 hash of nvram-merlin.ini matches - skiping download nvram-merlin.ini
No new version of nvram-restore.sh to update - latest is 30.3.0
MD5 hash of nvram-restore.sh matches - skiping download nvram-restore.sh
MD5 hash of nvram-sample.ini matches - skiping download nvram-sample.ini
No new version of nvram-save.sh to update - latest is 30.3.0
MD5 hash of nvram-save.sh matches - skiping download nvram-save.sh
MD5 hash of nvram-user-sample.sh matches - skiping download nvram-user-sample.sh
MD5 hash of save-mynvram.sh matches - skiping download save-mynvram.sh

Update of nvram-save-restore-utility completed

Press enter to continue
 
@Diamond67 you should have an additional option to update existing installation files (option 4 or 5). :)
 
I changed my USB drive scripts from a USB thumb drive (SNB) to an SSD (WD1tb), by copying all scripts / directories to my Linux box, then copied them to the SSD. I get an error trying to get "nsru" to change to the SSD direcory.

I checked /jffs/configs/profile.add and the alias is there, yet when I type "nsru" it give me the error that it cannot find the old USB thumb drive. How to correct this, please.
Code:
usr_name@RT-AC86U-4608:/jffs/configs# cat profile.add
alias nsru='cd /tmp/mnt/WD1tb/nsru'
alias nsrum='sh /jffs/scripts/nsrum'
Code:
usr_name@RT-AC86U-4608:/tmp/home/root# nsru
-sh: cd: can't cd to /tmp/mnt/SNB/nsru
 
Status
Not open for further replies.

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top