Backup settings and restore them to even different hardware.

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware
Goto page Previous  1, 2, 3 ... 20, 21, 22
Author Message
Apex-XT
DD-WRT Novice


Joined: 12 Dec 2008
Posts: 23

PostPosted: Tue Jul 05, 2011 15:22    Post subject: Reply with quote
I'm very interested in applying this as a service using the CLI as part of the OTRW setup. Any progress on integrating this into OTRW?

Thank you for the good work.
Sponsor
basmaf
DD-WRT Guru


Joined: 24 Feb 2011
Posts: 1043

PostPosted: Wed Jul 06, 2011 20:47    Post subject: Reply with quote
You can already use it if you want, backup script work exactly the same as backupessential included in OTRW.

Use instructions in this post
http://www.dd-wrt.com/phpBB2/viewtopic.php?p=615958#615958

Use version 1.2
Take note of comments i made about moving your existing backups.
Apex-XT
DD-WRT Novice


Joined: 12 Dec 2008
Posts: 23

PostPosted: Thu Jul 07, 2011 13:04    Post subject: Reply with quote
Thank you!
ghatothkach
DD-WRT Novice


Joined: 03 Jan 2009
Posts: 25

PostPosted: Thu Jul 21, 2011 19:07    Post subject: Reply with quote
hi

Is there a way to run this script automatically from

/jffs/

??

I will probably like to have a local /jffs/ backup, and scp out the backup using another computer.

Ghat
alexandrnew
DD-WRT User


Joined: 21 Oct 2010
Posts: 75

PostPosted: Sat Nov 12, 2011 7:36    Post subject: Reply with quote
basmaf wrote:
Your router is based on an Atheros chip.
Not familiar with those routers but have the feeling that it has limited functions within OS

Seen in the optware script the atheros is not supported probably cause its missing functions. like tee and sort

Check the atheros forum for more info.

I also atheros device.
i not find backup script in atheros forum.
help me please
skanky
DD-WRT Novice


Joined: 27 Nov 2011
Posts: 3

PostPosted: Thu Jan 05, 2012 20:32    Post subject: Just wondering how long it takes for others ... Reply with quote
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.

Is this typical?

Thanks &
Cheers,

Toby
crashfly
DD-WRT Guru


Joined: 24 Feb 2009
Posts: 2025
Location: Sol System > Earth > USA > Arkansas

PostPosted: Fri Jan 06, 2012 1:35    Post subject: Re: Just wondering how long it takes for others ... Reply with quote
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 22200M 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.
skanky
DD-WRT Novice


Joined: 27 Nov 2011
Posts: 3

PostPosted: Fri Jan 06, 2012 15:59    Post subject: Re: Just wondering how long it takes for others ... Reply with quote
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.
rocky13
DD-WRT User


Joined: 25 Apr 2008
Posts: 117

PostPosted: Fri Mar 09, 2012 4:28    Post subject: Reply with quote
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.

v1.2 works for the backup part of it.
basmaf
DD-WRT Guru


Joined: 24 Feb 2011
Posts: 1043

PostPosted: Fri Mar 09, 2012 5:28    Post subject: Reply with quote
Just use version 1.2

i created 1.3 for testing with additonal variables for pppoe in the minimal script.


BM..
jrussell88
DD-WRT Novice


Joined: 01 May 2009
Posts: 47

PostPosted: Sun Apr 08, 2012 20:58    Post subject: Complete update across firmware Reply with quote
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 downloaded the backupessentials script from:
Code:
wget -O /opt/usr/sbin/backupessential http://wd.mirmana.com/backupessential
# wget -O /opt/usr/sbin/vars_to_skip http://wd.mirmana.com/vars_to_skip
# wget -O /opt/usr/sbin/vars_to_include http://wd.mirmana.com/vars_to_include
# wget -O /opt/usr/sbin/vars_preferred http://wd.mirmana.com/vars_preferred


There are some differences between the wiki version and this - the download seems to be slightly improved and more nvram settings are listed.

As I'm not running optware I set up an equivalent directory structure under /jffs:
Code:
mkdir /jffs/opt
mkdir /jffs/opt/tmp
mkdir /jffs/opt/usr
mkdir /jffs/opt/usr/sbin
mkdir /jffs/opt/var
mkdir /jffs/opt/var/backups
and changed the two setup variables in the backupessential.sh script to point to the jffs directories:
Code:
FOLDER=/jffs/opt/var/backups
VARFILE=/jffs/opt/tmp/all_vars

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.
unlucky1
DD-WRT Novice


Joined: 09 Mar 2013
Posts: 40

PostPosted: Mon Sep 02, 2013 4:03    Post subject: Re: Complete update across firmware Reply with quote
jrussell88 wrote:

# wget -O /opt/usr/sbin/vars_to_skip http://wd.mirmana.com/vars_to_skip
# wget -O /opt/usr/sbin/vars_to_include http://wd.mirmana.com/vars_to_include
# wget -O /opt/usr/sbin/vars_preferred http://wd.mirmana.com/vars_preferred
[/code]


So, can anyone tell me if I use this script:http://www.dd-wrt.com/phpBB2/viewtopic.php?p=460679#460679
and add the above files, will it work with an Atheros router?

And yes, I know this is a Broadcom thread. Should I reopost in the Atheros forum?

Edit: I thought about this for another 15 minutes and am guessing it might work or only partially work due to variations in naming conventions of the vars.

_________________
TP-Link WDR4300 - r22118 - Optware Installed and working
(just don't format your first partition with the label "Optware" or if you do, prepare to rewrite the tutorials)
Buffalo WZR-600DHP - r22118
lowdrag
DD-WRT Novice


Joined: 28 Mar 2014
Posts: 1

PostPosted: Mon Apr 21, 2014 19:51    Post subject: Concise... Reply with quote
Can someone point to a doc that explains how to save the config and use it to apply to other ddwrt installations on varying hardware?

I want to add this to all my routers and have them all use the same settings/ configs / port fwding etc across all of them.

Trouble is when you try to read 22 pages of old stuff not knowing where the information you want is or if it's still valid.

There must be a better way to organize information form comments etc.

Ideas?

THanks all.
Goto page Previous  1, 2, 3 ... 20, 21, 22 Display posts from previous:    Page 22 of 22
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum