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.
^ Never mind, I figured it out. Thanks again, guys.
 
Where has WinSCP been all my life? I can edit files on the router using full-blown GVim instead of cruddy router vi! Woot! :D
 
It's a quirk of the SMB implementation that it doesn't see the top level directory (there may have been a workaround in one the threads, I can't quite remember). If you change the access to Guest Mode, it will then show up.

But @Martineau has the right answer....it's what I use when working on the code...I can edit things directly out of WinSCP and it stays in the right format.
What protocol should I be using?
^ Never mind, I figured it out. Thanks again, guys.
What's the solution?
 
Looking at the resulting V18 restore script, is the dhcp_staticlist gone? I thought you needed the custom list and the static list both?
 
Looking at the resulting V18 restore script, is the dhcp_staticlist gone? I thought you needed the custom list and the static list both?
Thanks for the report...when there is a number version of a variable (dhcp1_staticlist which is included in the ini) usually the base variable without the '1' is used only by the web gui. I just ran a test case for 'staticlist' and that doesn't appear to be the case here. I'll get a refresh out later today.
 
Sorry for the quick update...but thanks to @elorimer for catching my error!

User NVRAM Save/Restore Utility
LATEST RELEASE: Release 19
16-June-2015
nvram-save-r19.zip
Download http://1drv.ms/16pENHc
===============================
Release 19 (16-June-2015)
INI file Changes

  • Fix overzealous ini cleanup of dhpc_, lan_ vars in last update
  • Add new Merlin jffs2_enable var
 
Hi Guys

I have been trying to get this script to run as a cron job and keep running into a specific issue.

Cron is created via /jffs/scripts/services-start, with the following:

/usr/sbin/cru a Backup "45 14 * * * /mnt/ASUS/backup/nvram-save.sh"

Now the issue that I seem to be having is it is not seeing, or finding, the nvram-merlin.ini file, although all files are within the same folder.

The syslog outputs the following when running the cron job:

Jul 2 14:45:02 nvram-save.sh: NVRAM User Save Utility - Version 19
Jul 2 14:45:02 nvram-save.sh: NVRAM variable file not found: nvram-merlin.ini


Can someone point me in the right direction in solving this issue, if at all possible.

Thanks for your expert advice.
 
Things may be getting confused....the 'backup' folder has a special meaning in the program to only hold the generated data files as a subfolder to the folder with the executables.

Normal setup would be
/mnt/ASUS = all .sh files and the ini
/mnt/ASUS/backup = the generated save files

So, if you want everything in one folder, put everything in /mnt/ASUS (or any folder name that you would like, the scripts should be smart enough to run from any parent folder....except one named backup.
 
Thanks for your reply John

I moved the files as suggested and changed the cron job to reflect the changes:

/mnt/ASUS = all .sh files + the ini

Cron job now is as follows:

/usr/sbin/cru a Backup "30 15 * * * /mnt/ASUS/nvram-save.sh"

Now I am still seeing the same issue:

Jul 2 15:30:01 nvram-save.sh: NVRAM User Save Utility - Version 19
Jul 2 15:30:02 nvram-save.sh: Saving settings from firmware 378.55_alpha2-gb735668
Jul 2 15:30:02 nvram-save.sh: NVRAM variable file not found: nvram-merlin.ini


19338947572_2b7091b148_o.png

The cron is running, but the script seems to not be running because it cannot see the ini file, although it is on the USB root folder with all the .sh files.

19318897706_9cd72ce375_o.png


As you can see, I am testing the alpha version of merlins firmware, would you think this would be the issue?
 
Sorry for the fire drill.....you could move all the code to another folder, but it didn't handle being executed when it wasn't in the current working directory. I've attached an updated script (rename it from .sh.txt to just .sh and replace your current version). I'll put this change in the next release, as well as make the same change for the rest of the scripts.
 

Attachments

  • nvram-save.sh.txt
    11.8 KB · Views: 428
Sorry for the fire drill.....you could move all the code to another folder, but it didn't handle being executed when it wasn't in the current working directory. I've attached an updated script (rename it from .sh.txt to just .sh and replace your current version). I'll put this change in the next release, as well as make the same change for the rest of the scripts.

Thanks John

I shall try this later today when I get home.
 
Sorry for the fire drill.....you could move all the code to another folder, but it didn't handle being executed when it wasn't in the current working directory. I've attached an updated script (rename it from .sh.txt to just .sh and replace your current version). I'll put this change in the next release, as well as make the same change for the rest of the scripts.

Works perfectly, Thanks.

P.S: I should also mention, I am running an AC68U, and had to dial back the OC to 800,666 or it would just hang with WAN/LAN and power lights on (all other lights OFF), after dialing it back to 800,666 I don't have any issue's running the scripts, so you may want to edit the OP with this info, just incase it effects other users?
 
Last edited:
Works perfectly, Thanks.

P.S: I should also mention, I am running an AC68U, and had to dial back the OC to 800,666 or it would just hang with WAN/LAN and power lights on (all other lights OFF), after dialing it back to 800,666 I don't have any issue's running the scripts, so you may want to edit the OP with this info, just incase it effects other users?
Don't know what to say about that one....I run AC68 overclocked to 1200,800 and have never run into a problem with the scripts. I'd keep an eye out for any strange behavior during normal running...some routers just can't be overclocked successfully.
 
Don't know what to say about that one....I run AC68 overclocked to 1200,800 and have never run into a problem with the scripts. I'd keep an eye out for any strange behavior during normal running...some routers just can't be overclocked successfully.

Yeah I find it very strange.

Only because it has been OC'd (1200,800) for months (in fact I believe I OC'd it the day I purchased it, so it would be longer than 12 months ago??), and have had no issue's with it ever - until I put some scripts onto it, so I have solved both issue's here (well credit goes to yourself for this script and the cron issue), just thought I would let you know, in case someone else comes up with the 3 lights ONLY issue (WAN/LAN/Power).

I had gone through all the usual rule out everything first, because I had recently put everything onto a USB 3.0 flash drive, so I removed the 3.0 and put the scripts onto a 2.0, same problem, if I removed the USB flash altogether the issue disappeared. Finally narrowing down to the OC, and when I dialed it back, it could survive a reboot just fine (after the initial reboot from restoring the settings, and the manual reboot after restoring jffs), any reboots after that, it would suffer from the WAN/LAN/Power light issue.

Now it is not OC'd and back at 800,666 I have no issue's at all, and I dont have the 3 lights issue after rebooting. So all is good.

Like you say, some routers just can't handle OC'ing, and mine would be one of them. This is no issue to me at all, it's not really gaining anything by the OC, so it is not bothering me in the slightest.

Just want to personally say Thanks, this script saves me so much time, if it was not for this script, I would be working on my router for a day or two after every update.
 
Last edited:
Works perfectly, Thanks.
P.S: I should also mention, I am running an AC68U, and had to dial back the OC to 800,666 or it would just hang with WAN/LAN and power lights on (all other lights OFF), after dialing it back to 800,666 I don't have any issue's running the scripts, so you may want to edit the OP with this info, just incase it effects other users?
Hi,

Some AC68U have issues to overclock the RAM above 666 MHz (incl. mine). :eek:
I have now CPU on 1200 MHz without problems. But increasing RAM clock leads to stability issues. :rolleyes:

With kind regards
Joe :cool:
 
Hopefully I have understood correctly and its OK to post a new question about the nvram utility here; if not, would appreciate a sign post. Thanks to the dev who came up with this nifty utility.

Like other posters, I am hoping this utility will lower my barrier to staying up to date with the wonderful Merlin firmware. My problem is that I seem to be getting a slew of permission errors both before and after changing the admin user ID to "admin". So am I alone in seeing these errors? Is the process working anyway and I can carry on with reasonable confidence that the restore will work?

Output from router putty session showing the errors is below.

Thanks and regards,
Chris

login as: admin
admin@192.168.5.1's password:

Setup utility=============================================================
ASUSWRT-Merlin RT-AC66U_3.0.0.4 Thu Nov 20 18:58:35 UTC 2014
admin@RT-AC66U:/tmp/home/root# ls
admin@RT-AC66U:/tmp/home/root# cd /mnt/ASUS
admin@RT-AC66U:/tmp/mnt/ASUS# ls
QuickStart-linux.txt nvram-excp-merlin.sh nvram-sample.ini
QuickStart-win.txt nvram-merlin.ini nvram-save.sh
jffs-restore.sh nvram-restore.sh
admin@RT-AC66U:/tmp/mnt/ASUS# chmod 755 ./*.sh
chmod: ./jffs-restore.sh: Operation not permitted
chmod: ./nvram-excp-merlin.sh: Operation not permitted
chmod: ./nvram-restore.sh: Operation not permitted
chmod: ./nvram-save.sh: Operation not permitted

Run backup================================================================
admin@RT-AC66U:/tmp/mnt/ASUS# ./nvram-save.sh

nvram-save.sh: NVRAM User Save Utility - Version 19
nvram-save.sh: Saving settings from firmware 376.48_3
nvram-save.sh: Using standard NVRAM variable file: nvram-merlin.ini
nvram-save.sh: Running in Backup Mode
chmod: /mnt/ASUS/nvram-all-20150715-0870.txt: Operation not permitted

Saving [System - Basic]
Saving [System - Miscellaneous]
Saving [Switch Control]
Saving [NAT Passthrough]
Saving [TCP/UDP Settings]
Saving [Port Forwards]
Saving [Port Triggers]
Saving [Static Routing]
Saving [MAC Filters]
Saving [IPv6 Settings]
Saving [Wireless Configuration - General]
Saving [Wireless Configuration - Professional]
Saving [Guest Network]
Saving [Firewall Settings]
Saving [VPN Server]
Saving [VPN Client]
Saving [Media Server]
Saving [SAMBA Settings]
Saving [FTP Settings]
Saving [NFS Settings]
Saving [DNS Filters]
Saving [Parental Controls]
Saving [IPTV Settings]
Saving [DDNS Settings]
Saving [LAN Configuration]
Saving [DHCP Settings]
Saving [WAN Configuration]
Saving [USB Modem]
Saving [Dual WAN Settings]
Saving [QOS Settings]
Saving [AICloud settings]
Saving [SNMP settings]
Saving [TOR VPN]
Saving [TrendMicro module]
Saving [Astrill VPN settings]
chmod: /mnt/ASUS/nvram-usr-20150715-0870.txt: Operation not permitted
chmod: /mnt/ASUS/nvram-restore-20150715-0870.sh: Operation not permitted

nvram-save.sh: Complete: User NVRAM saved to /mnt/ASUS/nvram-restore-20150715-08 70.sh

cp: can't preserve permissions of '/mnt/ASUS/jffs-20150715-0870/./configs': Oper ation not permitted
cp: can't preserve permissions of '/mnt/ASUS/jffs-20150715-0870/./configs': Oper ation not permitted
cp: can't preserve permissions of '/mnt/ASUS/jffs-20150715-0870/./syslog.log-1': Operation not permitted
cp: can't preserve permissions of '/mnt/ASUS/jffs-20150715-0870/./scripts': Oper ation not permitted
cp: can't preserve permissions of '/mnt/ASUS/jffs-20150715-0870/./scripts': Oper ation not permitted
cp: can't preserve permissions of '/mnt/ASUS/jffs-20150715-0870/./syslog.log': O peration not permitted
cp: can't preserve permissions of '/mnt/ASUS/jffs-20150715-0870/.': Operation no t permitted
nvram-save.sh: Complete: JFFS directory saved to /mnt/ASUS/jffs-20150715-0870

admin@RT-AC66U:/tmp/mnt/ASUS#
 
My problem is that I seem to be getting a slew of permission errors both before and after changing the admin user ID to "admin".
You are in the right place :)

Haven't seen this one before. You mention 'changing the userid to admin'....did you copy the program files over where the admin username was changed to something else?

Please post the output of

ls -l /mnt/ASUS (those are small letter 'L')

so we can see the owner and group of the files.
 
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