rsync exit code 23 (partial transfer due to errors): List of possible reasons and how to ignore some?

rsync at altfeld-im.de rsync at altfeld-im.de
Thu Dec 14 18:20:15 UTC 2023


I am trying to find a solution for the open source Linux software

   "Back In Time" (https://github.com/bit-team/backintime)

where we evaluate the rsync exit code when taking a backup via rsync
and inform the user that an error has occured.

Questions:

1. Is there full list of possible reasons available that make rsync
   exit with the return value 23?

       'rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1338) [sender=3.2.7]'

   I want to decide for each reason if we treat it as an error or warning.

2. I want to ignore some reasons for exit code 23 by only logging it, mainly:
  
       symlink has no referent: "/home/user/Documents/dead-link"

   Is there a way to 
   - either prevent that this error leads to exit code 23 (if no other reason occurs)
   - or to prevent this specific check at all (but eg. copy the symlink "as is")?

THX a lot!



PS 1: The typcially used rsync command line looks like this:

rsync --recursive --times --devices --specials --hard-links --human-readable -s --copy-links --acls --perms --executability --group --owner --
info=progress2 --no-inc-recursive -l --delete --delete-excluded -v -i --out-format=BACKINTIME: %i %n%L --link-dest=../../20231214-143359-584/backup --
chmod=Du+wx --exclude=/home/username/temp/testBAK_profil1 --exclude=/home/username/.local/share/backintime --exclude=.local/share/backintime/mnt --
include=/home/username/Documents/ --include=/home/username/ --include=/home/ --include=/home/username/temp/deleted_folder/ --
include=/home/username/temp/ --include=/home/username/.mozilla/ --exclude=.gvfs --exclude=.cache/* --exclude=.thumbnails* --
exclude=.local/share/[Tt]rash* --exclude=*.backup* --exclude=*~ --exclude=.dropbox* --exclude=/proc/* --exclude=/sys/* --exclude=/dev/* --
exclude=/run/* --exclude=/etc/mtab --exclude=/var/cache/apt/archives/*.deb --exclude=lost+found/* --exclude=/tmp/* --exclude=/var/tmp/* --
exclude=/var/backups/* --exclude=.Private --exclude=lock --exclude=root_only_file.txt --include=/home/username/Documents/** --
include=/home/username/temp/deleted_folder/** --include=/home/username/.mozilla/** --exclude=* /
/home/username/temp/testBAK_profil1/backintime/computer1/username/1/new_snapshot/backup




PS 2: You can find more details or even answer in our Github issue too:

https://github.com/bit-team/backintime/issues/1587




More information about the rsync mailing list