RJG,
thank you for taking the time to give the directions & scripts.
I followed yours & its been exactly as you stated.
I do have a couple questions.
When I do a dir of the backups directory I see 5 .sh files.
In your directions you say to restore, run the "preferred".
You also noted in the read me that with the new driver version from Kong (which I am running & plan on continuing to since for me they are solid). I would prefer NOT to have to rebuild my 4 wireless ssid's & associated configurations.
#1 Does "preferred" restore ALL settings or other than actually doing a restore, how can I tell what is & isn't restored?
#2 Can you briefly explain what each of the 5 backups does or does not restore?
#3 Does this backup script run automatically or should I run it after config changes manually?
Thank you for posting this.
So far so good.
Now I am waiting for the next Kong update that requires a reset.
_________________ Router currently owned:
Netgear R7800 - Router
Netgear R7000 - AP mode
1 - Preferred catches pretty much all usually set stuff. The only setting of mine that isn't in Frater's latest is the block filters to keep the kids off the Xbox at 6AM
Try it and see... if anything is missing for you, and if it really bugs you, try and find the settings by looking in ALL.SH , then add the relevant prefixes to VARS_PREFERRED so it backs those up next time. Be careful. The current list is verified safe, but what you add yourself is as risky as you want to make it. You likely won't find much, if anything missing though.
hint: ^wshaper means "back up anything that starts with wshaper" Read the files, the prefixes are very descriptive of what they are for.
2.
All.SH would be every setting in NVRAM. Run that and wreck stuff badly. It's there to find things that are missing as stated above.
DANGEROUS.SH is filled with settings that will BRICK a different hardware router if you run it on there.
MINIMAL will just get you going, I suppose. It doesn't have much in it.
PREFERRED is the named one you can add to, or remove things from, to customize the backup for yourself by editing vars_preferred. Put less settings in there, or more, it's up to you. Frater greatly expanded the list I originally made, it's pretty comprehensive.
Essential is a everything from ALL that doesn't fit into dangerous, would be my best description.
Really, when you reset the router to defaults, EVERYTHING that needs to be set, already gets set with defaults in the first couple minutes or so. Your "restore" script only needs to populate the custom stuff you want, to put the router back to where you had it set up before. It's to your advantage NOT to set stuff you don't need to in case the newer version uses different settings, or different variables, or BETTER defaults to fix something. Plus there's no point overwriting the values with the same ones that are likely already there. That's why I like the "PREFERRED" script. It's pretty much complete, but you can add or change what you want.
*PS - not kidding about NOTEPAD, use a not-unix friendly text editor on ANY file here and it will NOT work properly anymore. You could end up with a brick. Don't do it*
For the drivers, that's just a warning, only because it's a bit flakey right now from the transition... Keeping wl wl0 wl1 nvram settings probably won't make any difference at all, but that's a KONG question. I just didn't want to cause anyone problems in case it did. It would likely be fine though.
3.
No, it doesn't run automatically. You could set up a CRON job if you really want that, there's even a setting for CRON in the GUI under ADMIN:Management.
RjG,
Thank you for explaining the differences between the choices.
I will probably get into the variables in a month or so once I am not so busy & after I have restored to know exactly what to add for my particular build.
One more thing,
you mentioned adding a cron job in the gui & I see that.
What I am curious about, how would I go about telling the cron job to run once a week or month?
Thank you
Mike _________________ Router currently owned:
Netgear R7800 - Router
Netgear R7000 - AP mode
RjG,
I agree with Nitrus that the script & directions work great.
One last question.
When I run the back up as you suggest; does it automatically create the other backups I see listed in the backup folder? _________________ Router currently owned:
Netgear R7800 - Router
Netgear R7000 - AP mode
This script is more or less the same as before, but cleaned up, and it adds the BUILD number to the restore script FILE NAME.
So now it creates:
<RouterName>.<DDWrtBuild>.<Date>.<RestoreSet>.sh
example:
Beast.23900.07252014.essential.sh
Beast.23900.07252014.minimal.sh
Beast.23900.07252014.preferred.sh
If you have been trying to keep up with R7000 builds, you'll know why this could be handy
If you are installing this from scratch, you still need the first download. This download contains a new backup script ONLY, that would be copied to the folder containing the original one and all the supporting files and directory structure.
( To run this, you'd run "backup2" instead of "backupessential" after copying it there )
I also added my personal "PREFERRED" set, it's a lot shorter than the Frater generic one included in the first post, and has a few things I added myself.
NOTE - Finding the DD-WRT BUILD to add to the file name was not an easy thing. I got it by finding a 5 digit number in the the login prompt in /tmp/
DDVer=`egrep -o '[0-9]{5}*' /tmp/loginprompt`
That should be safe for the next 75,000 builds are so, lol
If someone has a better way, please suggest it
*********** *********** *********** *********** *********** *********** ***********
UPDATE: Do NOT download this, new busybox doesn't have egrep, see post 1 for latest version
*********** *********** *********** *********** *********** *********** ***********
Joined: 25 Dec 2010 Posts: 295 Location: Twin Cities, MN
Posted: Sat Jul 26, 2014 0:37 Post subject:
*** Optional Automated-Backup ***
this will automate RjG's new script, and run from the /opt directory..just unzip this file to /opt...
from putty-make the script executable, type:
chmod +x /opt/Backup2/BkpScript/backup2
enter this in dd-wrt webif Administration:Management:Cron:Additional Cron Jobs:
0 4 * * * root /opt/Backup2/BkpScript/backup2
this runs the script at 4am everyday..adjust as needed..
0 4 * * 0 root /opt/Backup2/BkpScript/backup2
this runs the script once a week at 4am on Sunday..adjust as needed..
[option to keep only latest files] 0 4 * * * root rm -f /opt/Backup2/backups/*
1 4 * * * root /opt/Backup2/BkpScript/backup2
this deletes all files and then runs backup2 at 4am everyday..adjust as needed..
Just installed and scheduled the script to run weekly at 4am. Thank you RjG and NiTrus! _________________ R7000 Nighthawk - DD-WRT v3.0-r50308
R7000 Nighthawk - DD-WRT v3.0-r50308
~~~~~~~~~~Dismantled for learning opportunities~~~~~~~~~~
WRT54Gv2
WRT54Gv8.2
~~~~~~~~~~Other Settings~~~~~~~~~
https://nextdns.io/?from=2d3sq39x https://pi-hole.net/ https://github.com/DNSCrypt/dnscrypt-proxy
I was looking for a way to quickly get my settings back. I have the r6300v2, which I think uses the same firmware, would there be any problem using this script on that router as well?