From 7e16d618715e392350448f182e0c8ee4aa791411 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Mon, 5 Nov 2018 15:45:33 +0100 Subject: [PATCH] Backport commit to count common rsync xfer errors GLPI #34026 https://github.com/backuppc/backuppc/commit/f5904a1f40f20fa76f43c23d12dacddba116a8d4 --- BackupPC4-4.2.1-count_rsync_xfer_errors.patch | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 BackupPC4-4.2.1-count_rsync_xfer_errors.patch diff --git a/BackupPC4-4.2.1-count_rsync_xfer_errors.patch b/BackupPC4-4.2.1-count_rsync_xfer_errors.patch new file mode 100644 index 0000000..825de66 --- /dev/null +++ b/BackupPC4-4.2.1-count_rsync_xfer_errors.patch @@ -0,0 +1,16 @@ +diff -Nur -x '*.orig' -x '*.rej' BackupPC-4.2.1/lib/BackupPC/Xfer/Rsync.pm mezzanine_patched_BackupPC-4.2.1/lib/BackupPC/Xfer/Rsync.pm +--- BackupPC-4.2.1/lib/BackupPC/Xfer/Rsync.pm 2018-05-07 19:14:29.000000000 +0200 ++++ mezzanine_patched_BackupPC-4.2.1/lib/BackupPC/Xfer/Rsync.pm 2018-11-05 15:43:26.616901808 +0100 +@@ -546,6 +546,12 @@ + } + $t->{stats}{xferErrs}++; + } ++ if ( /^rsync error: / || /^rsync warning: / ) { ++ $t->{stats}{xferErrs}++; ++ } ++ if ( /^rsync: send_files failed to open / || /^file has vanished: / ) { ++ $t->{stats}{xferErrs}++; ++ } + if ( /^IOrename:\s(\d+)\s(.*)/ ) { + my $oldName = substr($2, 0, $1); + my $newName = substr($2, $1);