Changeset - 064e7c0e6239
[Not reviewed]
0 1 0
Lance Edgar (lance) - 20 months ago 2023-03-01 09:35:32
lance@edbob.org
Log warning but avoid error, if rsync exits with code 24
1 file changed with 12 insertions and 1 deletions:
0 comments (0 inline, 0 general)
rattail/commands/backup.py
Show inline comments
 
@@ -321,7 +321,18 @@ class Backup(Subcommand):
 
            cmd = rsync + excludes + [prefix, destination]
 
            log.debug("rsync command is: %s", cmd)
 
            if not dry_run:
 
                subprocess.check_call(cmd)
 
                try:
 
                    subprocess.check_call(cmd)
 
                except subprocess.CalledProcessError as error:
 
                    # nb. rsync exits with code 24 when scenario is
 
                    # "Partial transfer due to vanished source files"
 
                    # but that just means all that could be synced, was
 
                    # synced, though some could not be synced.  we do
 
                    # not consider that a serious issue, so want to
 
                    # avoid the outright error here.
 
                    if error.returncode != 24:
 
                        raise
 
                    log.warning("rsync command exited with code 24")
 

	
 
    def make_borg_archives(self, remotes, include=None, exclude=None,
 
                           tag=None, dry_run=False):
0 comments (0 inline, 0 general)