This commit is contained in:
Gerard Bosch
2022-02-12 10:02:03 +01:00
parent 9ebc9ea641
commit 7dde85f25e
+10 -9
View File
@@ -66,18 +66,19 @@ done
restic unlock & restic unlock &
wait $! wait $!
# Do the backup! # Do the backup! (and capture the output for further processing)
# See restic-backup(1) or http://restic.readthedocs.io/en/latest/040_backup.html # See restic-backup(1) or http://restic.readthedocs.io/en/latest/040_backup.html
# --one-file-system makes sure we only backup exactly those mounted file systems specified in $RESTIC_BACKUP_PATHS, and thus not directories like /dev, /sys etc. # --one-file-system makes sure we only backup exactly those mounted file systems specified in $RESTIC_BACKUP_PATHS, and thus not directories like /dev, /sys etc.
# --tag lets us reference these backups later when doing restic-forget. # --tag lets us reference these backups later when doing restic-forget.
{ backup_output=$(restic backup \ { backup_output=$( \
--verbose="$RESTIC_VERBOSITY_LEVEL" \ restic backup \
--one-file-system \ --verbose="$RESTIC_VERBOSITY_LEVEL" \
--tag "$RESTIC_BACKUP_TAG" \ --one-file-system \
--option b2.connections="$B2_CONNECTIONS" \ --tag "$RESTIC_BACKUP_TAG" \
"${exclusion_args[@]}" \ --option b2.connections="$B2_CONNECTIONS" \
"${extra_args[@]}" \ "${exclusion_args[@]}" \
"${backup_paths[@]}" \ "${extra_args[@]}" \
"${backup_paths[@]}" \
| tee /dev/fd/3 & ) # store output in var for further proc; also tee to a temp fd that's redirected to stdout | tee /dev/fd/3 & ) # store output in var for further proc; also tee to a temp fd that's redirected to stdout
} 3>&1 } 3>&1
wait $! wait $!