What's new

User NVRAM Save/Restore Utility (R26.2)

  • 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.
I would just like to say thank you for this utility. I have used it for a while to make regular backups of my 88U, just in case I break the config when I 'play'.

My parents recently had broadband installed but their ISP's router is rubbish. I decided to buy another Asus router for them, this time an 87U.

I used the NVRAM Save/Restore Utility to migrate my settings over to the 87U. With a few obvious tweaks, the 87U was up and running in no time. Great time saver. [emoji1303]
 
An update to the User NVRAM Save/Restore Utility is available.
This release contains some new function and fixes, so please report any bugs. There have also been many updates to the QuickStart guide. Please reference it if you have any questions.

LATEST RELEASE: Release 25a
9-August-2017
nvram-save-r25a.zip
Download http://bit.ly/2aaAySO
===============================

Version 25a Highlights (Full Changelog history is available in the download directory)

Program Changes
  • NEW: Support doing a migration restore from a full backup file (previous migration save also still supported) - @brummygit
  • NEW: Support a new INI variable flag to force a variable restore (+)
  • Refactor exception processing and log changes made to both the terminal and syslog
  • Many QuickStart guide updates for the new options, ini file formats description, and release level errata
INI file Changes
  • Sync with Merlin 380.67 and LTS fork V27
  • Misc updates to wan and wifi variables

SHA256 hash:

Code:
d6d52e192faa68f8b200797fe33d7bbe4166a58a8ee7c25811f72d2ccea84a4d  nvram-save-r25a.zip

Thanks again to everyone for their feedback and suggestions. Enjoy!
 
Last edited:
Thanks John. I think the migration restore from a full backup is a good addition.

Can't get to the files at the moment because Onedrive is insisting I log in for some reason.:( I'll try again in a while.:)
 
Thanks John. I think the migration restore from a full backup is a good addition.
When I can, I try to incorporate good ideas. It was a little bit of a 'hack-ish' way to do it, but it kept me from having to re-architect the tool :)
 
It was a little bit of a 'hack-ish' way to do it, but it kept me from having to re-architect the tool :)
I haven't looked at the new code :D but I remember when the idea was suggested I did take a look, thinking I might have a go myself. When I looked I thought "Oh my god, this'll take a complete re-write. I'm not touching this." So well done for doing it.:)
 
@john9527

Ok, downloaded the 'nvram-save-r25' archive. After moving the old 'nvram-save-r24a' files out of '/mnt/ASUS/', installed the 'nvram-save-r25' files. On my rt-ac88u (380.68-alpha2-g5d6b6dd) [Wireless router mode] running 'nvram-save.sh' outputed text to the terminal is as expected. No errors. But...

On my rt-ac68u running as a 'Media Bridge' when I run the the new 'nvram-save.sh' I get the follow unexpected lines at the beginning at text output on the terminal screen (I added the '<== ?????' pointers):
Code:
xxxxxxxxxx@RT-AC68U-XXXX:/tmp/mnt/ASUS# ./nvram-save.sh

nvram-save.sh: NVRAM User Save Utility - Version 25
nvram-save.sh: Saving settings from firmware 380.64_2
nvram-save.sh: Using standard NVRAM variable file: nvram-merlin.ini Version=25
nvram-save.sh: Running in Backup Mode

Saving [System - Basic]
[: #: unknown operand                 <== ?????
[: [: unknown operand                 <== ?????
[: @: unknown operand                 <== ?????
[: !: unknown operand                 <== ?????
Saving [System - Other]
Saving [Tweaks & Hidden settings]
...

The 'nvram-save.sh' seems to complete ok, but I don't recall seening those 'unknown operand' lines before when running the previous version (v. 24a) on the rt-ac68u used in Media Bridge mode. Is this a concern?
.
 
The 'nvram-save.sh' seems to complete ok, but I don't recall seening those 'unknown operand' lines before when running the previous version (v. 24a) on the rt-ac68u used in Media Bridge mode. Is this a concern?
Definitely shouldn't be. I just ran a fresh extract of the zip file and ./nvram-save.sh on an AC68 in Media Bridge mode and can't recreate your results. Only thing I can come up with is that there is corrupt line in the nvram-merlin.ini file. Try re-extracting the zip and re-writing the files.
 
@martywd

Had an idea and was able to recreate it. It's due to something being incompatible with the 'old' version of busybox used on 380.64 (busybox was updated in 380.65). Give me a bit to track it down.
 
@martywd

Had an idea and was able to recreate it. It's due to something being incompatible with the 'old' version of busybox used on 380.64 (busybox was updated in 380.65). Give me a bit to track it down.

Unfortunately, any firmware newer than 380.64 on this ac68u in 'Media Bridge mode' intermittently drops http and ssh access for some reason unexplained in the log, thus my sticking with the older firmware. Since the logs never indicate errors, warnings, etc. I've never posted regarding the 'http/ssh drop issue' and since 'Media Bridge mode' works flawlessly with 380.64 ... that's where I've stayed with this hardware.

If this is going to be a difficult issue, I can just reload the 'nvram-save-r24a' on this ac68u?
.
 
Updated the download to release 25a with a fix for the older busybox problem.

If you were experimenting with the new INI variable flag to force a restore, the flag has changed from '!' to '+'. Quickstart also updated to reflect this change.

@martywd
 
Thanks for the update @john9527 :). Just installed v25a on my RT-AC68U running 380.68-alpha2-g5d6b6dd, ran it, base functionality works like a charm. I will take a more thorough look at the Changelog and Quickstart later today, to see what has changed.
 
Updated the download to release 25a with a fix for the older busybox problem.

If you were experimenting with the new INI variable flag to force a restore, the flag has changed from '!' to '+'. Quickstart also updated to reflect this change.

@martywd

I hate being "that" guy.. but would you consider not using versions like 25a? To me that means alpha and that it comes before the 25 release and not after. Could you do like 25.1 :) Your utility rocks!
 
I hate being "that" guy.. but would you consider not using versions like 25a? To me that means alpha and that it comes before the 25 release and not after. Could you do like 25.1 :) Your utility rocks!
Reasonable request...and makes sense.

There was somewhat of a method to the madness, however. I consistency check that all the various pieces are from the same major release, and for simplicity I just checked the numeric portion of a version string in each related component. But I can just as easily parse to the first decimal point......for the next update :)
 
Version 25a Highlights (Full Changelog history is available in the download directory)

Program Changes
  • NEW: Support doing a migration restore from a full backup file (previous migration save also still supported) - @brummygit
Wow, thank you :)
 
