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.
Try running it with the -x flag to see what it’s doing when it hangs.
Code:
sh -x nvram-save.sh -b
Thanks @dave14305 but unfortunately I run into the same issue, even with the -x flag. Only turning off all the open VPNs and exiting the ASUS GUI works in backing up everything without stopping.

I arrived to the conclusion the GUI integrated JFFS backup/restore works well enough, and from testing all Entware packages Merlin-WRT comes bundled with, I preffer to have as few add-ons as possible installed, in order to be able to use as many block hosts/lists as possible in Unbound, while also maximizing internet speeds.
 
Thanks @dave14305 but unfortunately I run into the same issue, even with the -x flag. Only turning off all the open VPNs and exiting the ASUS GUI works in backing up everything without stopping.
This wasn’t supposed to fix it, just diagnose what is the last command on the screen when it “stops” and maybe understand the problem better.
 
I would really appreciate someone's help, who actually had this problem or knows how to solve it. Thank you.

Actually, I used to see these “hangs” on this particular script all the time (say 1 in 5 executions) when I had an RT-AC86U. A re-run usually used to “fix” it, but sometimes in rare cases it took a couple of goes.

In my case the “fix” was killing the RT-AC86U by unleashing an electrical storm on the house, and then replacing it with an RT-AX86U - I still regularly use nvram-save.sh and I’ve never once seen it hang on the new router.

My conclusion, based on very very thin evidence, was that the hang was somehow model-specific. That would now be given a tiny shred more credence by noting that @stevieosaurus also has an an RT-AC86U.

Yeah I know, much more testing would be required to pin this down but I throw it into the ring for what it’s worth - given this revived thread has taken a decidedly weird turn anyway …

:)
 
Actually, I used to see these “hangs” on this particular script all the time (say 1 in 5 executions) when I had an RT-AC86U. A re-run usually used to “fix” it, but sometimes in rare cases it took a couple of goes.

In my case the “fix” was killing the RT-AC86U by unleashing an electrical storm on the house, and then replacing it with an RT-AX86U - I still regularly use nvram-save.sh and I’ve never once seen it hang on the new router.

My conclusion, based on very very thin evidence, was that the hang was somehow model-specific. That would now be given a tiny shred more credence by noting that @stevieosaurus also has an an RT-AC86U.

Yeah I know, much more testing would be required to pin this down but I throw it into the ring for what it’s worth - given this revived thread has taken a decidedly weird turn anyway …

:)
I too used to see these hangs with my AC86U, but it has not happened lately, at least in the last 10 days. I can tell because I run a daily script that runs the backup. The last thing it does, when it works, is to rename the folder with the date. So if I look at my saved folders, I can tell if one is missing. Possibly it's because 386_5.2 fixed the problem?
 
I too used to see these hangs with my AC86U, but it has not happened lately, at least in the last 10 days. I can tell because I run a daily script that runs the backup. The last thing it does, when it works, is to rename the folder with the date. So if I look at my saved folders, I can tell if one is missing. Possibly it's because 386_5.2 fixed the problem?
interesting. Why would you need to do backups daily? Are you tuning your configuration so often?
 
interesting. Why would you need to do backups daily? Are you tuning your configuration so often?
No tuning, but if I make any changes to any script, I know I will get a backup the next morning. The script also deletes the oldest stored configs, so I only have the latest 5 saved in the router.
 
Possibly it's because 386_5.2 fixed the problem?

@TonyK132

Quite possible - I was running a much older 386.2 Merlin on the RT-AC86U by the time the lightning storm / power surge arrived and I was able to have an "urgent" excuse to buy the RT-AX86U :)

