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.
Trying to migrate from one RT-AC68U to another. On telneting the command
./nvram-restore.sh to the recipient router with the usb stick plugged in, I get:

"no restore scripts found for MAC:C760. Exiting - Restore aborted"


I looked in the nvram-util.log and found:


nvram-save.sh 201704011159-2190 Sat Apr 1 12:02:04 DST 2017 378.55_0 #Version=24a
jffs-save 201704011159-2190 Sat Apr 1 12:02:05 DST 2017
nvram-save.sh 201705170415-MIGR Wed May 17 04:18:11 DST 2017 378.55_0 #Version=24a
jffs-save 201705170415-MIGR Wed May 17 04:18:12 DST 2017
nvram-save.sh 201705170423-2190 Wed May 17 04:26:10 DST 2017 378.55_0 #Version=24a
jffs-save 201705170423-2190 Wed May 17 04:26:11 DST 2017

And on the usb stick I see, amongst some 15 or more files, an nvram-restore.sh file at 4kb


I assume I should reformat the stick and start again making a new backup?

Any ideas where I fouled up!?

Thanks

Martin
You need to check your backup dir, you will need to execute the MIG script. Will be a full script name like nvram-restore-201708160017-MIGR.sh

OOPS, didn't realize there was a whole page "31" here.
 
Thank you John9527, PolarBear and cybrnook. Having read all your comments, the instructions in the QuickStart guide fell into place for me, and I succesfully migrated to a different RT-AC68U. Hours of manual work saved. Many thanks.
 
Thanks for the reply!
As far as I know the RT-3100 has only one revision, but I read on the forum that the latest routers have a newer chipset. Not sure if it affects the "Nvram backup" or not. That is why asked this question in the first place.

There are at least two

Hw revision a2 and a5


Sent from my iPhone using Tapatalk
 
@ColinTaylor : He didn't say to replace. Maybe a media bridge? I wish I could afford another one even though I live in a small flat so don't think I need it. Now I am curious. @martinr : post #607 per favore.
 
@martinr Any particular reason for getting a new RT-AC68U to replace to old one?

@ColinTaylor : He didn't say to replace. Maybe a media bridge? I wish I could afford another one even though I live in a small flat so don't think I need it. Now I am curious. @martinr : post #607 per favore.


@ColinTaylor. So sorry: you went to the trouble of explaining how to do this @.... stuff, and then I don't take any notice of the alerts. So I only just noticed your post whilst trawling through recent posts.

It's really quite mundane: I was still stuck on 378.55, I'm ashamed to say, and the longer I put off updating, the more I fretted over making a mess of the update. So I kept a look out for ages on ebay for a cheap second-hand RT-AC68U to update whilst keeping my original stood by in case things went wrong. And I figured I could always use it as a wireless access point to replace the Linksys one I have running DD-WRT, which never gets updated.

In the end, the update went very well, thanks to John's utility, which I used fir the first time with a bit of trepidation. The only minor glitch was my not realising that an Asuscomm.com DDNS address is specific to a MAC address, and so cannot successfully be migrated between routers. (Merlin put me right on that.)

In future, I'll stay current with updates so it'll become second nature, let alone a lot more secure.

@scooby, media bridge? No, I don't even know what that is, but you've prompted me to go and find out.
 
Last edited:
Next release is out! Includes fixes/changes for user feedback and updates for the latest firmware releases.

LATEST RELEASE: Release 26.0
1-September-2017
nvram-save-r26.0.zip
Download http://bit.ly/2aaAySO
===============================

Version 26.0 Highlights (Full Changelog history is available in the download directory)

Program Changes
  • Change version numbering scheme - @dvohwinkel
  • Warn when current router MAC does not match latest save MAC instead of aborting - @martinr
  • Improve checking for ability to do a migrate restore from a full save
    NOTE: With this change, you must have done a full save on R26.0 or later to also do a migration restore from the same file. If a migration restore is not possible, a message will be displayed during the nvram-restore. It is recommended to do a full save after installing R26.0 if you wish to use this option.
INI file Changes
  • Sync with Merlin 380.68 and Fork V27 release
  • Force save a transient QoS var not present after a factory reset - @ColinTaylor, @cybrnook
  • Fix FTP enabled state after a restore - @ColinTaylor
 
Glad about the Mac change as it took me a while to figure it out swapping routers.

Sent from my SM-G920F using Tapatalk
 
@john9527 : how long does it usually take to finish the backup process? I ran your script and it's still working after like 10 minutes. Should I continue waiting? Thanks!

Edit: I don't have either a jffs partition or a custom script

VIyOW7s.png
 
Last edited:
@john9527 : how long does it usually take to finish the backup process? I ran your script and it's still working after like 10 minutes. Should I continue waiting? Thanks!

Edit: I don't have either a jffs partition or a custom script

That does seem excessive.....I just did some timings on my fork.
AC68P heavily configured: 1 min 58 sec (Sandisk UltraFit USB3, 64M, NTFS)
N66R minimally configured: 1 min 51 sec (Sandisk Fit, USB2, 16M, NTFS)

Now, Merlin (and ASUS OEM) carries a lot more nvram settings, especially since I include setting for things that haven't been fully implemented yet as a 'just in case' for the future. I wouldn't be surprised to see numbers in the 5 min range for those builds.

What are you running from? Stick or HDD? What format?
 
