Fork me on GitHub

No Error on Vanished Files

During a backup rsync may issue the following warning :

  rsync warning: some files vanished before they could be transferred (code 24)

Depending upon what you are backing up, your backup policy and requirements, this may be a serious issue. By default LBackup marks such backups as unsuccessful. In event that you wish to have such errors ignored and the backup to be marked as successful, then there are two approaches mentioned below to achieve this result. Prior to proceeding with either of the approaches listed below, carefully consider if ignoring vanished files will be a problem for your backups.

LBackup Internal Approach to Ignoring Vanished Files Warnings

The latest alpha revisions of LBackup supports the ignore_rsync_vanished_files=“YES” option being set to so that LBackup will simply ignore any files vanished warnings and behave like the backup was successful, should any files vanish during the backup.

Should you decide to enable this option, please keep in mind that in some circumstances this warning may be useful and the backup should be reported as a failed backup.

Wrapper Script Approach to Ignoring Vanished Files Warnings

This is a solution listed on the rsync FAQ page :

ignore “vanished files” warning Some folks would like to ignore the “vanished files” warning, which manifests as an exit-code 24. The easiest way to do this is to create a shell script wrapper. For instance, name this something like “rsync-no24”:

rsync "$@"
if test $e = 24; then
    exit 0
exit $e

It is possible for certain configurations to use this wrapper script by specifying the wrapper within the LBackup configuration file. Within the example_backup.conf file, under LBackup rsync options section there are examples of how to specify the path to rsync or an rsync wrapper.

If you decide to use this rsync wrapper script, then please keep in mind that in some circumstances this warning may be useful.