@@ -184,7 +184,7 @@ To run the backup automatically, edit the root crontab.
184
184
185
185
```ini
186
186
# =================================================================
187
- # Configuration for rsync Backup Script v0.29
187
+ # Configuration for rsync Backup Script v0.30
188
188
# =================================================================
189
189
# !! IMPORTANT !! Set file permissions to 600 (chmod 600 backup.conf)
190
190
@@ -216,6 +216,9 @@ BEGIN_SSH_OPTS
216
216
/root/.ssh/id_ed25519
217
217
END_SSH_OPTS
218
218
219
+ # The timeout in seconds for rsync operations.
220
+ RSYNC_TIMEOUT=300
221
+
219
222
# --- Performance ---
220
223
# Optional: Limit rsync' s bandwidth usage in KiB/s. Leave empty or set to 0 to disable.
221
224
# Example: BANDWIDTH_LIMIT_KBPS=5000 (for 5 MB/s)
@@ -301,7 +304,7 @@ END_EXCLUDES
301
304
302
305
` ` ` bash
303
306
#! /bin/bash
304
- # ===================== v0.29 - 2025.08.13 ========================
307
+ # ===================== v0.30 - 2025.08.13 ========================
305
308
#
306
309
# =================================================================
307
310
# SCRIPT INITIALIZATION & SETUP
@@ -372,7 +375,7 @@ if [ -f "$CONFIG_FILE" ]; then
372
375
373
376
case " $key " in
374
377
BACKUP_DIRS|BOX_DIR|BOX_ADDR|LOG_FILE|LOG_RETENTION_DAYS|\
375
- MAX_LOG_SIZE_MB|BANDWIDTH_LIMIT_KBPS|\
378
+ MAX_LOG_SIZE_MB|BANDWIDTH_LIMIT_KBPS|RSYNC_TIMEOUT| \
376
379
CHECKSUM_ENABLED|\
377
380
NTFY_ENABLED|DISCORD_ENABLED|NTFY_TOKEN|NTFY_URL|DISCORD_WEBHOOK_URL|\
378
381
NTFY_PRIORITY_SUCCESS|NTFY_PRIORITY_WARNING|NTFY_PRIORITY_FAILURE|\
@@ -432,7 +435,7 @@ if (( ${#SSH_OPTS_ARRAY[@]} > 0 )); then
432
435
fi
433
436
434
437
RSYNC_BASE_OPTS=(
435
- -aR -z --delete --partial --timeout=60 --mkpath
438
+ -aR -z --delete --partial --timeout=" ${RSYNC_TIMEOUT :- 300} " --mkpath --noatime
436
439
--exclude-from=" $EXCLUDE_FILE_TMP "
437
440
-e " $SSH_CMD "
438
441
)
@@ -929,6 +932,10 @@ FINAL_MESSAGE=$(printf "%s\n\nSuccessful: %s\nFailed: %s\n\nDuration: %dm %ds" \
929
932
" ${failed_dirs[*]:- None} " \
930
933
$(( DURATION / 60 )) $(( DURATION % 60 )) )
931
934
935
+ if [[ ${# FINAL_MESSAGE} -gt 1800 ]]; then
936
+ FINAL_MESSAGE=$( printf " %.1800s\n\n[Message truncated, see %s for full details]" " $FINAL_MESSAGE " " $LOG_FILE " )
937
+ fi
938
+
932
939
if [[ ${# failed_dirs[@]} -eq 0 ]]; then
933
940
log_message " SUCCESS: All backups completed."
934
941
if [[ $overall_exit_code -eq 24 ]]; then
0 commit comments