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.
You could do an

nvram show | more

and see if anything jumps out at you.

Running the command shows me a couple af "astrill_xxxx" entries, so it could seem they are easy to find.. Is there a command to "extract" all the astrill entries from nvram? Sorry, i'm not that familiar with linux command line :)
 
Running the command shows me a couple af "astrill_xxxx" entries, so it could seem they are easy to find.. Is there a command to "extract" all the astrill entries from nvram? Sorry, i'm not that familiar with linux command line :)

There sure is....

nvram show | grep astrill_

and copy/paste the data
 
Ok, here goes..

I'm guessing something like this could be added to the nvram.ini:

[Astrill VPN settings]
astrill_vpnmode
astrill_mssfix
astrill_iflist
astrill_protocol
astrill_key
astrill_mode
astrill_accel
astrill_blockinternet
astrill_update
astrill_devices
astrill_servers_dedi
astrill_sid
astrill_exflt
astrill_dmzdevice
astrill_ifmode
astrill_update_lastcheck
astrill_port
astrill_ifexlist
astrill_autostart
astrill_serial
astrill_devmode
astrill_iplist
astrill_serverid
astrill_iplistraw
astrill_cipher
astrill_ip
astrill_portindex
astrill_dnsserver


There's an astrill_bootstrap entry too, but it contains like a mini-script, with all kinds of characters and i figure it could be left out. I'm thinking i would need to re-install the applet anyway after a firmware upgrade, then this entry will be created anyway?
 
Last edited:
That looks good (I'm still amazed that Astrill had the discipline to name the nvram entries with a common identifier like that).

One thing that I think you'll need to test is when to do the restore. Installing the applet may set all the values to some default. So we need to determine the sequence

FW upgrade -> factory reset -> nvram restore -> install astrill

or

FW upgrade -> factory reset -> install astrill - nvram restore

I suspect the second case will work better, and then I would include the astrill_bootstrap entry.
 
your download link dont work for me well atlest not in firefox/cyberfox

I was right this was bug in Firefox/cyberfox 64bit builds MS onedrive where buged in 34.xx builds 35.xx builds have this fixed

Update on this it was indeed a bug in x64 builds of firefox that was keeping MS onedrive from showing up correctly/ 35.xx build have fixed this.

Just thought i mentionin case anyone else has the issue, make sure you update to 35.xx builds for x64 firefox builds
 
Version 10 Update

First update of the new year...

Version 10 18-January-2015
- add versioned backup of /jffs directory if found
- new script jffs-restore.sh to restore the jffs backup
- updated QuickStart guide for jffs backup (please read)
- added section for Astrill VPN - thanks Eet_46
- updated file headers to reflect actual release numbering

While browsing through the forum, I found someone asking about how to back up his custom jffs scripts. Now, if the utility finds a jffs directory, a backup directory will be created on the USB stick 'jffs-yyyymmdd-macid'. A new script has also been added, jffs-restore.sh, which will delete the current contents of your jffs directory and replace it with a backup from the USB stick. Of course, you can also just pick and choose files to restore with normal linux commands.

Enjoy!
 
John, if you want to future-proof yourself, you might want to add the new nvram settings I'm adding with 378.50.

Code:
vpn_serverx_start - this will replace vpn_serverx_eas, as Asus isn't using it the same way I was, causing conflicts.  Same syntax as the _eas setting.
jffs2_scripts - this will enable or disable the execution of user scripts and custom configuration.  Default will be 0.
 
Merlin,

Would you consider writing a GUI version of this at some point? Would make it easier for those of us who rarely do this to remember how it's done. Maybe put it on the admin backup/restore screen and just download the result the same way the existing backup works -- this would be better for security as it keeps the backup away from the router. This is a great utility but I'll probably forget how to use it next week :).
 
Merlin,

Would you consider writing a GUI version of this at some point? Would make it easier for those of us who rarely do this to remember how it's done. Maybe put it on the admin backup/restore screen and just download the result the same way the existing backup works -- this would be better for security as it keeps the backup away from the router. This is a great utility but I'll probably forget how to use it next week :).

