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.
Sorry for the long delay between updates.....hope this is worth the wait :)

User NVRAM Save/Restore Utility
LATEST RELEASE: Release 16
16-April-2015
nvram-save-r16.zip
Download http://1drv.ms/16pENHc
===============================
Version 16 (16-April-2015)
Program Changes
  • Add -nouser option to NOT run a configured user exit script
  • Create a nvram-util.log file logging save/restore activity in the working directory
  • New standalone program nvram-restore.sh
  • nvram-restore.sh and jffs-restore.sh will now prompt you to load the last saved backups if run without any input parameters
    NOTE: You can still run the individual nvram-restore-yyyymmdd-macid.sh scripts to perform a restore as in previous releases.
  • The backup files may now be placed in a 'backup' subdirectory. Just 'mkdir /mnt/ASUS/backup' and the files will be placed there instead of in the main working directory.
  • Pass backup directory name to user exit script as second parameter
  • Update fork specific vars for removal on non-fork code
  • Fix runtime error in nvram-excp-merlin.sh (from Release 15a)
  • Update QuickStart guide
INI file Changes
  • Add first pass of TrendMicro module section
  • Add https router access vars
  • Add nat loopback var for Merlin
  • Update DNSFilter section with YanexDNS vars
Full Changelog history is available in the download directory

Some quick usage 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 16
    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
      -nouser  Skip execution of user exit script
  • When running the utility or using the print version option, nvram-save.sh, nvram-restore.sh, jffs-restore.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 also creates two text files during execution that can be viewed or archived.
    • nvram-all.txt (all nvram variables, including system variables not normally changed by the user)
    • nvram-usr.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.
-----------------------------------------------------------------
SHA256 hash:
Code:
9d7dbadaac93c0c5eb2e2a450810e7746249085403467112ce3be50b850ea195 *nvram-save-r16.zip
Thanks again to everyone for their feedback and suggestions. Enjoy!

Excuse me? You're sorry? Are you kidding us? You have nothing to be sorry for!

This utility is the single-best tool since the invention of the mighty crescent wrench! Then there is the slight matter of the Merlin 374.43 fork that you maintain too. I assume you do something on at least a full-time basis to survive as well.

We are not worthy dude, not by a longshot.
 
Hi,
This tool seems to be very helpful.
It is somewhere a step by step procedure for a windows user?
I never touched a Linux or his relatives and for this I don't know how to use this nice tool.
Thank you in advance!
 
Hi,
This tool seems to be very helpful.
It is somewhere a step by step procedure for a windows user?
I never touched a Linux or his relatives and for this I don't know how to use this nice tool.
Thank you in advance!

Yes, the QuickStart-win.txt file included in the zip. As a Windows user, the biggest thing to remember is that in Linux everything is case sensitive.....for example /mnt/ASUS is NOT the same as /mnt/asus
 
Nope, but now I will try. Thank you!! Thx for the tip with case sensitive!
I appreciate a lot your effort to make our life easier.
 
Sorry for the noob question: ever since I upgraded to .3861, I have had issues with the 5ghz channel on my rt-n66u router - connection drops every couple of days and invariably I have to reboot the router.

I want to switch over to merlin, but before I do that, I would like to know if I can use this script to transfer settings from the stock Asus firmware to merlin?
 
Sorry for the noob question: ever since I upgraded to .3861, I have had issues with the 5ghz channel on my rt-n66u router - connection drops every couple of days and invariably I have to reboot the router.

I want to switch over to merlin, but before I do that, I would like to know if I can use this script to transfer settings from the stock Asus firmware to merlin?

I would not recommend using this between different forks.
 
Sorry for the noob question: ever since I upgraded to .3861, I have had issues with the 5ghz channel on my rt-n66u router - connection drops every couple of days and invariably I have to reboot the router.

I want to switch over to merlin, but before I do that, I would like to know if I can use this script to transfer settings from the stock Asus firmware to merlin?
Since Merlin's code is based on the stock Asus firmware it should work without problems, but obviously not all combinations have been tested. A feature of the tool when moving from the 376 base to Merlin's 378 is that it will adjust the nvram parameters that have changed and account for the new ones Merlin introduced. Worst case, you will have a .txt file of all your settings created when running the tool to reference if you need to set things up manually.
 
Sorry for the long delay between updates.....hope this is worth the wait :)

