From cfc9597b308102426f2b33bfb077632d181cd762 Mon Sep 17 00:00:00 2001 From: spektr Date: Fri, 27 Nov 2026 07:22:38 +0100 Subject: [PATCH] =?UTF-8?q?CT=20114:=20sftp.command=20in=20Backup-Skript?= =?UTF-8?q?=20und=20Check-Service=20auf=20volle=20ssh-Zeile=20erg=C3=A4nzt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Follow-up zu 2309cd9 (Defaults/ssh_config); die beiden Templates enthielten noch die unvollstaendige Variante ohne Host und -s sftp. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe --- .../templates/litecoin-restic-check.service.j2 | 2 +- .../litecoin_backup/templates/litecoin-wallet-backup.sh.j2 | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/proxmox/lxc/ct-114-litecoin-wallet/ansible/roles/litecoin_backup/templates/litecoin-restic-check.service.j2 b/proxmox/lxc/ct-114-litecoin-wallet/ansible/roles/litecoin_backup/templates/litecoin-restic-check.service.j2 index a2de398..b9d6896 100644 --- a/proxmox/lxc/ct-114-litecoin-wallet/ansible/roles/litecoin_backup/templates/litecoin-restic-check.service.j2 +++ b/proxmox/lxc/ct-114-litecoin-wallet/ansible/roles/litecoin_backup/templates/litecoin-restic-check.service.j2 @@ -4,5 +4,5 @@ Description=Monthly restic check of the Litecoin wallet backup repository [Service] Type=oneshot Environment=SSH_AUTH_SOCK= -ExecStart=/usr/bin/restic check --read-data-subset=5% -r {{ litecoin_backup_repository }} -o sftp.command="ssh -F {{ litecoin_backup_ssh_config }}" --password-file {{ litecoin_backup_password_file }} +ExecStart=/usr/bin/restic check --read-data-subset=5% -r {{ litecoin_backup_repository }} -o sftp.command="ssh -F {{ litecoin_backup_ssh_config }} {{ litecoin_backup_target_user }}@{{ litecoin_backup_target_host }} -s sftp" --password-file {{ litecoin_backup_password_file }} Nice=10 diff --git a/proxmox/lxc/ct-114-litecoin-wallet/ansible/roles/litecoin_backup/templates/litecoin-wallet-backup.sh.j2 b/proxmox/lxc/ct-114-litecoin-wallet/ansible/roles/litecoin_backup/templates/litecoin-wallet-backup.sh.j2 index 8dc7d05..92b904e 100644 --- a/proxmox/lxc/ct-114-litecoin-wallet/ansible/roles/litecoin_backup/templates/litecoin-wallet-backup.sh.j2 +++ b/proxmox/lxc/ct-114-litecoin-wallet/ansible/roles/litecoin_backup/templates/litecoin-wallet-backup.sh.j2 @@ -12,7 +12,9 @@ export RESTIC_PASSWORD_FILE="{{ litecoin_backup_password_file }}" # ssh resolves ~ from the passwd entry, not from $HOME, so the restic sftp # backend gets a dedicated client config via sftp.command. -SFTP_COMMAND="ssh -F {{ litecoin_backup_ssh_config }}" +# restic 0.18: sftp.command is the COMPLETE ssh invocation (host and +# -s sftp included); restic does not append them when the option is set. +SFTP_COMMAND="ssh -F {{ litecoin_backup_ssh_config }} {{ litecoin_backup_target_user }}@{{ litecoin_backup_target_host }} -s sftp" backup_dir="{{ litecoin_backup_wallet_dir }}" today="$(date +%F)"