From ece640d60330ccece7dd0ec254362d4b25e2a46d Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Thu, 12 Feb 2026 15:13:10 -0600 Subject: Treat rsync exit code 24 as non-fatal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Files vanishing during transfer (exit 24) is normal — temp files, editor swap files, etc. get cleaned up while the backup runs. Log a warning instead of aborting snapshot rotation. --- rsyncshot | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/rsyncshot b/rsyncshot index 8194d20..712de21 100755 --- a/rsyncshot +++ b/rsyncshot @@ -904,7 +904,12 @@ while IFS= read -r SOURCE || [ -n "$SOURCE" ]; do fi # Check rsync exit code - if [ $RSYNC_EXIT -ne 0 ]; then + # Exit 24 = "some files vanished before they could be transferred" (normal — + # files deleted during backup, e.g. temp files, editor swap files). Not a failure. + # Exit 23 = "partial transfer due to error" — may indicate real issues, treat as failure. + if [ $RSYNC_EXIT -eq 24 ]; then + log "Warning: some files vanished during transfer of $SOURCE (rsync exit 24, non-fatal)" + elif [ $RSYNC_EXIT -ne 0 ]; then echo "ERROR: rsync failed for $SOURCE (exit code: $RSYNC_EXIT)" 1>&2 RSYNC_FAILED=true fi -- cgit v1.2.3