I think S00factconfig has a very specific purpose and is a 'post' back-up activity.
I simply uses your backed up variable sets [if you have them as a result of running the backupessential script] when you reset to factory defaults due to a fw upgrade or just because you like to
If you don't have backupessential backup sets, then it simply hard-codes a minimal set of variables so you don't have to go do EVERYTHING from scratch.
Getting all the links related automated restores have to be done on the /opt/usr/sbin/backupessential script.
Thanks! Didn't find find the symlink in S00factconfig where I expected it to be
You want the fact default script to restore all.sh
Correct me if i'm wrong.
Changing the symlink like zoomlink does not affect the factdefault script
factdefault script is not based on the symlink.
it filters in the /op/var/backup on the last created minimal.sh restore script and creates a var for it.
"lastbackup" this is the file which will be executed.
Its not something i would recommend with a firmware upgrade i would use essential.
If you still want to use all.sh
Code:
lastbackup="`ls -1t /opt/var/backups/*.minimal.sh | head -n1`"
# into
lastbackup="`ls -1t /opt/var/backups/*.all.sh | head -n1`"
Thanks! Didn't find find the symlink in S00factconfig where I expected it to be
You want the fact default script to restore all.sh
Correct me if i'm wrong.
Changing the symlink like zoomlink does not affect the factdefault script
factdefault script is not based on the symlink.
it filters in the /op/var/backup on the last created minimal.sh restore script and creates a var for it.
"lastbackup" this is the file which will be executed.
Its not something i would recommend with a firmware upgrade i would use essential.
If you still want to use all.sh
Code:
lastbackup="`ls -1t /opt/var/backups/*.minimal.sh | head -n1`"
# into
lastbackup="`ls -1t /opt/var/backups/*.all.sh | head -n1`"
BM..
Yup.. wires got crossed [boy I was batting 100 yesterday].
I was strictly referring to the /opt/usr/sbin/backupessential script that creates a file called /opt/restore that is linked to one of the restore scripts (xxx.minimal.sh by default) unless you change it so that it links to xxx.all.sh or whichever you desire to use when you execute /opt/restore.
The factory default script automates the process, however, as BM indicated needs to be changed to directly call up the xxx.all.sh script.
Franky, I looked back and the S00factconfig was only mentioned after I had mentioned the recommended changes to the backupessential script.
Joined: 31 Aug 2009 Posts: 2448 Location: Third Rock from the Sun
Posted: Sat Jun 11, 2011 22:12 Post subject:
I personally would not use the all.sh, it is only populated to be able to populate the other files so it includes the dangerous nvram settings. I mean it should be fine on the same router but why take the chance. _________________ Peacock Thread-FAQ -- dd-wrt Wiki
I was only referring to your change in backupessential.
Cause wabe mentioned it in his reply.
I'm currently working on a modified version of the backupessential script.
I'm changing it to be running as a service.
So it can be started from the services command.
It will also output to syslog
It's backup files are completely the same fraters script.
Will include.
Service start/stop/status/create
Code:
root@DD-WRT:/# service backupessential status
backupessential is started
Cronjob Config = {0 1 * * *}
Cron Info = {Every day @ 01:00}
Last backup:
MAC= xx:xx:xx:xx:xx:xx Date= 2011/June/12-01:00 | Backup Successful
By default it will shedule a cronjob each night @ 01:00
Folder structure is created like /opt/var/backups/2011/06.June/13/
If you prefer all files within on folder.
Edit User settings:
Code:
#########################################################
#### User settings
# CRONjob = Backup interval Read WIKI for more info
# CRONinfo = Is only "info" shown @ start/status modify when changing CRONjob for your own info
CRONjob="0 1 * * *"
CRONinfo="Every day @ 01:00"
## FTP
# Change to FTP_ON=1 to enable ftp
# FTP Login information change to your information
FTP_ON=0
FTPS=ftp://192.168.10.210/backups
USERPASS=user:pass
BU_DAY="`date +%Y/%m.%B/%d`" # 2011/01.Jan/30
# Folders are created like "2011/01.Jan/01/"
# Uncomment FOLDER and comment next FOLDER to create all backups in one folder
#FOLDER=/opt/var/backups/
FOLDER=/opt/var/backups/${BU_DAY}/
#### User settings
#########################################################
Attached CLI output for options
on | ? | start | create | status
Intentionally deleted the vars_to_*
Included download function if vars_to_* are missing.
Let me know what you think
I'm always in for improvements.
Joined: 31 Aug 2009 Posts: 2448 Location: Third Rock from the Sun
Posted: Mon Jun 13, 2011 10:42 Post subject:
I haven't tried it yet, but the first thing i see right off is I think pppoe settings should be part of minimal for those of us who have pppoe. _________________ Peacock Thread-FAQ -- dd-wrt Wiki
I'll make a new test later on to see if editing Fraters S00factconfig file to point to the essential script instead of the minimal help and do and "nvram erase" & reboot.
Changing the script to restore from "essential" works fine. Cannot understand why running the essential/all scripts doesn't work unless nvram is erased beforehand. Can anyone explain this??
Joined: 31 Aug 2009 Posts: 2448 Location: Third Rock from the Sun
Posted: Mon Jun 13, 2011 23:01 Post subject:
basmaf wrote:
Haven't changed the backup procedure.
Its direct copy from fraters script.
I'm not using pppoe and have no experience with its settings.
adding some values to it is small effort.
Edit:
Checked vars_preffered, that contains ^ppp
Will contain all pppoe values. its not by default in the minimal file on fraters servers.
Will do add small procedure to check if its in the file and otherwise add it.
Edit 2:
Uploaded new version.
^ppp by default included if vars_minimal not present
or
^ppp will be added to existing vars_minimal
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/ _________________ Peacock Thread-FAQ -- dd-wrt Wiki
[quote="zoomlink"]When in the S00factdefault script do you do an nvram erase, I imagine before you write the new variables no? or after you write and commit?[/quote
The factdefault service script checks if router ip is 192.168.1.1 & ssid is "dd-wrt" at startup. If this condition is met the last backup is restored and router is rebooted.
The default is to restored the minimal backup but I've changed this to essential which restore all necessary settings