Skip to content

Commit ae32098

Browse files
authored
Merge pull request #16 from buildplan/mkdir_fix
mkdir fix with -R flag
2 parents 4bed96f + 814d806 commit ae32098

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ END_EXCLUDES
222222

223223
# =================================================================
224224
# SCRIPT INITIALIZATION & SETUP
225-
# v0.13 - 2025.08.10
225+
# v0.14 - 2025.08.10
226226
# =================================================================
227227
set -Euo pipefail
228228
umask 077
@@ -286,7 +286,7 @@ LOCK_FILE="/tmp/backup_rsync.lock"
286286
MAX_LOG_SIZE=10485760 # 10 MB in bytes
287287

288288
RSYNC_BASE_OPTS=(
289-
-a -z --delete --partial --timeout=60
289+
-aR -z --delete --partial --timeout=60
290290
--exclude-from="$EXCLUDE_FILE_TMP"
291291
-e "ssh ${SSH_OPTS_STR:-}"
292292
)
@@ -331,7 +331,7 @@ send_notification() {
331331
}
332332

333333
run_integrity_check() {
334-
local rsync_check_opts=(-ainc -c --delete --exclude-from="$EXCLUDE_FILE_TMP" --out-format="%n" -e "ssh ${SSH_OPTS_STR:-}")
334+
local rsync_check_opts=(-aincR -c --delete --exclude-from="$EXCLUDE_FILE_TMP" --out-format="%n" -e "ssh ${SSH_OPTS_STR:-}")
335335

336336
for dir in $BACKUP_DIRS; do
337337
local remote_path="${REMOTE_TARGET}${dir#/}"

backup_script.sh

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

33
# =================================================================
44
# SCRIPT INITIALIZATION & SETUP
5-
# v0.13 - 2025.08.10
5+
# v0.14 - 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-
-a -z --delete --partial --timeout=60
69+
-aR -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=(-ainc -c --delete --exclude-from="$EXCLUDE_FILE_TMP" --out-format="%n" -e "ssh ${SSH_OPTS_STR:-}")
114+
local rsync_check_opts=(-aincR -c --delete --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#/}"

0 commit comments

Comments
 (0)