@@ -184,7 +184,7 @@ To run the backup automatically, edit the root crontab.
184184
185185```ini
186186# =================================================================
187- # Configuration for rsync Backup Script v0.33
187+ # Configuration for rsync Backup Script v0.34
188188# =================================================================
189189# !! IMPORTANT !! Set file permissions to 600 (chmod 600 backup.conf)
190190
@@ -310,7 +310,7 @@ END_EXCLUDES
310310
311311` ` ` bash
312312#! /bin/bash
313- # ===================== v0.33 - 2025.08.15 ========================
313+ # ===================== v0.34 - 2025.08.15 ========================
314314#
315315# =================================================================
316316# SCRIPT INITIALIZATION & SETUP
@@ -503,7 +503,8 @@ run_integrity_check() {
503503 local DIRS_ARRAY; read -ra DIRS_ARRAY <<< " $BACKUP_DIRS"
504504 for dir in " ${DIRS_ARRAY[@]} " ; do
505505 echo " --- Integrity Check: $dir ---" >&2
506- LC_ALL=C rsync " ${rsync_check_opts[@]} " " $dir " " $REMOTE_TARGET " 2>> " ${LOG_FILE:-/ dev/ null} "
506+ local relative_path=" ${dir#* ./ } "
507+ LC_ALL=C rsync " ${rsync_check_opts[@]} " " $dir " " ${REMOTE_TARGET}${relative_path} " 2>> " ${LOG_FILE:-/ dev/ null} "
507508 done
508509}
509510parse_stat () {
@@ -976,8 +977,7 @@ for dir in "${DIRS_ARRAY[@]}"; do
976977 RSYNC_EXIT_CODE=${PIPESTATUS[0]}
977978 else
978979 RSYNC_OPTS+=(--info=stats2)
979- nice -n 19 ionice -c 3 rsync " ${RSYNC_OPTS[@]} " " $dir " " $REMOTE_TARGET " > " $RSYNC_LOG_TMP " 2>&1
980- RSYNC_EXIT_CODE=$?
980+ nice -n 19 ionice -c 3 rsync " ${RSYNC_OPTS[@]} " " $dir " " $REMOTE_TARGET " > " $RSYNC_LOG_TMP " 2>&1 || RSYNC_EXIT_CODE=$?
981981 fi
982982 cat " $RSYNC_LOG_TMP " >> " $LOG_FILE " ; full_rsync_output+=$' \n ' " $( < " $RSYNC_LOG_TMP " ) "
983983 rm -f " $RSYNC_LOG_TMP "
0 commit comments