Edit: I don't have either a jffs partition or a custom script

If I recall correctly (link), each Asuswrt build (and therefore also the ones by @RMerlin) has a jffs partition by default, as it needs it for the router to operate.

Now, Merlin (and ASUS OEM) carries a lot more nvram settings, especially since I include setting for things that haven't been fully implemented yet as a 'just in case' for the future. I wouldn't be surprised to see numbers in the 5 min range for those builds.

I just timed my backup (RT-AC68U rev E1 @ 1 Ghz, USB 3.0 Kingston Datatraveler 64 Gb, formatted as ext4) and it took 02:32,15 (to be exact ;) )

I don't have a minimal install, not very heavily configured either, I think. Ihave AB-Solution with Pixelsrv-TLS, Skynet, Dnscrypt, Fresh_JR QOS, speedtest-cli, NTPd and several entware packages (mc, htop, ncdu, openssh-sftp-server, python and rrdtool) installed currently.

Could it be that if you deleted the jffs partition (if that's even possible), @john9527's nvram-save.sh 'hangs' trying to make a backup of it?
 
Could it be that if you deleted the jffs partition (if that's even possible), @john9527's nvram-save.sh 'hangs' trying to make a backup of it?
Good thought....but on my fork it's possible to disable the jffs partition, so I check for the existence of /jffs before the backup.

After the last message that @rtn66uftw had in his post.....there are only a couple of things left
- update the runlog (nvram-util.log) with the run info
- backup jffs if it exists
- run a user exit script if it exists (nvram-user.sh) - Did you ever create one of these?
 
Good thought....but on my fork it's possible to disable the jffs partition, so I check for the existence of /jffs before the backup.

Okay, that's great (and I could have known it, knowing a bit of how you code by now ;)), but looking at the first lines of his output of nvram-save he is on 380.66_0, which (to my best knowledge) can't live without jffs, so I'm still curious how he pulled that off.

I just checked, my backup is around 7,5 Mb, including jffs partition, of which 5,7 Mb is being used for traffic.db, so am I right that the script 'hangs' at some point (like the ones you mentioned above)? I can hardly imagine that it's still running after 10 minutes, to be honest.
 
If I recall correctly (link), each Asuswrt build (and therefore also the ones by @RMerlin) has a jffs partition by default, as it needs it for the router to operate.



I just timed my backup (RT-AC68U rev E1 @ 1 Ghz, USB 3.0 Kingston Datatraveler 64 Gb, formatted as ext4) and it took 02:32,15 (to be exact ;) )

I don't have a minimal install, not very heavily configured either, I think. Ihave AB-Solution with Pixelsrv-TLS, Skynet, Dnscrypt, Fresh_JR QOS, speedtest-cli, NTPd and several entware packages (mc, htop, ncdu, openssh-sftp-server, python and rrdtool) installed currently.

Could it be that if you deleted the jffs partition (if that's even possible), @john9527's nvram-save.sh 'hangs' trying to make a backup of it?

Thanks! I do have jffs partition but it was empty.

That does seem excessive.....I just did some timings on my fork.
AC68P heavily configured: 1 min 58 sec (Sandisk UltraFit USB3, 64M, NTFS)
N66R minimally configured: 1 min 51 sec (Sandisk Fit, USB2, 16M, NTFS)

Now, Merlin (and ASUS OEM) carries a lot more nvram settings, especially since I include setting for things that haven't been fully implemented yet as a 'just in case' for the future. I wouldn't be surprised to see numbers in the 5 min range for those builds.

What are you running from? Stick or HDD? What format?

Thanks John! I used a 2.0 USB stick on FAT32. After waiting for more than 30mins, I used Ctrl + C to get out as I couldn't take it anymore J

I then tried your script on a AC68U router with another 2.0 USB stick (FAT32) and it only took about 2 minutes or so for backing up. However after factory reset, firmware update, & factory reset again, all the files on the USB had only symbols ŷŷŷŷŷŷŷŷŷŷŷŷŷŷŷŷŷŷŷŷŷŷŷŷŷŷ in them (I didn't unplug the USB at any point). Luckily I had copied all the files back to my laptop before. Formatting the USB to NTFS and run nvram-restore.sh brought things back to normal.
 
Glad to hear you worked it out @rtn66uftw. Might be worth to check the USB drive thoroughly to make sure it's actually 'clean' and won't cause any more issues. As for the filesystem you used to format it, both NTFS and Ext4 are 'journalling' filesystems, (which keep track of what happens on the drive, so in case of emergency they're more likely to be repaired for example), both with their own advantages. I prefer Ext4 as it is a linux filesystem and our routers are as well completely Linux-based (and I'm more of Linux kinda guy anyway). However, NTFS will do just fine, especially if you want or need easy access from a Windows pc or laptop. Just make sure the drive is in good health, as a backup written to a malfunctioning (thumb-)drive is of no use to anyone.
 
I then tried your script on a AC68U router with another 2.0 USB stick (FAT32)
Just to double check, I reformatted my USB2 FIT to FAT32 and ran a backup/restore without any problems. Don't know why you would have had a problem unless something was corrupted on the stick to start with.
 
I previously used FAT32 and NTFS formatted drives too for nvram-save, never had a problem. Given the fact that it works now after reformatting, I think you're right on some kind of corruption on the filesystem. I would definitely recommend a surface scan to make sure you're not backing up to a faulty drive.
 
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