aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-02-04 18:58:11 -0600
committerCraig Jennings <c@cjennings.net>2026-02-04 18:58:11 -0600
commit2a4e9a4bcd5c25f2342863da4f57eda1ae8689fb (patch)
tree80028be3c86feff90dcc35d3b77422ff28e82c3e
parent6274448078a5c42ce3758333f7b30f2d5978d192 (diff)
downloadrsyncshot-2a4e9a4bcd5c25f2342863da4f57eda1ae8689fb.tar.gz
rsyncshot-2a4e9a4bcd5c25f2342863da4f57eda1ae8689fb.zip
Add 5-minute I/O timeout to rsync transfers
Adds --timeout=300 to rsync commands to handle network interruptions gracefully, especially over WiFi. Without this, SSH connection drops could leave rsync hanging indefinitely. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
-rwxr-xr-xrsyncshot4
1 files changed, 2 insertions, 2 deletions
diff --git a/rsyncshot b/rsyncshot
index f360e6f..29746dd 100755
--- a/rsyncshot
+++ b/rsyncshot
@@ -888,7 +888,7 @@ while IFS= read -r SOURCE || [ -n "$SOURCE" ]; do
if [ "$DRYRUN" = true ]; then
# Dry run: show what would be transferred
- rsync -avh --times \
+ rsync -avh --times --timeout=300 \
--delete --delete-excluded \
--exclude-from="$EXCLUDES" \
--dry-run \
@@ -896,7 +896,7 @@ while IFS= read -r SOURCE || [ -n "$SOURCE" ]; do
RSYNC_EXIT=$?
else
# Actual backup
- rsync -avh --times \
+ rsync -avh --times --timeout=300 \
--delete --delete-excluded \
--exclude-from="$EXCLUDES" \
"$SOURCE" "$DESTINATION"/latest