I'm not opposed to the idea, but it's not something I have time to look into in the near future.
 
I'm not opposed to the idea, but it's not something I have time to look into in the near future.

This would be most excellent when you do have the time to implement.

Would really push Asus into another league from the rest of the consumer routers.

Of course, Asus would pick this up quickly and the long term support wouldn't be needed too. ;)
 
This would be most excellent when you do have the time to implement.

Would really push Asus into another league from the rest of the consumer routers.

Of course, Asus would pick this up quickly and the long term support wouldn't be needed too. ;)

The problem is that this script is far from being bulletproof. Asus could at any time change the structure of one of the settings this script thinks safe, making saved settings unusable on a newer firmware. Or, a bug like the recent corruption of the wl_nband setting require either a factory default reset, or manually correcting the value over SSH/telnet. For the average joe, the factory default reset is the only workable solution.

The only way to really address all those issues would be to switch the configuration to a scheme where each field can have a version attached to it. That way, any field that has a version that's too old could be automatically replaced with a default value, and the enduser notified somehow of this occurring. That kind of implementation is quite complex however.

That's one of the things that make me pause before considering adding this to the firmware. It does work - in _most_ situation. The problem is having to explain to the user how, at some point, it might be as undesirable as the standard settings backup feature, at which point we're back to square one.
 
A useful feature of the script is that the settings are in a text format, so it is an easy way of keeping track of your settings for re-entering them manually as well. perhaps the script could be adapted to just write a text file, leaving the script to read settings back in for enthusiasts.
 
Switching between different FW flavors

John - Any feedback in regards to using your script across different ASUS fw flavors (stock asus, merlin, tomato, etc.)?

Either save/load from say Tomato, or save from Tomato/reload into Merlin.

Thanks for all your hard work,
T.
 
John - Any feedback in regards to using your script across different ASUS fw flavors (stock asus, merlin, tomato, etc.)?

Either save/load from say Tomato, or save from Tomato/reload into Merlin.

Thanks for all your hard work,
T.

Definitely not a good idea (I put a warning note in the header in the files, next update I'll also add it to the QuickStart).

While all the firmware has a common heritage, there has been sufficient differentiation over time (custom options, maybe changing the meaning of values for the same variable) that you'll either end up with a options set that you really didn't want or randomly missing options or end up filling up nvram with useless data.

In my searches, I did find a similar utility had been written for DD-WRT, but nothing for Tomato that I found except for a couple of forum posts.
 
Is it safe to use this script and restore settings after an upgrade to 378.50 beta 1 on my RT-AC68U ?
Someone try it?
Thank you :)
 
Last edited:
I did try it. Seems to be working fine. Since this app uses common variables/settings (no hidden items), I figured it was safe.

I did the save/restore on an RT-AC87U. So far so good.

I also have ab RT-AC68. I am about to save/flash/erase nvram/restore. I will let you know how it goes.

I do suspect some new variables will need to be added to the nvram.ini.

Also, it appears that all of my scripts and files in /jffs were gone. I had a backup and have just restored them.

Be warned, backup /jffs/* before installing the new version.
 
Last edited:
I did try it. Seems to be working fine. Since this app uses common variables/settings (no hidden items), I figured it was safe.

I did the save/restore on an RT-AC87U. So far so good.

I also have ab RT-AC68. I am about to save/flash/erase nvram/restore. I will let you know how it goes.

I do suspect some new variables will need to be added to the nvram.ini.

Also, it appears that all of my scripts and files in /jffs were gone. I had a backup and have just restored them.

Be warned, backup /jffs/* before installing the new version.

Glad to hear it appears to be working.....it should be fine. Worst case if you did have a problem, you could do a factory reset, and by printing out the restore script you would have a copy of all your settings to input.

Also, note if you have the latest version of the utility, you'll also have a copy of your /jffs directory on the USB stick ready to restore (in the /jffs-yyyymmdd-macid directory).

Finally, yes there will need to be an update to support the 378 code (Merlin already gave a hint earlier)....but that will be when moving from 378 to save the new vars.
 
Status
Not open for further replies.

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!

Staff online

Top