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.
The migration mode is used when moving the settings from one router to another....so you did it right.

Glad you found it useful.
 
User NVRAM Save/Restore Utility

Version 15 (25-February-2015)

Program Changes
  • add help option -h
  • add print version option -v
  • add option to specify custom ini -i inifile
  • add -nojffs option to NOT backup jffs
  • add -clk option to include clkfreq var (only in backup mode) - thanks noric
  • consistency check for script/ini versions
  • save txt files of all and user only nvram variables
  • remove SNMP vars if not supported on restore
  • update fork specific vars for removal on non-fork code
  • update QuickStart guide
INI file Changes
  • add PPT server vars from ASUS merge - thanks WaVeR
  • correct varname typo (MULTIFILTER_ALL) in [Parental Controls] - thanks pieland
  • add [AICloud settings] section - suggestion by Denny
  • add [SNMP settings] section - suggestion by pieland
  • add missing nat_redirect_enable - thanks noric
  • add missing wan_unit (for Dual Wan configs) - thanks noric
  • include sample user nvram-sample.ini with only basic settings

Full Changelog history is available in the download directory
nvram-save-r15.zip
http://1drv.ms/16pENHc

Some quick update notes:
  • Although new options/suggested improvements have been added to give greater control during execution, the default operation of the utility has not been changed. If you have used the utility in the past, you can continue to use it just like before.
  • A help command has been added to the utility, nvram-save.sh -h
    Code:
    NVRAM User Save/Restore Utility
    nvram-save.sh Version 15
     Options: -h           this help msg
              -v           Print version/perform consistency check
              -b           Backup mode - save for restore to same router (default)
              -m           Migration mode - transfer settings to another router
              -i inifile   Specify custom nvram variable ini file
              -clk         Include clkfreq/overclock setting (Backup mode only)
              -nojffs      Skip backup of jffs storage
  • When running the utility or using the print version option, nvram-save.sh, nvram-merlin.ini and nvram-excp-merlin.sh are consistency checked to make sure they are all the same version. A WARNING message will be printed on a version mismatch, but execution will continue if actually running to generate the restore script.
  • You can now specify a custom nvram variable 'ini' file to use to generate the restore script. A sample ini,
    nvram-sample.ini, is included which is a stripped down version of the full ini containing only basic entries that people have mentioned in various threads.
  • The default state is NOT to save clkfreq overclocking values (safest when moving to a new code level). If you wish to include this setting, specify the -clk option on the nvram-save.sh command.
  • The nvram-save utility will now also create two text files during execution that can be viewed or archived.
    • nvram-all-yyyymmdd-macid.txt (all nvram variables, including system variables not normally changed by the user)
    • nvram-usr-yyyymmdd-macid.txt (the nvram variables actually saved by the utility in their save categories)
  • As a reminder, the restore process will make the following changes if moving from a 376 or earlier code to 378 or later
    • A single consolidated MAC filter list will be made from the 2.4 and 5 GHz lists
    • If jffs is not active, it will be set to be activated and formatted, jffs scripting will be disabled
    • If jffs is active, jffs scripting will also be activated
    • If you are using a VPN server, the settings will be migrated to the new nvram variable
    • Moving backwards in code levels will remove those variables that are not present on the target level.
  • The utility is still valid for ASUS OEM as well as Merlin releases.
-----------------------------------------------------------------

Thanks again to everyone for their feedback and suggestions. Enjoy!
 
Last edited:
Anything to screen capture first?

Before restoring my settings using this utility, are there *any* screens I may want to screen capture? i.e., what configuration screens might not get restored by this utility? Time Machine? Shares? etc. Any at all?
 
Before restoring my settings using this utility, are there *any* screens I may want to screen capture? i.e., what configuration screens might not get restored by this utility? Time Machine? Shares? etc. Any at all?

The highest risk ones are the ones under 'USB application'...you mentioned Time Machine, I don't recall processing that one yet....same with iTunes Server and Download Master. Also, settings associated with the newest functions, Traffic Analyzer, AI Protection, Adaptive QOS are not there yet.

But in addition to any screenshots you may want to take, if you use the latest version, it now captures a txt file of every nvram variable, so you can search it out if it doesn't automatically get restored.

I'm playing with an idea now that may help get over these problems of keeping things updated.
 
John;

Just wanted to say THANK YOU for sharing this utility with us.

I upgraded my AC66 last night from 376.49 to 378.50 using your utility (r14) and it went SUPER SMOOTHly and FLAWLESSly, as far as I can tell.

THANKS AGAIN!
 
what is upnp_enable (without leading wan*) ???

