Capture::Tiny
is used to capture output of system commands for better logging.lock_dir
if it doesn't exist.Sorting issue when building history file fixed.
Thanks to Gunnar Scherf.
If a previous job failed there may be left an incomplete temporary destination directory backup.0.
To avoid mixed up backup sets, this directory will be removed before backup starts.
Thanks to Falke Bruinsma for the hint.
Minor bug fix: rsback logs 'rsync error
code of the result was not in the list of ignore_rsync_errors
. The error handling was correct,
but the word 'ignored' was wrong.
Archives won't be rotated if the temporary backup set doesn't exist after the rsync job. This can happen
if certain rsnync exit codes have been ignored before (parameter ingnore_rsync_errors
). Rotation in such
cases can result in loss of archives, otherwise.
Backup date/time of fresh archive are logged now during rotation.
History file will be rebuild if entries are missing.
New parameter update = <task>
(in mode = rsync
)
This causes just a "simple" rsync on the most recent backup set of the refered task (no rotation). There are
no other parameters necessary, they are taken from the refered task section.
Background:
To get consistent backups of live systems (data bases, virtual machines, ...) these have to be shutdown before.
To speedup backups of such systems, this procedure may help in some cases:
ignore_rsync_errors = 24
(vanished source files).update = live-backup
to take an update
snapshot of the backup from Step 2.Warnings are now written to STDOUT, too. This may be helpful if rsback is lauched by cron jobs with commands like
rsback -vc /etc/rsback-mywork.config >> /var/log/rsback/mywork.log
In this case, usually the owner of the job will be informed by mail if something went wrong (was written to STDERR).
But errors have not been written to the log file (STDOUT) which made debugging often difficult. This can now be changed with
warnings_to_stdout = yes
Re-sorted CANGELOG. last entry first now.
Support for rsync --link-dest
Parameter: use_link_dest = yes|no
may be used in [global]
or [some_task]
Schema of backup repository has changed: Index of backup sets is now 1, 2, 3, ...
Using backup repositories made with older versions one has to rotate once "manually":
Supposed we have 5 backup sets (0 .. 4), we have to rotate...
# mv backup.4 backup.5 # mv backup.3 backup.4 # mv backup.2 backup.3 # mv backup.1 backup.2 # mv backup.0 backup.1
Bugfix: Reported exit values of system/shell commands should now be correct.
Bugfix: non-existing paramter global:backup
with option -i changed to global:tasks
Bugfix: Trailing white space removed from config parameters
Bugfix: Parameter lists containing quotation marks; things like
rsync_options = -al --delete --delete-excluded \ --rsh="ssh -i /root/.ssh/id_dsa" \ -vv --stats
should work now.
Continuation lines as in the examples above may be used now.
A couple of new features/parameters:
global:rsync_options is now mandatory
Locking mechanism to avoid race conditions of backup tasks
global:lock_dir = /path/to/lock-files if_locked_retry = 3 10min
Error handling
global:if_error_continue = yes
Suspend tasks (temporarily)
suspend_file = /var/work/_dont_backup_now_
Trigger tasks (once only)
trigger_file = /home/fritz/_backup_please_
This trigger_file should be writetable by rsback, because it will be removed after succefull backup
Previous backup sets will now be back-rotated if the backup has not been finished successfully.
Thus old backup sets remain untouched if the backup fails.
If rsync_options=--dry-run``(simulation) and
mode=rsync` is selected, rotation of previous backup
sets will be skipped.