On the other hand (and It's only anecdotal and non-scientific but borne out somewhat by lots of other comments on SNB) the RT-AC86U in my eyes was definitely the "runt of the litter" when it comes to my otherwise A grade Asus router experience. Had a long great run with an RT-AC68U, and am full of praise for my current RT-AX86U. The RT-AC86U always had its annoying little quirks and unexpected surprises and never felt "quite right", despite numerous Factory Resets and rebuilds of config from scratch. Maybe mine was just a dud but I was quite pleased to get rid of it in the end!
 
I just recently installed and began using this utility, but when I execute the backup script I get a series of error messages like this with different MAC addresses:

cp: can't create '/tmp/mnt/ASUS/nsru/backup/jffs-YYYYMMDDHHMM_RT-AC68U-xxxx/./.sys/WBL/wlist_m/42:E6:F3:B4:A1:76': Invalid or incomplete multibyte or wide character

Will my backups be missing something important, and is there a fix/workaround for this?
 
I just recently installed and began using this utility...,
I strongly suggest you don't use this utility. It was written for the old 384 version of the firmware and not the current 386 branch. It hasn't been updated for two years and will be missing many of the new nvram variables that have since been added.
 
I strongly suggest you don't use this utility. It was written for the old 384 version of the firmware and not the current 386 branch. It hasn't been updated for two years and will be missing many of the new nvram variables that have since been added.
Good to know. Thank you.
 
I strongly suggest you don't use this utility. It was written for the old 384 version of the firmware
Is there a current version that is better?

You said you suggest not using it, but if someone came here it's because they needed something to do what this does... What utility/method/steps would you recommend instead?
It appears that others were still using it just a couple months ago with 386. Has something changed since then? Is it that it doesn't work or just that it works but certain settings don't get saved?

It's like if a doctor came into the pharmacy area of the hospital & said "I need a syringe to give my patient an injection & the person there said "Don't use a syringe, that method is outdated"... It doesn't change the fact that the patient still needs an injection. If the doctor is asking for a syringe he, most likely, doesn't know about the "new" method. Instead say something like "what you want is a snoglinbomber to inject via laser. Would you like one of those?" or "We now use the teleport method to directly teleport medicine into the needed area, you can find one in the medical supply department" or "All medicine can now be administered orally" or "the new hospital beds all come with automatic injectors, you can find it in the "Doctor Adjustments menu of the interface. It's explained in section 8 of the manual"

If the doctor is just told not to use it, but he has no other way what do you expect him to do?
 
Last edited:
Is there a current version that is better?

You said you suggest not using it, but if someone came here it's because they needed something to do what this does... What utility/method/steps would you recommend instead?
It appears that others were still using it just a couple months ago with 386. Has something changed since then? Is it that it doesn't work or just that it works but certain settings don't get saved?

It's like if a doctor came into the pharmacy area of the hospital & said "I need a syringe to give my patient an injection & the person there said "Don't use a syringe, that method is outdated"... It doesn't change the fact that the patient still needs an injection. If the doctor is asking for a syringe he, most likely, doesn't know about the "new" method. Instead say something like "what you want is a snoglinbomber to inject via laser. Would you like one of those?" or "We now use the teleport method to directly teleport medicine into the needed area, you can find one in the medical supply department" or "All medicine can now be administered orally" or "the new hospital beds all come with automatic injectors, you can find it in the "Doctor Adjustments menu of the interface. It's explained in section 8 of the manual"

If the doctor is just told not to use it, but he has no other way what do you expect him to do?
I believe @ColinTaylor is warning (correctly) that this utility only is aware of the nvram variables going back to release 384.
As a result, it has no knowledge (nor will it backup) variables related to newer features such as AI-Mesh, how static hostnames are now stored in jffs, etc.
So, using it to backup the nvram is somewhat misleading since at this point it will only backup a subset of anything beyond release 384.

I believe as long as you understand (and accept) this limitation, I don’t believe it will do any harm. It still does a fine job of backing up most of the WiFi settings, DDNS, Port Triggers etc.
 
BTW, it would be great for someone to update this utility. @john9527 did a great job architecting this utility and Xentrk and @Martineau did a variety of updates to get it to 384 release ready.
So, some very skilled developers have had their hands in this utility.
I suspect that the efforts needed to keep it updated everytime there is a new firmware release just takes too much effort/time.
 
I believe as long as you understand (and accept) this limitation, I don’t believe it will do any harm. It still does a fine job of backing up most of the WiFi settings, DDNS, Port Triggers etc.
Thanks for that.

Is there anyway for someone to edit the Original Post or add a pinned comment to the top listing the things that it doesn't backup? If there's no new version that'd be extremely helpful as it appears it's still the best utility, even though it is incomplete.

Something along the lines of

"This utility has not been updated since 2020
It works fully on firmware versions up to & including all of version 384.
In version 386 & onward the following settings will not be backed up
  • AI-Mesh,
  • Static Hostnames Stored in jffs,
  • whatever other stuff
The following settings backup successfully in versions up to & including Merlin 386.7_2 (Or whatever version is current when it's edited)
  • WiFi Settings
  • DDNS
  • Port Forwarding & Port Triggering
  • OpenVPN clients? & OpenVPN servers?
  • etc
I believe @ColinTaylor is warning (correctly) that this utility only is aware of the nvram variables going back to release 384.
I get, & appreciate the warning, but saying "Don't fight bad guys with a dull knife" doesn't mean much when your choices are fight with a dull knife or fight with a spoon or get killed. If the dull knife is the best tool available I understand telling someone "Be careful, that knife is old & not very sharp" but just saying not to use it sounds like it doesn't work. If we are here it's because we need something, a not very good something, if it's the only something, is what we have to use. Good to know what it will miss, but even without that say "This utility won't backup everything so you should take screenshots of every page of the WebUI, after you use the utility use the screenshots to manually reenter whatever is missing" lets them know that some things will be missing, they won't know what, but they'll at least have some of the settings restored instead of having to manually do it all.
 
If this was just fighting bad guys with a full knife, I could see the logic to pursue it.

But this is more like jumping to warp speed using a camel.

Sure, it may be possible in some alternative timeline, but I believe it is silly in this one.

Particularly when a full reset and a minimal/manual configuration is so fast, easy, and gives such a solid network afterward.
 
Particularly when a full reset and a minimal/manual configuration is so fast, easy, and gives such a solid network afterward
But if it's just a minimal configuration it doesn't work for many, anyone who just wants that shouldn't be using Merlin at all. The reason we come looking for a backup utility is because we don't have a minimal setup configuration.

Like my network has over 70 DHCP Reservations. some of those could be fine without the DHCP Reservation, but I NEED 45 of those. My network does not function properly without those. Just manually entering those 45 DHCP Reservations takes time.
If the only thing that is backed up is that, that saves a huge chunk of time for me personally.

I also have 2 VPN Servers that I NEED to have setup for use at different times. Otherwise that's a huge problem, making my network setup unacceptable without it. Plus the Home Assistant stuff that enables those to be turned on & off. Then I have 5 VPN Clients setup. Those get used rarely, so it's not essential, but I do have to go through the process of setting them up again if I start fresh.

Then there's other things like Firewall, AI Mesh, Parental Controls. I don't use those but they are important & necessary to a lot of people. DDNS server settings, the list goes on.

I actually have to schedule a time to do a reset of my router at all. That's just for a 10 minute shutdown & restart. Doing a more complete re-setup means I need to schedule a much bigger time. & not all of that is based on money based business things, Some of those things that need DHCP reservations to work properly are medical devices & the monitoring interfaces for them. being offline for an hour means that people outside the home need to be informed because they will get alerts telling them there is a problem. So minimizing downtime is important, even just by 30, 20 or even 10 minutes
 
Last edited:
@Dr.Mxyztplk, I can agree with many of your points, but you seem to have missed the point of an M&M install too.
 
Lots of people want,want,want but not many people do,do do!

I'm not a coder but I can Imagine the amount of time and sacrifice that goes into this.
These people have lives like we all do and don't forget that this is a hobby.
Most of us don't give a dime for the great benefits we receive. I find it really arrogant of people to complain. That's all folks!!!
 
you seem to have missed the point of an M&M install
Nope, didn't miss the point. I'm sure that works great for some, though again those who have "an M&M install" should probably not be using Merlin... For most people an M&M setup is at best a troubleshooting tool, not a way of life. You responded saying essentially that there's no point in doing a backup because doing the thing that has just the bare minimum configuration needed to get the router connected to the internet doesn't take long...
So?
That's like saying hiring a moving company to move your stuff from your old house into your new house is silly because getting a new barebones bed, 2 t-shirts, 2 pairs of jeans, 5 pairs of socks, a microwave, & TV is quick & easy... Those 2 things aren't the same thing.
You move into a new house & you'll probably find stuff you don't need anymore that you can toss out, but you'll spend time & energy going through everything.
Hiring a moving company to move your stuff from 1 place to the other means you will certainly keep stuff you'd throw out.
But those 2 things are the things being compared, moving the stuff yourself & hiring a company to do it. Starting over & taking nothing with you is a completely different thing.

An M&M install is like moving to new place, not taking anything with you, & getting just the bare minimum needed to survive.
There are times when that works & times when people might be better off doing that, but MOST people have the things they have in their house for reasons.
To illustrate that point I laid out some of the reasons in my case that starting from scratch isn't an option.
Maybe someone has a bad back & they got a specific bed & chairs because the normal ones hurt them. Maybe they have family heirlooms.
At the very least people have the clothes they like, that they picked for a reason, their work uniforms or recreational equipment, tools.

These people have lives like we all do and don't forget that this is a hobby
I'm not complaining about the app not being updated, I get that the people who did it don't have time anymore. I appreciate the work they did.
I'm simply expressing frustration with people saying "Don't use it" instead of saying "This is the best we got because it hasn't been updated to the new firmware" or ideally "This is the best we got, but if you use this it won't backup some things like X, Y, & Z."
 
Last edited:
I started to type a lengthy description of one possible way to backup your VPN and static assigments - then ran out of steam and also realized it might not be fail safe given that nsru is based on nvram variables at least 2 major firmware revisions behind.

My limited (IMHO) advice…. Install YazDHCP, let it do it’s migration then Export the csv file it creates. I believe this will accomplish the DHCP static list fine.

After that, not sure what to recommend. If you are coming from an older firmware and want to upgrade to a newer major release - the Asus Save Settings is NOT a good idea.
You could install nsru - it will backup your VPN info - and a lot of other settings in a very intellignet way. It will not know about any new features/settings after 384 (like VPN Director, etc).
It’s worth a shot though. YMMV but if the router doesn’t perform correctly/well, you could always Factory Reset and setup manually. At least you have the lengthy DHCP static list.

BTW, the restoreXXXX.sh file nsru creates could always be edited, just saving the VPN settings area. It’s a script file, I find easily readable.
 
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