Well, it's not accessed through the gui, and it's not modified anywhere in the code that I can find (it's default set to '1'). Right now it functions as a 'master switch' that can control if miniupnpd ever get's loaded and if the iptables chains for upnp are defined. If you manually set it to '0', all upnp will be shut off on the next reboot.
 
Hi,

I used version 15 of backup script to save the NVRAM and JFFS content before I re-installed the Merlin's .38-beta1 version.
After a factory reset I was unsing the restore script which gave the error below. Looks like it's a problem with the MAC list processing in case you have already the latest version installed... :(

Code:
Restoring [Astrill VPN settings]

nvram-restore: Applying code level exceptions ./nvram-excp-merlin.sh
[[: 2678: unknown operand

nvram-restore: Complete: User NVRAM restored
Please reboot

With kind regards
Joe :cool:
 
nvram-restore: Applying code level exceptions ./nvram-excp-merlin.sh
[[: 2678: unknown operand


I get above error when switch to 378.51 and restoring with nvram 15
 
nvram-restore: Applying code level exceptions ./nvram-excp-merlin.sh
[[: 2678: unknown operand


I get above error when switch to 378.51 and restoring with nvram 15

Yep...confirmed bug when I added some code to deal with ASUS OEM code. Here's a fixed version of nvram-excp-merlin.sh (as a zip file)....

EDIT: I've also added this zip file to the download location along with a flag file 'IMPORTANT - PLEASE READ' to update the r15 download.
 

Attachments

  • nvram-excp-merlin-15a.zip
    1.3 KB · Views: 338
Last edited:
other then that it looks like restore ever correct??

Should I factory default and do the restores again?

If so should just over ride the Nvram-excp-merlin with the one in the zip on the thumb drive and then defualt restore again?
 
other then that it looks like restore ever correct??

Should I factory default and do the restores again?

If so should just over ride the Nvram-excp-merlin with the one in the zip on the thumb drive and then defualt restore again?

Yes, replace existing with new.....if you are going 378 to 378, no need to do again as the exception processing is a no-op. Moving from <378 to 378 you should rerun the restore script after doing the replace.
 
Yes, replace existing with new.....if you are going 378 to 378, no need to do again as the exception processing is a no-op. Moving from <378 to 378 you should rerun the restore script after doing the replace.


I went from 376.49.5 to 378.51 cause I heard about some issue with wifi in 378.50 Any who i went head and replace that file on thumb drive, went and factory defualt rebooted and then ran the nvram to put my settings and jffs back on the router and it worked with no error, and everything looks good
 
Yep...confirmed bug when I added some code to deal with ASUS OEM code. Here's a fixed version of nvram-excp-merlin.sh (as a zip file)....

EDIT: I've also added this zip file to the download location along with a flag file 'IMPORTANT - PLEASE READ' to update the r15 download.
Hi,

The update works fine - no issue anymore!

Thank you for your fast fix!

With kind regards
Joe :cool:
 
I ran twice today into this error message when I migrated my settings from one device to another:

"[[: 2678: unknown operand"


Here is a full log on my second migration (AC56 as AP => AC66, both on the same Merlin f/w 378.51):


Code:
nvram-restore: NVRAM User Restore Utility - Version 15 (nvram-merlin.ini)
nvram-restore: Restoring settings from firmware 378.51_0 20141130-MIGR

Restoring [System - Basic]
Restoring [System - Miscellaneous]
Restoring [Switch Control]
Restoring [NAT Passthrough]
Restoring [TCP/UDP Settings]
Restoring [Port Forwards]
Restoring [Port Triggers]
Restoring [Static Routing]
Restoring [MAC Filters]
Restoring [IPv6 Settings]
Restoring [Wireless Configuration - General]
Restoring [Wireless Configuration - Professional]
Restoring [Guest Network]
Restoring [Firewall Settings]
Restoring [VPN Server]
Restoring [VPN Client]
Restoring [Media Server]
Restoring [SAMBA Settings]
Restoring [FTP Settings]
Restoring [NFS Settings]
Restoring [DNS Filters]
Restoring [Parental Controls]
Restoring [IPTV Settings]
Restoring [DDNS Settings]
Restoring [LAN Configuration]
Restoring [DHCP Settings]
Restoring [WAN Configuration]
Restoring [Dual WAN Settings]
Restoring [QOS Settings]
Restoring [AICloud settings]
Restoring [SNMP settings]
Restoring [Astrill VPN settings]

nvram-restore: Applying code level exceptions ./nvram-excp-merlin.sh
[[: 2678: unknown operand

nvram-restore: Complete: User NVRAM restored
Please reboot

The other migration was similar: AC66 as router => AC87, both on the same Merlin f/w 378.51

Thus far and after some very limited testing, everything seems to be working fine.

Do I need to worry?
 
I ran twice today into this error message when I migrated my settings from one device to another:

"[[: 2678: unknown operand"
Look up 5 posts to #191......

If you were going from 378 to 378 code no need to do anything more.....post #193
 
Thanks much, John!

(I had not seen above post yet and my google search had not brought it up for some reason.)
 
John's User NVRAM Save/Restore Utility has really grown up. Thanks!
 
Last edited:
Thanks john9527 for this version, sounds to be very good with the developed patch!
 
Status
Not open for further replies.

Latest threads

Sign Up For SNBForums Daily Digest

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