dynamic fs args

This commit is contained in:
Erik Westrup
2022-02-12 19:59:03 +01:00
parent 0d92cca32d
commit 71d0e8c5c1

View File

@@ -57,6 +57,10 @@ for backup_path in "${backup_paths[@]}"; do
fi
done
# --one-file-system is not supportd on Windows (=msys).
FS_ARG=
test "$OSTYPE" = msys || FS_ARG=--one-file-system
# NOTE start all commands in background and wait for them to finish.
# Reason: bash ignores any signals while child process is executing and thus the trap exit hook is not triggered.
# However if put in subprocesses, wait(1) waits until the process finishes OR signal is received.
@@ -72,7 +76,7 @@ wait $!
# --tag lets us reference these backups later when doing restic-forget.
restic backup \
--verbose="$RESTIC_VERBOSITY_LEVEL" \
--one-file-system \
$FS_ARG \
--tag "$RESTIC_BACKUP_TAG" \
--option b2.connections="$B2_CONNECTIONS" \
"${exclusion_args[@]}" \