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.

Xentrk

Part of the Furniture
Utility to save/restore NVRAM values and the jffs partition on Asuswrt-Merlin firmware.

Installation and usage instructions are available on the NVRAM Save/Restore Utility GitHub page with additional instructions in the project QuickStart.txt file.

Requirements
A properly formatted USB drive with an available partition for the NVRAM Save/Restore Utility installation.

Installation
Code:
/usr/sbin/curl --retry 3 "https://raw.githubusercontent.com/Xentrk/nvram-save-restore-utility/master/nsrum" -o "/jffs/scripts/nsrum" && sleep 5 && chmod 755 /jffs/scripts/nsrum && sh /jffs/scripts/nsrum

Select option [1] Install NVRAM Save/Restore Utility to install the utility. You will be presented with a list of available partitions on the USB drive. Select the partition you want to install the utility in. A directory called nsru (the acronym for NVRAM Save/Restore Utility) will be created in the partition for the utility scripts and files (e.g. /mnt/ASUS/nsru). The installation program will also create a backup directory (e.g. /mnt/ASUS/nsru/backup) to keep the generated save/restore files separate from the utility scripts and files.

To access the installation menu, type the command nsrum at the command prompt. To access the project directory, type the command nsru at the command prompt. These commands will not work after performing a factory reset since they require alias entries in /jffs/configs/profile.add, which will not exist after performing a factory reset. After a factory reset, you must navigate to the NVRAM Save/Restore Utility directory using the cd command (e.g. cd /mnt/AC88U/nsru).

The scripts included in the NVRAM Save/Restore Utility are designed to be run from the command line.

Project Development
@john9527 is the original author of the NVRAM Save/Restore Utility. The last update made by john9527 was Version 26.2 released on 24-Sep-2018.

@Martineau made numerous updates to the NVRAM Save/Restore Utility:
  • Version 30.1 code updates to nvram-restore.sh, nvram-restore.sh and nvram-save.sh made the utility compatible with the 384.13 Asuswrt-Merlin release.
  • Added functionality to nvram-restore.sh listing the restore files with the ability to delete a restore file or a range of restore files.
  • Add functionality to jffs-restore.sh listing the available jffs restore files.
Xentrk contributed the hosting of the repository on GitHub, coding of the installation menu, code updates to make the code POSIX compliant, and updating the nvram variables in the nvram-merlin.ini file.

FAQ
Q1: Is the NVRAM Save/Restore Utility included in amtm?
A1: Yes.

Q2: Is there a menu to run the NVRAM Save/Restore Utility scripts?
A2: No. The scripts were designed to be run from the command line.
 
Last edited:
Reserved
 
And now, the Asus router world is complete!

Congratulations to all!

@Xentrk, @john9527, @Martineau and to all the alpha/beta testers too for this latest version for this accomplishment that makes the @RMerlin 384.15_0 milestone even more remarkable!

I will be testing this out as soon as I can.

Thank you all again for this wonderful community. :)
 
Nice to see this public. It's probably one of the most sought after utilities we have on this forum. It's back...! ;):)
 
When using the migrate feature, I get a message saying that the file: dhcp_hostnames is empty or doesn't exist. It does however exist and is populated with information.

EDIT: Actual output is:
Skipping dhcp_hostnames (empty or does not exist)
 
When using the migrate feature, I get a message saying that the file: dhcp_hostnames is empty or doesn't exist. It does however exist and is populated with information.

EDIT: Actual output is:
Skipping dhcp_hostnames (empty or does not exist)
I may have to patch for HND vs. non-HND routers on that variable. There may be a few others I have to look at too.

If you run nvram get dhcp_hostnames, does it return anything? It suspect it is empty. But there should be data in /jffs/nvram/dhcp_hostnames. Please confirm. Thanks!
 
I may have to patch for HND vs. non-HND routers on that variable. There may be a few others I have to look at too.

If you run nvram get dhcp_hostnames, does it return anything? It suspect it is empty. But there should be data in /jffs/nvram/dhcp_hostnames. Please confirm. Thanks!
You're right no values to return from your above command nvram get dhcp_hostnames and yes dhcp_hostnames exists as a /jffs/nvram/ file and has contents.
 
I have this stupid client list bug. That is why my dhcp_hostnames nvram value returns nothing. It's a hnd router. I'm RMA'ing it as we speak.
 
You're right no values to return from your above command nvram get dhcp_hostnames and yes dhcp_hostnames exists as a /jffs/nvram/ file and has contents.
In that case, you can add the @ in front of the dhcp_hostnames nvram variable so it is not picked up during a migration save. The jffs backup will contain the dhcp_hostnames and other nvram parms stored in /jffs/nvram. See the example below on how to exclude for a migration restore.

HND users will need to exclude the dhcp_hostnames parm from being saved during a migration saved during a migration restore. This can be done by prefixing it with a @. This is only valid for individual settings and is not valid on the section header.

Code:
[System - Basic]
@time_zone_dst
time_zone
time_zone_dstoff
 
And now, the Asus router world is complete!

Congratulations to all!

@Xentrk, @john9527, @Martineau and to all the alpha/beta testers too for this latest version for this accomplishment that makes the @RMerlin 384.15_0 milestone even more remarkable!

I will be testing this out as soon as I can.

Thank you all again for this wonderful community. :)
+1
Installed and worked flawlessly on my RT-AC86U - including my small number of dhcp_hostnames which remain in /jffs/nvram/dhcp_hostnames as confirmed in post by @Xentrk above. :D
 
Instructions:
For most Windows users, NTFS is preferred so that the USB stick may be easily transferred to a Windows PC.
Requirements: Properly formatted USB Drive with designated partition
[1] Install NVRAM Save/Restore Utility to install the utility. You will be presented with a list of available partitions on the USB drive. Select the partition you want to install the utility in

Stupid question:

I did format a 2 GB usb stick (NTFS) with my computer and named it "NVRAM_UTIL".

And connected it to my router. But it is not listed (as "available partitions...") when I try to install the Utility (= choose [1] Install NVRAM Save/Restore Utility ).

All other usb sticks (which contain entware etc.) are available however.

I can see the usb stick from Merlin GUI, and from PuTTY I can see it with command
Code:
ls /mnt

How can I get this "Properly formatted USB Drive with designated partition" available for me?
 
Last edited:
Instructions:

Stupid question:

I did format a 2 GB usb stick (NTFS) with my computer and named it "NVRAM_UTIL".

And connected it to my router. But it is not listed (as "available partitions...") when I try to install the Utility (= choose [1] Install NVRAM Save/Restore Utility ).

All other usb sticks (which contain entware etc.) are available however.

I can see the usb stick from Merlin GUI, and from PuTTY I can see it with command
Code:
ls /mnt

How can I get this "Properly formatted USB Drive with designated partition" available for me?
The reference you quoted is a carry over from the original QuickStart guide. I will remove the reference to NTFS as the installer script doesn't recognize the NTFS format as a partition based on your feedback. The original NVRAM Save/Restore Utility had to be installed manually. I recommend using one of the current partitions on your USB. The installer will create the directories "nsru" and "nsru/backup" in the partition to keep the code and backup directory separate from the other utilities installed on the partition. Or, you can format a new stick to Linux EXT2, EXT3 or EXT4 using free utilities available in the internet such as EaseUS.
 
I sometimes wonder if there are any Asus engineers lurking around, fists in the air, cursing that they’ve been beaten to releasing a feature they’ve been working on for months, only to see it already figured out by you amazing folks.

Excellent work all around. This place rocks!
On pfSense, the settings are saved in XML format. I've never had a need to factory reset after an update. I wonder if Asus firmware will eventually migrate to XML format rather than using nvram variables.
 
Is there a list of HND vs Non-HND routers so we can figure out whether or not we have one?
HND - RT-AC86U and RT-AX88U
non-HND - all others RMerlin currently supports
 
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