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  Next
Author Message
basmaf
DD-WRT Guru


Joined: 24 Feb 2011
Posts: 1047

PostPosted: Tue Jun 14, 2011 13:33    Post subject: Reply with quote
Quote:
I am running your mod right now. noticed that it will break S00factdefault service because the path has chaged to the last backup.

EDIT: Maybe a copy of the last backup or symlink can be added to /opt/var/backups/ to preserve that servece.

Other than that it seems to work. Not sure if I like the dated dir. who knows maybe it will grow on me.

EDIT2: /opt/restore/ is not created with OTRW, maybe a check here and create if doesn't exist. The path in S00factdefault can be modified to point to /opt/restore/

Changing the folder to back to "default" is easy fix.
Already taken in account that people would prefer the old style.
Code:
Change:
#FOLDER=/opt/var/backups/
FOLDER=/opt/var/backups/${BU_DAY}/
Into:
FOLDER=/opt/var/backups/
#FOLDER=/opt/var/backups/${BU_DAY}/


Just check my router and /opt/restore symlink is created on for my last backup.
Bit weird that it isn't working for you.

The opt/restore link is create on the minimal.
Could extend that into 2 symlinks minimal/essential.
Sponsor
basmaf
DD-WRT Guru


Joined: 24 Feb 2011
Posts: 1047

PostPosted: Sat Jun 18, 2011 10:30    Post subject: Reply with quote
Dark_Shadow wrote:
EDIT: Maybe a copy of the last backup or symlink can be added to /opt/var/backups/ to preserve that servece.
EDIT2: /opt/restore/ is not created with OTRW, maybe a check here and create if doesn't exist. The path in S00factdefault can be modified to point to /opt/restore/
Added: Symlink essential > opt/restore_essential

Fix for S00factdefault
If folder are created per day.
Minimal & Essential are copied > /opt/var/backups/
They will replace the last copied files

S00factdefault script won't need modification.

If backups are created directly in /opt/var/backups/ No actions performed.

