When launching SABnzbd it would be nice if the current version checks the sabnzbd.ini file for the current version and last backup date.
This could help with:
- accidental deletes that could now be restored;
- added/removed/default settings which can be preserved with an update;
- using profiles such as 'low cpu' and 'high cpu'.
Backup sabnzbd.ini at start of launch.
Re: Backup sabnzbd.ini at start of launch.
I don't completely understand you, but maybe this helps:
sander@R540:~$ cp ~/.sabnzbd/sabnzbd.ini ~/.sabnzbd/sabnzbd.ini-`date +'%F-%R'`
This is on Linux. As I guess you're on OSX, this should work too. So create a batch file like
You'll probably have to change (directory) names for OSX
HTH
sander@R540:~$ cp ~/.sabnzbd/sabnzbd.ini ~/.sabnzbd/sabnzbd.ini-`date +'%F-%R'`
Code: Select all
sander@R540:~$ ll ~/.sabnzbd/sabnzbd.ini*
-rw-rw-r-- 1 sander sander 6192 2012-04-14 11:17 /home/sander/.sabnzbd/sabnzbd.ini
-rw-rw-r-- 1 sander sander 6192 2012-04-14 21:19 /home/sander/.sabnzbd/sabnzbd.ini-2012-04-14-21:19
Code: Select all
cp ~/.sabnzbd/sabnzbd.ini ~/.sabnzbd/sabnzbd.ini-`date +'%F-%R'`
sabnzbdplus
HTH
Re: Backup sabnzbd.ini at start of launch.
The option would be more like:
Where the first line of sabnzbd.ini would be something like:
which results in:
It could be added as a crontab from SABnzbd, with a separate script, or in OS X and Windows a 'helper' service, a separate option to add when installing SABnzbd.
Code: Select all
if # test file date and version here
cp ~/.sabnzbd/sabnzbd.ini ~/.sabnzbd/backup/sabnzbd.ini-`head -n1 ~/.sabnzbd/sabnzbd.ini|cut -c3-11`
fi
Code: Select all
# v0.7.14
# This sabnzbd.ini was automatically generated. To change, start SABnzbd, or make a copy first and select 'use backup' from the CONFIG menu.
#
Code: Select all
-rw-r--r-- 1 sabuser staff 11 14 Apr 23:33 sabnzbd.ini-v0.7.14
Re: Backup sabnzbd.ini at start of launch.
So ... are you using this?
Re: Backup sabnzbd.ini at start of launch.
Not yet, it involves some changes:
- First of all, SABnzbd has to rewrite the sabnzbd.ini file each time it starts, to make sure the first lines are correct, or at least check the first line and compare it with the current (running) version of SABnzbd.
- Second issue will be that a 'file list' has to be made, listing all possible backup files (limit = 10?) that could be used to restore the current settings, disabling version that aren't compatible.
- Backups may have to be verified for integrity.
It can be compared to the how Linux/*x cycles the syslog files, but with an extra check when reading the files back.
I could write a sample script if I can find time, but I don't expect such a feature before version 0.7.12.
- First of all, SABnzbd has to rewrite the sabnzbd.ini file each time it starts, to make sure the first lines are correct, or at least check the first line and compare it with the current (running) version of SABnzbd.
- Second issue will be that a 'file list' has to be made, listing all possible backup files (limit = 10?) that could be used to restore the current settings, disabling version that aren't compatible.
- Backups may have to be verified for integrity.
It can be compared to the how Linux/*x cycles the syslog files, but with an extra check when reading the files back.
I could write a sample script if I can find time, but I don't expect such a feature before version 0.7.12.
Re: Backup sabnzbd.ini at start of launch.
Update:
I noticed SABnzbd makes only one backup of the .ini file at this moment. My request would be an extension of this feature with a rollback function to restore old settings.
I noticed SABnzbd makes only one backup of the .ini file at this moment. My request would be an extension of this feature with a rollback function to restore old settings.
Re: Backup sabnzbd.ini at start of launch.
Another addition to the request:
Different versions of SABnzbd use different locations to store the sabnzbd.ini. I wouldn't know where it could be found on Windows Vista for instance. It would be nice if SABnzbd would take care of the backup/restore instead of an external script.
Different versions of SABnzbd use different locations to store the sabnzbd.ini. I wouldn't know where it could be found on Windows Vista for instance. It would be nice if SABnzbd would take care of the backup/restore instead of an external script.
Re: Backup sabnzbd.ini at start of launch.
SABnzbd stores its info in the standard location for each OS,
As documented here: http://wiki.sabnzbd.org/configure-v2
As documented here: http://wiki.sabnzbd.org/configure-v2