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.
Link is not working, i get the message " This item might not exist or is no longer available" :-(
 
Link is not working, i get the message " This item might not exist or is no longer available" :-(
I've just about had it with Microsoft.....seems like their share links are now randomly changing. One more try....updated the link in the first post.
 
Thx,
The link is working now.
 
Hi to everybody. I'm a noob (D)

Does some pious and gentle soul, can post only:

1) the procedure (commands), step by step, to save only the "Manually Assigned IP around the DHCP list"?

2) and the procedure, step by step, to restore after resetting router?

Many thanks in advance.
The other things are not of my interest.
Thanks again.
 
Hi to everybody. I'm a noob (D)

Does some pious and gentle soul, can post only:

1) the procedure (commands), step by step, to save only the "Manually Assigned IP around the DHCP list"?

2) and the procedure, step by step, to restore after resetting router?

Many thanks in advance.
The other things are not of my interest.
Thanks again.
This utility really isn't setup to easily just save/restore a single nvram entry. I'll work up a short script for those that only want to save a single or couple of entries.
 
This utility really isn't setup to easily just save/restore a single nvram entry. I'll work up a short script for those that only want to save a single or couple of entries.
Thank You John, but all is not of mine interest.
2nge6mc.jpg
 
OK all.....here's a quick script to allow you to save and restore a small number of NVRAM variables. Unzip the file (rename the attachment to remove the .txt) and copy the save-mynvram.sh script to any folder you want in jffs or an attached USB drive and make it executable. For example, copy it to /jffs/scripts and
chmod a+rx /jffs/scripts/save-mynvram.sh

Usage
save-mynvram.sh var1 var2 var3 ...

where var1 etc are the names of the NVRAM variables you want to save. It will make a

restore-mynvram.sh

script in the same directory to restore the variables you entered when saving.

It handles:
- special characters in the nvram variable
- embedded carriage returns in the nvram variable
- it will make a single backup copy of the previous restore script (restore-mynvram.sh.bak) if a restore script is already there
 

Attachments

  • save-mynvram.zip.txt
    971 bytes · Views: 375
Last edited:
Hey John

Just a report of a bug/missed setting, It seems that the restore utility does not save (or restore) the wireless password for 5GHz-2 on the RT-AC5300.

Let me know if I can help out.

Cheers
 
The Wireless->WPS setting is not restored on RT-AC3200. I have it turned off, save settings with nvram-save, and when I restore the settings with nvram-restore from a factory default, the WPS setting is turned back on.
 
OK all....
OK John :)
Here is my disastrous results :(
Code:
./save-mynvram.sh
Usage:  save-mynvram.sh var1 var2 var3 ...
         where var1 var2 var3 ... are the names of the NVRAM vars to save
./save-mynvram.sh var1
Skipping var1 (empty or does not exist)
./save-mynvram.sh var2
Skipping var2 (empty or does not exist)
./save-mynvram.sh var3
Skipping var3 (empty or does not exist)

What is the variable number to insert?
The variable number of the DHCP settings?
For saving only DHCP Statitcs IP Address and after restore only this? ;)
 
OK John :)
Here is my disastrous results :(
Code:
./save-mynvram.sh
Usage:  save-mynvram.sh var1 var2 var3 ...
         where var1 var2 var3 ... are the names of the NVRAM vars to save
./save-mynvram.sh var1
Skipping var1 (empty or does not exist)
./save-mynvram.sh var2
Skipping var2 (empty or does not exist)
./save-mynvram.sh var3
Skipping var3 (empty or does not exist)

What is the variable number to insert?
The variable number of the DHCP settings?
For saving only DHCP Statitcs IP Address and after restore only this? ;)
substitute the name of the variable....

./save-mynvram.sh dhcp_staticlist
 
substitute the name of the variable....
./save-mynvram.sh dhcp_staticlist
Thank You so much John, I tried and it seems to work well! :)
Code:
SAVE
./save-mynvram.sh dhcp_staticlist

RESTORE
./restore-mynvram.sh
nvram commit

(then reboot to activate your restored settings)
Questions:
1) is it necessary add the command line "nvram commit" to complete restore or not?
2) if I want to also save the associated icons, what is the variable name to add?
3) if yes, can you write the command?

Thank You again
 
Questions:
1) is it necessary add the command line "nvram commit" to complete restore or not?
I made this a separate step to give you an 'oops....I really didn't want to restore those' out. If you reboot with doing the nvram commit, there is a good chance (but not guaranteed) that it will undo your restore.
2) if I want to also save the associated icons, what is the variable name to add?
3) if yes, can you write the command?
I *think* they are in two addition variables.....so the command would be (including your DHCP settings)
Code:
./save-mynvram.sh dhcp_staticlist custom_clientlist custom_usericon
 