Many thanks, John, for a great utility.

I managed to upgrade from 376.47_0 to 380.67_0, on a RT-N66U, with just a few edits to my nvram-restore. The details are here.

Your QuickStart.txt was so detailed, walking through all the funky cases - simply indispensable!
 
Trying to migrate from one RT-AC68U to another. On telneting the command
./nvram-restore.sh to the recipient router with the usb stick plugged in, I get:

"no restore scripts found for MAC:C760. Exiting - Restore aborted"


I looked in the nvram-util.log and found:


nvram-save.sh 201704011159-2190 Sat Apr 1 12:02:04 DST 2017 378.55_0 #Version=24a
jffs-save 201704011159-2190 Sat Apr 1 12:02:05 DST 2017
nvram-save.sh 201705170415-MIGR Wed May 17 04:18:11 DST 2017 378.55_0 #Version=24a
jffs-save 201705170415-MIGR Wed May 17 04:18:12 DST 2017
nvram-save.sh 201705170423-2190 Wed May 17 04:26:10 DST 2017 378.55_0 #Version=24a
jffs-save 201705170423-2190 Wed May 17 04:26:11 DST 2017

And on the usb stick I see, amongst some 15 or more files, an nvram-restore.sh file at 4kb


I assume I should reformat the stick and start again making a new backup?

Any ideas where I fouled up!?

Thanks

Martin
 
If you are migrating to a different system, you need to specify the restore file to use...so

./nvram-restore.sh 201705170415-MIGR

Having said that, I can see I also need to make a change in V25 to handle saves made with an earlier version (i.e. you cannot do a migration restore from a full save if the save was done earlier than V25).

So for now, if you are now running V25a, after entering the above command, answer 'N' to the migration restore prompt, and enter 'Y' to the clean restore prompt.
 
Trying to migrate from one RT-AC68U to another. On telneting the command
./nvram-restore.sh to the recipient router with the usb stick plugged in, I get:

"no restore scripts found for MAC:C760. Exiting - Restore aborted"


I looked in the nvram-util.log and found:


nvram-save.sh 201704011159-2190 Sat Apr 1 12:02:04 DST 2017 378.55_0 #Version=24a
jffs-save 201704011159-2190 Sat Apr 1 12:02:05 DST 2017
nvram-save.sh 201705170415-MIGR Wed May 17 04:18:11 DST 2017 378.55_0 #Version=24a
jffs-save 201705170415-MIGR Wed May 17 04:18:12 DST 2017
nvram-save.sh 201705170423-2190 Wed May 17 04:26:10 DST 2017 378.55_0 #Version=24a
jffs-save 201705170423-2190 Wed May 17 04:26:11 DST 2017

And on the usb stick I see, amongst some 15 or more files, an nvram-restore.sh file at 4kb


I assume I should reformat the stick and start again making a new backup?

Any ideas where I fouled up!?

Thanks

Martin

A few weeks ago someone here clarified that when migrating from one router to another, even a router of identical model, the -MIGR script should be used. (Sorry, I have to leave in a few minutes and don't have time to locate the specific post on the forum.)

If I understand correctly, when you ran the nvram-restore.sh script without any parameter, it automatically called the most recent nvram-restore-xxxx.sh script, which was written by the most recent nvram save.

If this second script was the specific script for your previous router ending in the last 2 bytes of your old router's MAC number, (and not the generic -MIGR script), it will contain the MAC number for your OLD router and may have caused the error message you mention.

Are the last 2 bytes of your old router's MAC 2190, and the last 2 byt4ees of your new router C760 ?

I would try instead to run the lastest -MIGR script on the USB stick, since this will not contain the "wrong" MAC number for your new router. (The Quickstart guide specifically states that it is ok to run this directly, rather than via the generic nvram-restore-sh script.)

If you have a directory "backup" on your USB stick, you need to change to this directory and then the script you need should be in this directory.

If you do not have a recent -MIGR script, John has added a new feature in version 25a of his utility. If the restore script is called with a specific parameter, the specific script for your old router can be used, but ONLY those parameters which would have been contained in the corresponding -MIGR script will be loaded into your new router.

(I have used the nvram restore utility a few times and it has saved me a lot of time. I have studied the scripts which John wrote, but do not pretend to understand all the details. If I have misunderstood anything, I will be pleased to stand corrected.)

HTH
PB
(Edited for clarity)
 
Last edited:
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