Uploaded a new version (April 22nd) that adds EDDUP_TARGET_PARTITION support to easyddup.ini (see easyddup.ini.sample for details).
I do not have a router with multiple partitions so I can't test this. If you look at the code for write, it seems that it ignores the target partition argument and intelligently/automatically alternates between linux and linux2 so it should work.
WARNING: Enable at own risk (it's disabled by default). Users experienced with more than one firmware partition can chime in.
Posted: Wed Apr 28, 2021 18:05 Post subject: Can I use this to compare settings between 2 NVram bkups?
Looking at this mainly focusing updates but I have been trying to find a way to compare 2 NVram backup bin files.
Can I load this up and simply output the INI files to compare settings between 2 build numbers? When I tried this with CSV conversion the settings were in different locations and could not be compared easily. I'm assuming a settings INI backup from build XYZ will have settings in your INI in a different location than Build ZWB? OR does your app standardize the ini settings backup across brainslayer builds?
With the hundreds of router model, router revision, distribution type, kernel combinations; that approach will become a maintenance nightmare. As I stated earlier, I use the community build and thus don't install/upgrade with easyddup so my maintenance contributions to easyddup are and will remain minimal.
If someone creates a gitlab project (@rkboni used gitlab on the community build) I'll link to it in the OP and development would continue there. Keep in mind that enthusiasm wanes and projects become abandonned (e.g. @al_c and yamon, @rkboni is no longer active on the community build...).
First of thanks for this script, appreciate efforts. Second is there by any chance to use in 4/32 or 8/32 router where no USB support? _________________ >>TP-Link TL-WR841ND v9
>>DD-WRT v3.0-r43397 std (06/13/20)
>>TP-Link TL-WR841ND v9
>>DD-WRT v3.0-r45735 std (02/11/21)
@00diabolic: Read QuickStart.txt which is all about the nvram-save tool. IONK wrote the included cleanupCB.sh which removes duplicate nvram backups to save USB storage space. He was able to ignore start_time and end_time variables which change on every reboot. You could look at his code. As mentioned in the OP, nvram-dd-wrt.ini needs to be augmented to store all the settings you care about. A nvram-restore script gets generated to perform the actual restore. I ported nvram-save to dd-wrt but didn't write it (see link in OP).
@SuninderSingh: Unfortunately you need a USB port. BS could theoretically include a USB-less stripped down "easyddup light" in official builds but I wouldn't hold my breath.
@cjnaz I briefly saw your post and this is exactly the kind of help I was asking for in the OP. The nvram-save tool (see QuickStart.txt) is a mature utility that was ported from another project but nvram-dd-wrt.ini needs some variable additions to cover all the user settings you care about in dd-wrt.
To find out a setting's variable name, for example if I'm searching for a gateway related setting:
nvram show | grep gateway
and find the variable name is lan_gateway (whatever precedes the equal sign). Then you confirm you're looking at the correct variable by changing the setting in the GUI, click Save (not Apply Settings) and observe the variable again to see if it changed.
nvram get lan_gateway
Then change the setting back in the GUI to what you like and save again. Some variable names are less obvious and will require some trial and error to identify. If you share your variable additions, I'll add them to the nvram-dd-wrt.ini in the tar distribution.
@kernel-panic69: If people only care about the upgrade/downgrade easyddup features then you're right nvram variable stuff does not apply. The nvram-save utility is called by easyddup if you want to create/use a settings restore point. If people help set up nvram-dd-wrt.ini properly, then the error prone/tedious task of manually re-entering settings in the GUI would almost be a thing of the past.
Ok, so per the HELP NEEDED in the OP, below I list several NVRAM vars that I've added to my local nvram-dd-wrt.ini file, as the OP suggests. I cannot get the DDNS and Guest WiFi settings to work.
My home router setup has a few differences from the baseline setup of this tool. My "Custom" DDNS setup has ddns_enable="5". I added these vars to the .ini file and the webUI looks correct but the ddns log shows "DYNDNS Server response: HTTP/1.1 404 Not Found". Vars added:
My setup also has a guest WiFi wl0.1 that is isolated from my LAN (per https://wiki.dd-wrt.com/wiki/index.php/Guest_WiFi_%2B_abuse_control_for_beginners). After the restore, connections to the Guest network apparently cannot get a DHCP IP issued, per the syslog: "Jun 13 16:06:34 Router daemon.warn dnsmasq-dhcp: no address range available for DHCP request via wl0.1". Again, I don't see anything misplaced in the webUI.
There must be a variable different between the nvram-all from your working setup and the restored non-working nvram-all variables.
You tried rebooting the router right? I don't trust "Apply Settings" in all cases.
For DDNS your variable additions seem good for the case 5 code. All the DDNS variables are listed here but you probably only want to mess with the GUI settings related ones. You could look at what the code is doing when that error message is produced.
If all the GUI settings look right then you're almost there...