Create rsync_failure_codes option.

User may optionally create a file rsync_failure_codes with a
newline-separated list of rsync return codes that are to be
regarded as complete failure.

If rsync exits with such a code, then the backup will be marked
for deletion during the next ccollect run (if delete_incomplete).

I added documentation for this feature in doc/ccollect.text

In my experience (yours may differ), two rsync exit codes that
belong in this file are 12 and 255.  I have seen 12 result from
ssh errors and 255 result from a kernel module conflict.  In both
cases, the resulting backups were empty.  Without the
rsync_failure_codes option, such errors cause good backups to be
deleted, as per c_interval, leaving behind the new empty backups.

In the long run, we may want a different and more comprehensive
method for analyzing rsync errors.  In the short run, I find this
option necessary.
This commit is contained in:
jll2 2009-06-24 17:01:14 -07:00
commit 544a7d269e
2 changed files with 33 additions and 7 deletions

View file

@ -359,6 +359,7 @@ Additionally a source may have the following files:
- `delete_incomplete` delete incomplete backups
- `remote_host` host to backup to
- `rsync_failure_codes` list of rsync exit codes that indicate complete failure
Example:
@ -574,6 +575,15 @@ If you create the file `delete_incomplete` in a source specification directory,
was interrupted) and remove them. Without this file `ccollect` will only warn
the user.
Detailed description of "rsync_failure_codes"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If you have the file `rsync_failure_codes` in your source configuration
directory, it should contain a newline-separated list of numbers representing
rsync exit codes. If rsync exits with any code in this list, a marker will
be left in the destination directory indicating failure of this backup. If
you have enabled delete_incomplete, then this backup will be deleted during
the next ccollect run on the same interval.
Hints
-----