From f9cf93182871748c289e2f38dceb498a8d2a1566 Mon Sep 17 00:00:00 2001 From: MacRimi Date: Wed, 10 Jun 2026 20:10:26 +0200 Subject: [PATCH] Update run_scheduled_backup.sh --- scripts/backup_restore/run_scheduled_backup.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/backup_restore/run_scheduled_backup.sh b/scripts/backup_restore/run_scheduled_backup.sh index 2f9318d3..9fcf7ddf 100644 --- a/scripts/backup_restore/run_scheduled_backup.sh +++ b/scripts/backup_restore/run_scheduled_backup.sh @@ -103,7 +103,13 @@ _sb_run_borg() { passphrase="${BORG_PASSPHRASE:-}" [[ -z "$repo" || -z "$passphrase" ]] && return 1 + # Re-export the credentials so child processes (borg, ssh) inherit + # them. `source ` only assigns to the current shell — without + # an explicit re-export, child `borg` calls drop back to ssh defaults + # and a remote repo silently auth-fails with no log trail (since the + # call is also `>/dev/null 2>&1`). export BORG_PASSPHRASE="$passphrase" + [[ -n "${BORG_RSH:-}" ]] && export BORG_RSH if ! hb_borg_init_if_needed "$borg_bin" "$repo" "${BORG_ENCRYPT_MODE:-none}" >/dev/null 2>&1; then return 1