NOTE: "ALL" backups in folder /opt/var/backups are deleted!!
Code:
# Copy backups to sub-folder "archive"
mkdir /opt/var/backups/archive
mv /opt/var/backups/*.sh /opt/var/backups/archive/



S99backupessential_V1.2.tar.bz2
 Description:
V1.2

Download
 Filename:  S99backupessential_V1.2.tar.bz2
 Filesize:  4.28 KB
 Downloaded:  787 Time(s)

Dark_Shadow
DD-WRT Guru


Joined: 31 Aug 2009
Posts: 2430
Location: Third Rock from the Sun

PostPosted: Mon Jun 20, 2011 0:50    Post subject: Reply with quote
S99backupessential_V1.2 Working Wonderfully on my RT-N16.
_________________
Peacock Thread-FAQ -- Firmware Recommendations -- dd-wrt Wiki

Testing Multiple Routers -- Bootloader Collection Project -- My Wiki
basmaf
DD-WRT Guru


Joined: 24 Feb 2011
Posts: 1047

PostPosted: Mon Jun 20, 2011 19:44    Post subject: Reply with quote
Glad to hear you like!
Does minimal include all settings you need for pppoe?
zoomlink
DD-WRT User


Joined: 08 May 2011
Posts: 221

PostPosted: Mon Jun 20, 2011 22:23    Post subject: Reply with quote
I installed it and ran it... it worked as expected, I like it.

I did modify a couple of things just to create a restore_preferred file.

=============================
#
CRONjob="9 1 * * 1"
CRONinfo="Every Monday @ 01:09"
#
SymLink ()
{

# S00factdefault fix
# When backups are created in folder for each day then
# Copy minimal, Essential & Preferred to /opt/var/backups/ replacing "ALL" backups in this folder.
if [ $FOLDER == /opt/var/backups/${BU_DAY}/ ] ; then
[ ! -f /opt/var/backups/*.sh ] || rm /opt/var/backups/*.sh
cp ${TO_MINIMAL} /opt/var/backups/${FILE}.minimal.sh
cp ${TO_INCLUDE} /opt/var/backups/${FILE}.essential.sh
cp ${TO_PREFERRED} /opt/var/backups/${FILE}.preferred.sh
fi

# SymLink Minimimal & Essential > opt/restore(_essential)
[ -h /opt/restore ] || rm /opt/restore
[ -h /opt/restore_essential ] || rm /opt/restore_essential
[ -h /opt/restore_preferred ] || rm /opt/restore_preferred
ln -s ${TO_MINIMAL} /opt/restore
ln -s ${TO_INCLUDE} /opt/restore_essential
ln -s ${TO_PREFERRED} /opt/restore_preferred

}
Dark_Shadow
DD-WRT Guru


Joined: 31 Aug 2009
Posts: 2430
Location: Third Rock from the Sun

PostPosted: Tue Jun 21, 2011 0:01    Post subject: Reply with quote
basmaf wrote:
Glad to hear you like!
Does minimal include all settings you need for pppoe?
no
_________________
Peacock Thread-FAQ -- Firmware Recommendations -- dd-wrt Wiki

Testing Multiple Routers -- Bootloader Collection Project -- My Wiki
basmaf
DD-WRT Guru


Joined: 24 Feb 2011
Posts: 1047

PostPosted: Tue Jun 21, 2011 4:32    Post subject: Reply with quote
zoomlink wrote:
I installed it and ran it... it worked as expected, I like it.

I did modify a couple of things just to create a restore_preferred file.

Will add it, should have done that in the first place!
Dark_Shadow wrote:
no

Will look into it, Need a bit of time can't take down my AP.
Am in 24H standby duty

Thanks for testing.
appyface
DD-WRT Novice


Joined: 02 Apr 2009
Posts: 21

PostPosted: Tue Jun 21, 2011 11:51    Post subject: Reply with quote
Hello Smile

I've come back to this thread after being away for a very long time -- many many many pages ago, when I started using one of the original script versions on a Linksys WRT54G and a WRT54GL.

Now I have a D-Link DIR-615-E3 and my old scripts and instructions do not run on this router.

I've downloaded the last script posted here (v1.2) but don't know what to do next?

My old script instructions called for copying the script to /tmp, adding execute permissions, then launching the script. I tried that with this script verion but the DIR-615 gives error "sh- not found".

I'm working my way backwards through the posts looking for n00b instructions to install and run this script, but so far no joy. If someone can point me to the posts I need to read or help me get this script to install and run, your help is appreciated.

Kind regards,
--appyface
basmaf
DD-WRT Guru


Joined: 24 Feb 2011
Posts: 1047

PostPosted: Tue Jun 21, 2011 12:48    Post subject: Reply with quote
appyface wrote:
I've downloaded the last script posted here (v1.2) but don't know what to do next?


Script is intended to be used as add-on for optware.
Making it working on a router without is not that easy
Best to use the original script without "S99"

Restore files are exactly the same.
appyface
DD-WRT Novice


Joined: 02 Apr 2009
Posts: 21

PostPosted: Tue Jun 21, 2011 18:52    Post subject: Reply with quote
@basmaf
By 'original script' do you mean backupvars.sh? As I mentioned, I have that one, and it gives same error message on the DIR-615-E3 as S99...version does. Or do you have a different script in mind?

Thank you for your help. Kind regards,
--appyface
basmaf
DD-WRT Guru


Joined: 24 Feb 2011
Posts: 1047

PostPosted: Tue Jun 21, 2011 19:06    Post subject: Reply with quote
Try the following in CLI

Code:
wget -O /tmp/backupessential http://wd.mirmana.com/backupessential
wget -O /tmp/vars_to_skip http://wd.mirmana.com/vars_to_skip
wget -O /tmp/vars_to_include http://wd.mirmana.com/vars_to_include
wget -O /tmp/vars_preferred http://wd.mirmana.com/vars_preferred
chmod +x /tmp/backupessential


Open /tmp/backupessential with vi and change

FOLDER=/opt/var/backups > FOLDER=/tmp
VARFILE=/opt/tmp/all_vars > VARFILE=/tmp/all_vars

Then run the script again.

Code:
./tmp/backupessential


Backups should be created in /tmp dir
appyface
DD-WRT Novice


Joined: 02 Apr 2009
Posts: 21

PostPosted: Wed Jun 22, 2011 11:38    Post subject: Reply with quote
@basmaf
I'm further along now, thank you! But I don't think it worked?

root@dir-615-e3:/# ./tmp/backupessential
./tmp/backupessential: line 201: sort: not found
./tmp/backupessential: line 207: tee: not found
./tmp/backupessential: line 207: tee: not found
./tmp/backupessential: line 207: tee: not found
./tmp/backupessential: line 207: tee: not found
./tmp/backupessential: line 241: can't open /tmp/all_vars: no such file
./tmp/backupessential: line 254: tee: not found
./tmp/backupessential: line 254: tee: not found
./tmp/backupessential: line 254: tee: not found
./tmp/backupessential: line 254: tee: not found
Checking [macaddr].*.all.sh
Checking [macaddr].*.essential.sh
Checking [macaddr].*.dangerous.sh
Checking [macaddr].*.preferred.sh
Checking [macaddr].*.minimal.sh
root@dir-615-e3:/#

I don't see any new files in /tmp.

Ideas? Thank you again for your time and your help.

Kind regards,
--appyface
basmaf
DD-WRT Guru


Joined: 24 Feb 2011
Posts: 1047

PostPosted: Thu Jun 23, 2011 1:13    Post subject: Reply with quote
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.
appyface
DD-WRT Novice


Joined: 02 Apr 2009
Posts: 21

PostPosted: Thu Jun 23, 2011 11:05    Post subject: Reply with quote
Sorry. I realize this is the Broadcom forum, but didn't know the script is limited to Broadcom-based routers. Thanks again for your help.

Kind regards,
--appyface
basmaf
DD-WRT Guru


Joined: 24 Feb 2011
Posts: 1047

PostPosted: Thu Jun 30, 2011 19:14    Post subject: Reply with quote
Spend some time on variables required for PPPoE
Quite some (15+) settings were changed when enabling ppp.

I get my IP via DHCP, so am unable to perform a real test.
I just set some random values....

Could someone with a ppp connection create a backup and restore minimal
Let me know if restore is successful!
If unsuccessful please provide the all and minimal restore script to correct missing vars.

NOTE: this version is for Testing.



S99backupessential_V1.3.tar.bz2
 Description:
TEST VERSION!!!

Download
 Filename:  S99backupessential_V1.3.tar.bz2
 Filesize:  4.56 KB
 Downloaded:  674 Time(s)

Goto page Previous  1, 2, 3 ... , 20, 21, 22  Next Display posts from previous:    Page 21 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