diff --git a/man/simple_backup.1 b/man/simple_backup.1 index 0cb584b..b86e4ba 100644 --- a/man/simple_backup.1 +++ b/man/simple_backup.1 @@ -180,7 +180,8 @@ for details. For this reason, use SSH key authentication if possible. .SH EXIT STATUS .TP .B 0 -The backup was completed without errors. +The backup was completed without errors. This includes rsync return code 24 (some source files +vanished during the transfer), which only logs a warning. .TP .B 1 No valid inputs selected for backup. @@ -192,7 +193,7 @@ Backup failed because output directory for storing the backup does not exist. Permission denied to access the output directory. .TP .B 4 -rsync error (rsync returned a non-zero value). +rsync error (rsync returned a value other than 0 or 24). .TP .B 5 SSH connection failed. diff --git a/simple_backup/simple_backup.py b/simple_backup/simple_backup.py index 27cb4ca..18f8893 100755 --- a/simple_backup/simple_backup.py +++ b/simple_backup/simple_backup.py @@ -472,7 +472,7 @@ class Backup: 'Rsync error (return code 23) - Partial transfer due to error') case 24: logger.warning( - 'Rsync error (return code 24) - Partial transfer due to vanished source files') + 'Rsync warning (return code 24) - Some source files vanished during the transfer') case 30: logger.error( 'Rsync error (return code 30) - Timeout in data send/receive') @@ -617,7 +617,8 @@ class Backup: self._ssh.close() - if returncode != 0: + # Files vanishing during the transfer is normal for a live system (return code 24) + if returncode not in [0, 24]: logger.error( 'Some errors occurred while performing the backup')