I may have a more robust solution though. I did a proof of concept for something similar to the nvram backup and restore utility. nvram parms that you want to back up are listed in a file. For example:
Code:dhcp1_dns1_x dhcp1_enable_x dhcp1_end dhcp1_gateway_x dhcp1_lease dhcp1_start dhcp1_static_x dhcp1_staticlist dhcp1_wins_x dhcp_dns1_x dhcp_dns2_x dhcp_enable_x dhcp_end dhcp_gateway_x dhcp_hostnames <snip>
The script will then read file line by line which contains the names of the nvram parms and save the nvram settings to a backup file. Similarly for a restore, it will read the backup file line by line and restore the settings. It is nothing as robust as the backup and restore utility though but it should work. Also, there will need to be handling for HND routers because of the way it stores some nvram variables to /jffs/nvarm folder.
cd /mnt/ASUS
./save-mynvram.sh dhcp_static_x dhcp_start dhcp_end dhcp_staticlist custom_clientlist wan0_upnp_enable misc_ping_x dms_enable enable_samba wollist wrs_protect_enable wrs_cc_enable wrs_vp_enable wrs_mals_enable
Saving dhcp_static_x
Saving dhcp_start
Saving dhcp_end
Saving dhcp_staticlist
Saving custom_clientlist
Saving wan0_upnp_enable
Saving misc_ping_x
Saving dms_enable
Saving enable_samba
Saving wollist
Saving wrs_protect_enable
Saving wrs_cc_enable
Saving wrs_vp_enable
Saving wrs_mals_enable
Backing up previous restore script to /tmp/mnt/ASUS/restore-mynvram.sh.bak
Saved 14 NVRAM variable(s)
Run /tmp/mnt/ASUS/restore-mynvram.sh to restore your saved settings
DHCP: dhcp_static_x dhcp_start dhcp_end dhcp_staticlist
ClientList: custom_clientlist
Enable UPnP: wan0_upnp_enable
Firewall WAN ICMP Ping: misc_ping_x
USB Media Server: dms_enable enable_samba
Wake-On-LAN: wollist
AiProtection: wrs_protect_enable
-InfectedDev Prevent&Block: wrs_cc_enable
-Two-Way IPS: wrs_vp_enable
-Malicious Sites Blocking: wrs_mals_enable
cp /tmp/mnt/ASUS/backup/jffs-2018mmddtttt-0000/usericon/*.* /jffs/usericon
yesDo this instructions work in the new beta3 release?
@Xentrik Thanks so much for creating this time saver! Just used v.2.0.5 to mostly great success, except i've noted what appears to be an issue which the script or instructions might need to consider (unless i've just missed this convo somewhere...).
After successfully loading all of my migrated hosts from a prior router, it appeared all went well. Everything looked good until I noticed failures on the network resolving to many of the newly added hosts. Odd thing was that some resolved, others didn't.
With some testing, it appears (to me) that though the the dhcp_staticlist and dhcp_hostnames populate the GUI correctly, the / etc / hosts.dnsmasq file does not get populated with these "back-ended" entries. I noted this as the only hosts which were resolving were ones that I subsequently edited via the GUI.
Is there a method to trigger a rebuild of / etc / hosts.dnsmasq? For now, I am just forcing it to populate by clicking edit / add for each entry on the LAN / DHCP Reservations screen.
Run the command:Is there a method to trigger a rebuild of / etc / hosts.dnsmasq? For now, I am just forcing it to populate by clicking edit / add for each entry on the LAN / DHCP Reservations screen.
service restart_dnsmasq
The utility will be retired soon as I have been working on updates to the NVRAM Backup/Restore Utility. It will be ready very soon.Hope we can get this added to amtm in the future. Great lil tool to use and very handy!!!
[3] - Preview dhcp_staticlist and dhcp_hostnames in dnsmasq format
[4] - Append dhcp_staticlist and dhcp_hostnames to dnsmasq.conf.add & Disable DHCP Manual Assignment
I would appreciate it if you can test the new version of the nvram-save-restore-utility and provide feedback.This was super helpful when setting up my router from scratch. Thanks!
Do you have something similar for setting up names in the network map?
Going to give that a try.I would appreciate it if you can test the new version of the nvram-save-restore-utility and provide feedback.
You will only see the update option 2 if a newer version of the menu exists on GitHub. If the version is the same, the option does not appear. I'll be adding an option to check the project folder for updates like I have on the x3mRouting menu soon.Going to give that a try.
First observation: after installation I only have option 1 (install); no option 2 (update).
Best practice is to use a partition on the USB drive that is dedicated for the utility. You have to create the partition in advance of using the installer. The installer displays a list of available partitions on the USB drive for the user to select from.Feedback on the installer:
I don't like it that several files (and a single folder) end up in the root of my flash drive.
I would appreciate it if all files/folders from the utility would be stored within a single folder on the root (suggestion: "nvram"), like we have "entware" and "skynet" folders.
[1] Install NVRAM Save/Restore Utility
[e] Exit Script
Option ==> 1
Looking For Available Partitions
[1] --> /tmp/mnt/AC88U - (/dev/sda7)
[2] --> /tmp/mnt/skynet - (/dev/sda8)
[3] --> /tmp/mnt/absolution - (/dev/sda1)
[4] --> /tmp/mnt/entware - (/dev/sda5)
[5] --> /tmp/mnt/RT-AC88U-MYROUTER - (/dev/sda6)
[6] --> /tmp/mnt/swap - (/dev/sda9)
Please Enter Partition Number Or e To Exit
[0-6]:
AB-Solution is dead my friend, let it rest in peace.Best practice is to use a partition on the USB drive that is dedicated for the utility. You have to create the partition in advance of using the installer. The installer displays a list of available partitions on the USB drive for the user to select from.
Code:[1] Install NVRAM Save/Restore Utility [e] Exit Script Option ==> 1 Looking For Available Partitions [1] --> /tmp/mnt/AC88U - (/dev/sda7) [2] --> /tmp/mnt/skynet - (/dev/sda8) [3] --> /tmp/mnt/absolution - (/dev/sda1) [4] --> /tmp/mnt/entware - (/dev/sda5) [5] --> /tmp/mnt/RT-AC88U-MYROUTER - (/dev/sda6) [6] --> /tmp/mnt/swap - (/dev/sda9) Please Enter Partition Number Or e To Exit [0-6]:
Welcome To SNBForums
SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.
If you'd like to post a question, simply register and have at it!
While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!