1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
Dismiss Notice

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!

User NVRAM Save/Restore Utility (R26.2)

Discussion in 'Asuswrt-Merlin' started by john9527, Sep 15, 2014.

  1. Alaska99

    Alaska99 Occasional Visitor

    Joined:
    Jan 26, 2013
    Messages:
    20
    Confirm it run fine on mi rt-AC68U!

    Nice and very useful script !
     
  2. john9527

    john9527 Part of the Furniture

    Joined:
    Mar 28, 2014
    Messages:
    6,096
    Location:
    United States
    Yes, you read it correctly :)

    Following the quickstart format it will make a directory on the USB stick

    /mnt/ASUS/jffs-yyyymmdd-macid

    You can then do a complete restore to that version backup by

    jffs-restore.sh jffs-yyyymmdd-macid

    for example

    jffs-restore.sh jffs-20150125-E1F2
     
  3. tsunami2311

    tsunami2311 Senior Member

    Joined:
    Apr 25, 2013
    Messages:
    454
    Nice, Got say this lil script you made to help everyone with back/restore is really great.
     
  4. THalen

    THalen New Around Here

    Joined:
    Jan 27, 2015
    Messages:
    6
    Just used the script - very easy, and worked well. However, I didn't see anywhere in the saved information where the names I've given my devices were stored. I see the MAC and IPs in the "dhcp_staticlist" list, but not the names. Is this something for a future upgrade?

    Thanks for this!
     
  5. john9527

    john9527 Part of the Furniture

    Joined:
    Mar 28, 2014
    Messages:
    6,096
    Location:
    United States
    I thought these were covered in the 'custom_clientlist' variable. If there is another variable I need to include?
     
  6. THalen

    THalen New Around Here

    Joined:
    Jan 27, 2015
    Messages:
    6
    I don't have anything for "custom_clientlist" in my nvram-restore-20150128-XXXX.sh file. Nothing matching "custom" and the only things matching "client" are for http_client, pptpd_client, and vpn_client.

    Edit: this is for an RT-N66U running stock 3.0.0.4.376_3754 firmware.
     
    Last edited: Jan 28, 2015
  7. john9527

    john9527 Part of the Furniture

    Joined:
    Mar 28, 2014
    Messages:
    6,096
    Location:
    United States
    What code level did you run the save utility on and what level did you restore to?

    Also, please run the following command....

    nvram show | grep one-of-your-custom-names

    doing the substitution of course for your custom name after you set them up.
     
    Last edited: Jan 28, 2015
  8. owine

    owine Regular Contributor

    Joined:
    Apr 22, 2013
    Messages:
    140
    My dhcp_staticlist includes the device names. Syntax is:

    <MAC>IP>Hostname<MAC>IP>Hostname
     
  9. THalen

    THalen New Around Here

    Joined:
    Jan 27, 2015
    Messages:
    6
    I'm running version 10 of the script. I only did a save, not a restore. From the ASUS web gui, I can see my custom names.

    The nvram show command tells me my custom names are in two places:
    client_info_tmp
    and
    nmp_client_list

    but neither place contains all my custom names. The client_info seems to have names derived from Windows PCs, etc... and the nmp_client_list seems to have items that I've named, plus some of the Win client names.
     
  10. RMerlin

    RMerlin Super Moderator

    Joined:
    Apr 14, 2012
    Messages:
    31,163
    Location:
    Canada
    Names entered on the DHCP reservation page will be inserted in dhcp_staticlist. Those are used as hostnames.

    Names entered on the networkmap will be in custom_clientlist. Those are only used in the networkmap display.

    So you should have everything with these two variables.
     
  11. RMerlin

    RMerlin Super Moderator

    Joined:
    Apr 14, 2012
    Messages:
    31,163
    Location:
    Canada
    Stock firmware does not allow you to enter names on the DHCP page, that's why there's no name in your dhcp_staticlist.
     
  12. THalen

    THalen New Around Here

    Joined:
    Jan 27, 2015
    Messages:
    6
    from the 'nvram show | grep custom' command, I can see that my "custom_clientlist" is blank.

    # nvram show | grep custom
    custom_clientlist=
    vpn_server1_custom=
    vpn_server2_custom=
    smbd_custom=
    vpn_client1_custom=
    vpn_client2_custom=
    vpn_client_custom=
    vpn_server_custom=


    The names that I've entered for my devices on the Network Map seem to be stored in the "nmp_client_list" variable. along with what looks to be the MAC address and some other numbers.
     
  13. john9527

    john9527 Part of the Furniture

    Joined:
    Mar 28, 2014
    Messages:
    6,096
    Location:
    United States
    Merlin confirmed what I thought to be the case, but I'll take a look at the variables you reference and see if I can figure out how/when they are being used.
     
  14. RMerlin

    RMerlin Super Moderator

    Joined:
    Apr 14, 2012
    Messages:
    31,163
    Location:
    Canada
    There's a bug in Asus's firmware where those entries are not saved to nvram, and will disappear after a reboot. That's why you can't export them from stock FW.
     
  15. 3dguru

    3dguru Occasional Visitor

    Joined:
    Mar 27, 2014
    Messages:
    44
    Location:
    Toronto
    The script does not save the Manual Media Server Path for DLNA settings...

    Thanks for your good work!
     
  16. john9527

    john9527 Part of the Furniture

    Joined:
    Mar 28, 2014
    Messages:
    6,096
    Location:
    United States
    Not sure I understand....

    the media shares are saved under dms_dir_x

    the path variable to the db directory will automatically be generated by the code, either by default or by using a minidlna script override if it exists.

    Remember, this is saving user inputs, not every parameter that may be generated by the code.
     
  17. 3dguru

    3dguru Occasional Visitor

    Joined:
    Mar 27, 2014
    Messages:
    44
    Location:
    Toronto
    It just did not restore the manual path last time I restored. I did not check the nvram value, sorry. Maybe I did something wrong, I don't know. Just wanted to inform, maybe you can reproduce.
     
  18. john9527

    john9527 Part of the Furniture

    Joined:
    Mar 28, 2014
    Messages:
    6,096
    Location:
    United States
    New version available.

    Version 11 29-January-2015
    • - add Merlin build unique variables
    • - add 374 fork unique variables
    • - added code specific restore
      • - create single merged filter maclist for 378 code
      • - delete unused variables depending on code level
    • - added Changelog and sha256 hashes in download directory
    • - minor updates to QuickStart
    • - AC3200 support not yet understood and will likely require changes
    Full Changelog is available in download directory
    nvram-save-r11.zip
    http://1drv.ms/16pENHc
    -----------------------------------------------------------------

    Enjoy!
     
  19. owine

    owine Regular Contributor

    Joined:
    Apr 22, 2013
    Messages:
    140
    Looks like the jffs restore script is hard coded for /mnt/ASUS path instead of just using ./.
     
  20. Denny

    Denny Occasional Visitor

    Joined:
    Feb 1, 2015
    Messages:
    19
    Thank you for this excellent script, I was searching something like this from a while.
    May I suggest to create a bzip2 archive at the end of the save script?
    Something like:
    Objective is to create an uniq file archive.

    Anyway, excellent work!