aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-02-12 15:13:10 -0600
committerCraig Jennings <c@cjennings.net>2026-02-12 15:13:10 -0600
commitece640d60330ccece7dd0ec254362d4b25e2a46d (patch)
tree43112ccfed29cc0067e5e544e119245671fd6b37
parentac950facc08dbaf8bdda7431d434a16f4d02b222 (diff)
downloadrsyncshot-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-xrsyncshot7
1 files changed, 6 insertions, 1 deletions
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