CT 114: sftp.command in Backup-Skript und Check-Service auf volle ssh-Zeile ergänzt
ci-static / secret-scan (push) Successful in 21s
ci-static / yamllint (push) Successful in 30s
ci-static / ansible-syntax (push) Successful in 27s
ci-static / markdown-links (push) Successful in 23s

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 <vibe@mistral.ai>
This commit is contained in:
2026-11-27 07:22:38 +01:00
parent 2309cd9fab
commit cfc9597b30
2 changed files with 4 additions and 2 deletions
@@ -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
@@ -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)"