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.
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!!
# 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
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.
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"
@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?
@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.
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.