Posted: Thu Jan 05, 2012 20:32 Post subject: Just wondering how long it takes for others ...
How long does it take for your script to run? I'm running DD-WRT v24-sp2 (12/18/09) std (SVN revision 13491M VINT Eko) on an old WRT54G/GL/GS and it took nearly five minutes to run.
Joined: 24 Feb 2009 Posts: 1929 Location: Sol System > Earth > USA > Arkansas
Posted: Fri Jan 06, 2012 1:35 Post subject: Re: Just wondering how long it takes for others ...
skanky wrote:
Is this typical?
Yes. The script reads the entire nvram to a file and then parses the file into appropriate sections. Even on faster hardware it would still take 2 to 5 minutes. Not exactly fast, but it gets the job done. _________________ E3000 21395M KongVPN K26
WRT600n v1.1 refirb mega 18767 BS K24 NEWD2 [not used]
WRT54G v2 16214 BS K24 [access point]
Try Dropbox for syncing files - get 2.5gb online for free by signing up.
Read! Peacock thread
*PLEASE* upgrade PAST v24SP1 or no support.
Posted: Fri Jan 06, 2012 15:59 Post subject: Re: Just wondering how long it takes for others ...
crashfly wrote:
skanky wrote:
Is this typical?
Yes. The script reads the entire nvram to a file and then parses the file into appropriate sections. Even on faster hardware it would still take 2 to 5 minutes. Not exactly fast, but it gets the job done.
I appreciate it, glad to know I've not done something wrong.
i know the post is kinda old, but i tried the v1.3 and it does not backup any files into the /opt/var/backups, it says it does but does not work. So i could not finialize testing.
Posted: Sun Apr 08, 2012 20:58 Post subject: Complete update across firmware
In case this helps anyone else, here's how I restored all my settings on a PPPoE Asus RT-N16 router across firmware builds - from the R14584 big build of June 2010 to the NewD2 K2.6 R18024 mega build of December 2011.
Since I have two RT-N16s in different locations I thought it was worth spending some time on it, but after playing with iMacros not that much time.
It looked like iMacros would be very labour-intensive, which didn't appeal so I decided to try to use Frater's backup and restore script with some extra work to cover every variable.
Since I'm not changing hardware I though it unlikely that the previous value of settings would conflict with the revised firmware.
I ran backupessential from a PuTTY SSH session and used WinSCP (running under Wine 1.3 in Ubuntu 11.10) to copy all four scripts from the backups directory, as well as 'all_vars' (the complete list of nvram settings) from the tmp directory.
After updating the firmware, I set up SSH (to access the router's command terminal) and jffs on the router as a minimal configuration; re-ran the backupessential script; copied the new backup scripts and all_vars to my pc.
I used BeyondCompare from Scooter Software - it's a powerful and user-friendly tool, available on a trial basis - to compare and merge the two all.sh files (named something like 485B3906348D.04092012.all.sh) to a new restore script which I called merge.sh.
There were about 12-1300 lines in total, and I found around 100 differences.
I spent some time looking at the differences as I wasn't sure what I would find, but in the end it seemed straightforward:
If the nvram setting had the same name but a different value, I took the original value.
If a setting was in the old version but wasn't in the new version, I left it out.
If a setting wasn't in the old version but was in the new version I kept it.
The jffs partition was untouched in the upgrade process but I needed to restore my merged backup file to /jffs/opt/usr/sbin/merge.sh and render it executable:
Code:
chmod +x backupessential.sh
Then I crossed my fingers and ran:
Code:
./merge.sh
After a slight delay the update finished and on going through the web-management screens all my settings had been restored. I edited a couple of new settings, ran an nvram backup from the browser and gave heartfelt thanks to Frater for his tidy script and everyone who contributed to this project.
It's possible that changes in the firmware could cause unforeseen problems and there may be a risk of 'breaking' remote management access or the LAN networking so that the router can't be accessed. In those cases the reset button should act as a get-out-of-jail card by restoring factory defaults.
I hope this helps anyone who's thinking about a backup and restore - having said that YMMV.