diff options
| author | Craig Jennings <c@cjennings.net> | 2026-02-12 15:13:10 -0600 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-02-12 15:13:10 -0600 |
| commit | ece640d60330ccece7dd0ec254362d4b25e2a46d (patch) | |
| tree | 43112ccfed29cc0067e5e544e119245671fd6b37 | |
| parent | ac950facc08dbaf8bdda7431d434a16f4d02b222 (diff) | |
| download | rsyncshot-ece640d60330ccece7dd0ec254362d4b25e2a46d.tar.gz rsyncshot-ece640d60330ccece7dd0ec254362d4b25e2a46d.zip | |
Treat rsync exit code 24 as non-fatal
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.
| -rwxr-xr-x | rsyncshot | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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 |
