Exit status if some files failed

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Exit status if some files failed

R. Diez-2
Hi all:

I am using rdiff-backup version 1.2.8, which is what comes with Xubuntu
14.04.

I am running rdiff-backup on Linux in order to backup some files from a
Windows PC over the network. If a Windows application is using a file,
it often locks it, so that rdiff-backup cannot read it. This problem has
been reported before, see bug #25944 "Error if file is locked".

But whether rdiff-backup can backup the file or not is not actually the
issue I am worried about here. The problem is, when such a file fails,
the exit code is still 0. See "ListError" and "Errors 1" in the log
output below for an example of such a failure.

I would like to know if the backup has suceeded, and if a file failed, I
would say it has not. rdiff-backup's manpage about the exit status is
worded in an interesting way: "If there is an unrecoverable (critical)
error, it will be non-zero".

It would be best to mention in the manpage what rdiff-backup considers
to be a critical error. If a backup tool fails to backup a file, I would
certainly consider it a "critical error". Warnings are only warnings,
and not errors. What would be a "non-critical error" then?

If my suspicion gets confirmed, but it is too late to fix this, I would
welcome some sort of "--consider-failed-files-as-critical-error" flag.


The log mentioned above is:

--------8<--------8<--------8<--------

rdiff-backup  --force --verbosity 4 --no-acls --print-statistics
"/home/user/some-disk-mounted-over-cifs" "/home/user/some/local/dir"

ListError some/locked/file/because/in/use/by/windows/application [Errno
16] Device or resource busy:
'/home/user/some-disk-mounted-over-cifs/some/locked/file/because/in/use/by/windows/application'

Using rdiff-backup version 1.2.8
POSIX ACLs test skipped. rdiff-backup run with --no-acls option.
Windows ACLs test skipped. rdiff-backup run with --no-acls option.
escape_dos_devices required by filesystem at
/home/user/some-disk-mounted-over-cifs
-----------------------------------------------------------------
Detected abilities for source (read only) file system:
   Access control lists                         Off
   Extended attributes                          On
   Windows access control lists                 Off
   Case sensitivity                             Off
   Escape DOS devices                           On
   Escape trailing spaces                       Off
   Mac OS X style resource forks                Off
   Mac OS X Finder information                  Off
-----------------------------------------------------------------
POSIX ACLs test skipped. rdiff-backup run with --no-acls option.
Windows ACLs test skipped. rdiff-backup run with --no-acls option.
escape_dos_devices not required by filesystem at
/home/user/some/local/dir/rdiff-backup-data/rdiff-backup.tmp.0
-----------------------------------------------------------------
Detected abilities for destination (read/write) file system:
   Ownership changing                           Off
   Hard linking                                 On
   fsync() directories                          On
   Directory inc permissions                    On
   High-bit permissions                         On
   Symlink permissions                          Off
   Extended filenames                           On
   Windows reserved filenames                   Off
   Access control lists                         Off
   Extended attributes                          On
   Windows access control lists                 Off
   Case sensitivity                             On
   Escape DOS devices                           Off
   Escape trailing spaces                       Off
   Mac OS X style resource forks                Off
   Mac OS X Finder information                  Off
-----------------------------------------------------------------
Backup: must_escape_dos_devices = 1
Starting increment operation /home/user/some-disk-mounted-over-cifs to
/home/user/some/local/dir
--------------[ Session statistics ]--------------
StartTime 1484553507.00 (Mon Jan 16 08:58:27 2017)
EndTime 1484553535.64 (Mon Jan 16 08:58:55 2017)
ElapsedTime 28.64 (28.64 seconds)
SourceFiles 17311
SourceFileSize 71909403782 (67.0 GB)
MirrorFiles 17311
MirrorFileSize 71909403802 (67.0 GB)
NewFiles 0
NewFileSize 0 (0 bytes)
DeletedFiles 0
DeletedFileSize 0 (0 bytes)
ChangedFiles 5
ChangedSourceSize 46 (46 bytes)
ChangedMirrorSize 66 (66 bytes)
IncrementFiles 6
IncrementFileSize 126 (126 bytes)
TotalDestinationSizeChange 106 (106 bytes)
Errors 1
--------------------------------------------------

--------8<--------8<--------8<--------

Thanks in advance,
   rdiez

_______________________________________________
rdiff-backup-users mailing list at [hidden email]
https://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki