Skip to content

Commit 21b5df8

Browse files
authored
Merge pull request #17 from buildplan/fix_path
Fix path
2 parents ae32098 + 54f3e3f commit 21b5df8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

backup_script.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# =================================================================
44
# SCRIPT INITIALIZATION & SETUP
5-
# v0.14 - 2025.08.10
5+
# v0.15 - 2025.08.10
66
# =================================================================
77
set -Euo pipefail
88
umask 077
@@ -66,7 +66,7 @@ LOCK_FILE="/tmp/backup_rsync.lock"
6666
MAX_LOG_SIZE=10485760 # 10 MB in bytes
6767

6868
RSYNC_BASE_OPTS=(
69-
-aR -z --delete --partial --timeout=60
69+
-a -z --delete --partial --timeout=60
7070
--exclude-from="$EXCLUDE_FILE_TMP"
7171
-e "ssh ${SSH_OPTS_STR:-}"
7272
)
@@ -111,7 +111,7 @@ send_notification() {
111111
}
112112

113113
run_integrity_check() {
114-
local rsync_check_opts=(-aincR -c --delete --exclude-from="$EXCLUDE_FILE_TMP" --out-format="%n" -e "ssh ${SSH_OPTS_STR:-}")
114+
local rsync_check_opts=(-ainc -c --delete --mkpath --exclude-from="$EXCLUDE_FILE_TMP" --out-format="%n" -e "ssh ${SSH_OPTS_STR:-}")
115115

116116
for dir in $BACKUP_DIRS; do
117117
local remote_path="${REMOTE_TARGET}${dir#/}"
@@ -307,7 +307,7 @@ for dir in $BACKUP_DIRS; do
307307

308308
RSYNC_LOG_TMP=$(mktemp)
309309
RSYNC_EXIT_CODE=0
310-
RSYNC_OPTS=("${RSYNC_BASE_OPTS[@]}")
310+
RSYNC_OPTS=("${RSYNC_BASE_OPTS[@]}" --mkpath)
311311

312312
if [[ "$VERBOSE_MODE" == "true" ]]; then
313313
RSYNC_OPTS+=(--info=stats2,progress2)

0 commit comments

Comments
 (0)