#2632 PR merged
: Cleanup rsync and fix error reporting¶
Labels: bug
, cleanup
, fixed / solved / done
pcahyna opened issue at 2021-06-21 12:03:¶
Pull Request Details:¶
-
Type: Bug Fix / Cleanup
-
Impact: High
-
Reference to related issue (URL): #2612, #2577
-
How was this pull request tested?
Against CentOS 7:- full backup and restore using rsync over ssh
- added nonsensical rsync option
BACKUP_RSYNC_OPTIONS+=( -M--nonsense )
, verified that ReaR aborts mkbackup instead of displaying a warning message and continuing - added nonsensical rsync option
BACKUP_RSYNC_OPTIONS+=( -M--nonsense )
in the rescue system, verified that ReaR displays a prominent warning during mkrescue before continuing and aborting later at a different place - added
BACKUP_INTEGRITY_CHECK=1
and a nonsensical rsync optionBACKUP_RSYNC_OPTIONS+=( -M--nonsense )
in the rescue system, verified that ReaR displays a rsync error and aborts during mkrescue instead of continuing and aborting later at a different place
Against CentOS 8:
full backup and restore using rsync over ssh -
Brief description of the changes in this pull request:
Cleanups of rsync code to use better variable names and local variables, stop usingStopIfError
, use better redirections etc.
Fix a problem with rsync error detection that caused rsync errors during backup restore to be ignored (fixes #2612). Now a warning is displayed and ifBACKUP_INTEGRITY_CHECK
is true, it is elevated to an error and ReaR aborts.
Detect errors during rsync backup: they were reported only as warnings, which is risky, because if nobody reads them, one could easily end up with a broken backup (therefore impact High).
pcahyna commented at 2021-06-21 12:06:¶
Note: this intentionally reverts commit 3548430302cef3a8445de970eb763da33d9f6e8e of PR #2011. I found that the intent of the commit was wrong and the code was not correct.
jsmeix commented at 2021-06-23 10:55:¶
@rear/contributors
please have a look if time permits
and if there are no objections from you
I would like to merge it tomorrow afternoon.
jsmeix commented at 2021-06-24 12:47:¶
@pcahyna
thank you for your rsync code cleanup and your various fixes!
[Export of Github issue for rear/rear.]