User NVRAM Save/Restore Utility
LATEST RELEASE: Release 16
16-April-2015
nvram-save-r16.zip
Download http://1drv.ms/16pENHc
===============================
Version 16 (16-April-2015)
Program Changes
  • Add -nouser option to NOT run a configured user exit script
  • Create a nvram-util.log file logging save/restore activity in the working directory
  • New standalone program nvram-restore.sh
  • nvram-restore.sh and jffs-restore.sh will now prompt you to load the last saved backups if run without any input parameters
    NOTE: You can still run the individual nvram-restore-yyyymmdd-macid.sh scripts to perform a restore as in previous releases.
  • The backup files may now be placed in a 'backup' subdirectory. Just 'mkdir /mnt/ASUS/backup' and the files will be placed there instead of in the main working directory.
  • Pass backup directory name to user exit script as second parameter
  • Update fork specific vars for removal on non-fork code
  • Fix runtime error in nvram-excp-merlin.sh (from Release 15a)
  • Update QuickStart guide
INI file Changes
  • Add first pass of TrendMicro module section
  • Add https router access vars
  • Add nat loopback var for Merlin
  • Update DNSFilter section with YanexDNS vars
Full Changelog history is available in the download directory

Some quick usage 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 16
    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
      -nouser  Skip execution of user exit script
  • When running the utility or using the print version option, nvram-save.sh, nvram-restore.sh, jffs-restore.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 also creates two text files during execution that can be viewed or archived.
    • nvram-all.txt (all nvram variables, including system variables not normally changed by the user)
    • nvram-usr.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.
-----------------------------------------------------------------
SHA256 hash:
Code:
9d7dbadaac93c0c5eb2e2a450810e7746249085403467112ce3be50b850ea195 *nvram-save-r16.zip
Thanks again to everyone for their feedback and suggestions. Enjoy!


R16 version is great, got my SSL certificate backed up, thanks for your hard work, this tool is so handy.

Only 2 minor bugs i've noticed so far
USB Application->3G/4G->USB Modem settings cannot be backed up, I need to manually switch it off every time.

Administrator->Authentication Method reset to HTTP, configured as Both before

Backed up from Merlin 378.52_2, restored to 378.53
 
Last edited:
R16 version is great, got my SSL certificate backed up, thanks for your hard work, this tool is so handy.

Only 2 minor bugs i've noticed so far
USB Application->3G/4G->USB Modem settings cannot be backed up, I need to manually switch it off every time.

Administrator->Authentication Method reset to HTTP, configured as Both before

Backed up from Merlin 378.52_2, restored to 378.53
Thanks for the feedback....I'll check into both of them.
 
Posted an update with INI file changes only (thanks to @rickygao for the feedback!)

User NVRAM Save/Restore Utility
LATEST RELEASE: Release 17
29-April-2015
nvram-save-r17.zip
Download http://1drv.ms/16pENHc
============================
Version 17 (29-April-2015)
INI file changes only
  • - added missing var for http/https mode
  • - add separate USB Modem section and move existing modem vars from DualWan
  • - add support vars for Merlin VPN policy based routing
 
I been runing into this issue ever time i update my fw

why is the jffs be deleted every time i factory rest and update fw? where as before the 378 series it was not being deleted?

and i gather using command like this "./jffs-20150511-6E38" is why it fails and i should just use "./jffs-restore.sh"
which would result i the restore of the jffs working?

cause i usual just wind up re writing the the cron?
 
I been runing into this issue ever time i update my fw

why is the jffs be deleted every time i factory rest and update fw? where as before the 378 series it was not being deleted?
On the MIPS based routers, the jffs space is shared with the code. So if the code image gets bigger, it has the potential to overwrite the start of jffs.
and i gather using command like this "./jffs-20150511-6E38" is why it fails and i should just use "./jffs-restore.sh"
which would result i the restore of the jffs working?

cause i usual just wind up re writing the the cron?

On R16 and above

./jffs-restore.sh
will restore the last saved jffs image.

If you want to restore a different image, use
./jffs-restore.sh yyyymmdd-macid or ./jffs-restore.sh jffs-yyyymmdd-macid (either will work)
 
Another happy first time user here as I upgraded my AC3200 to 378.53 and this easily restored NVRAM and JFFS perfectly.

A huge THANKS for putting this together!
-Stach
 
Thanks to @tonyquan for reminding me I had not picked up the new Merlin variable for suppressing IPv6 neighbor solicitations, ipv6_ns_drop. I'll get it in the next release, but in the meantime you can add the support with the following command if you need it.

After you change to the /mnt/ASUS directory, enter the following (only needs to be done once).
Code:
sed -i '/Firewall Settings/a ipv6_ns_drop' ./nvram-merlin.ini
 
I think, perhaps, if you have a manual media server path specified it isn't restored by this script. (V17, using .53).

The text listing of all variables includes "dms_dir_manual=1", but that isn't in the restore script. Perhaps that is it?
 
Hi,
i change m router from RT-N66U to RT -AC68U. On 66 i have made a backup (Merlin Firmware 3.0.0.4.374.43). Can i use the backup to restore it on my new Ac68 with Fork Firmware or its better to make new settings?
 
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!

Members online

Top