I made this a separate step to give you an 'oops....
OK, I do...
Code:
 ./save-mynvram.sh dhcp_staticlist custom_clientlist custom_usericon
Saving dhcp_staticlist
Saving custom_clientlist
Skipping custom_usericon (empty or does not exist)
Backing up previous restore script to /tmp/mnt/ASUS/backup/restore-mynvram.sh.bak
Saved 2 NVRAM variable(s)
Run /tmp/mnt/ASUS/backup/restore-mynvram.sh to restore your saved settings

It seems not correct:
"custom_clientlist" is a duplicate
"custom_usericon" doesn't exist
Instead, as you can see from the following screenshots, custom icons are there!
Anyway, thanks :)
bdw4gn.jpg
 
It seems not correct:
"custom_clientlist" is a duplicate
"custom_usericon" doesn't exist
Instead, as you can see from the following screenshots, custom icons are there!
Anyway, thanks :)
Not sure what you mean by a duplicate for custom_clientlist.....it lloks like it was save/restored successfully.
I wasn't sure about custom_usericon...whether they had implemented that yet (I think it's going to allow you to provide your own icons).
 
A small update to pick up a few fixes and suggestions....

LATEST RELEASE: Release 24
2-May-2016
nvram-save-r24.zip
Download http://bit.ly/1SDz2Hb
===============================

Version 24 2-May-2016

Program Changes
  • The generated files now contain a full date/timestamp allowing multiple runs to be saved on the same day. It also means you need to stay aware of the number of files that you have saved and manage your NVRAM save storage appropriately.
  • For ARM based routers, if moving from a firmware that doesn't support Adaptive QOS to one that does, the QOS type will be set to maintain the Traditional QOS setting.
  • Update Quickstart guide with info on need for jffs restore on later firmware levels
  • Update Quickstart guide with info on moving MAC list filters between firmware levels
INI file Changes
  • Fix save/restore of 3rd radio PSK (password) and WPS settings
  • Add support for Smartconnect settings

Thanks again to everyone for their feedback and suggestions. Enjoy!
 
OK all.....here's a quick script to allow you to save and restore a small number of NVRAM variables. Unzip the file (rename the attachment to remove the .txt) and copy the save-mynvram.sh script to any folder you want in jffs or an attached USB drive and make it executable. For example, copy it to /jffs/scripts and
chmod a+rx /jffs/scripts/save-mynvram.sh

Usage
save-mynvram.sh var1 var2 var3 ...

where var1 etc are the names of the NVRAM variables you want to save. It will make a

restore-mynvram.sh

script in the same directory to restore the variables you entered when saving.

It handles:
- special characters in the nvram variable
- embedded carriage returns in the nvram variable
- it will make a single backup copy of the previous restore script (restore-mynvram.sh.bak) if a restore script is already there
Thanks again Dear John, the "quick" script save & restore a small number of NVRAM variables, seems to work well. Very Good! ;)
Code:
./save-mynvram.sh dhcp_staticlist custom_clientlist custom_usericon
*except "custom_usericon" which is probably not yet implemented by ASUS (or Merlin?).

So, I ask you kindly:
Is it possible to implement your script... putting a code line for saving DHCP reservations sorted by IP?
I'm thinking something like this code (copied from wiki)
Sort DHCP Reservations by IP:
Code:
nvram get dhcp_staticlist | sed 's/</\n/g' | grep ":" | awk -F">" '{ print $2">"$1">"$3; }' | \
sort -t . -k 1,1n -k 2,2n -k 3,3n -k 4,4n | awk -F">" '{ print $2">"$1">"$3; }' | \
sed 's/^/</g' | tr -d '\n' | sed 's/^/nvram set dhcp_staticlist="/' | sed 's/$/"\n/' | \
tee /tmp/dhcp_list_sorted_tmp.sh
If yes, can you implement and to post it?

Thank You again.
 
It does not matter :)
I reached otherwise my purpose, to sort (and backup) DHCP reservations by IP, in three steps:

.step one
Code:
nvram get dhcp_staticlist | sed 's/</\n/g' | grep ":" | awk -F">" '{ print $2">"$1">"$3; }' | \
sort -t . -k 1,1n -k 2,2n -k 3,3n -k 4,4n | awk -F">" '{ print $2">"$1">"$3; }' | \
sed 's/^/</g' | tr -d '\n' | sed 's/^/nvram set dhcp_staticlist="/' | sed 's/$/"\n/' | \
tee /tmp/dhcp_list_sorted_tmp.sh
.step two
Code:
sh dhcp_list_sorted_tmp.sh
.step three
Code:
./save-mynvram.sh dhcp_staticlist custom_clientlist
 
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