diff --git a/infrastructure/production/host/config.env.example b/infrastructure/production/host/config.env.example index a4aa495..8c1d748 100644 --- a/infrastructure/production/host/config.env.example +++ b/infrastructure/production/host/config.env.example @@ -51,9 +51,11 @@ STALWART_WEBHOOK_SECRET="" # REQUIRED — openssl rand -hex 32 # --- Restic backups (host) ------------------------------------------------ # Storage Box is SSH/SFTP on PORT 23, key auth. STORE RESTIC_PASSWORD OFFLINE. +# NOTE: the Storage Box drops you in /home, so the repo path needs the /home +# prefix (an absolute /dezky hits the root-owned chroot parent and fails). RESTIC_PASSWORD="" # REQUIRED — openssl rand -hex 32 (save offline!) -BACKUP_PRIMARY_REPO="" # sftp:@.your-storagebox.de:/dezky -BACKUP_DR_REPO="" # sftp:@.your-storagebox.de:/dezky (Helsinki box) -BACKUP_PATHS="/opt/stalwart/data /opt/stalwart/etc /var/lib/rancher/k3s/server/db/snapshots /var/lib/rancher/k3s/storage" +BACKUP_PRIMARY_REPO="" # sftp:@.your-storagebox.de:/home/dezky +BACKUP_DR_REPO="" # sftp:@.your-storagebox.de:/home/dezky (Helsinki box) +BACKUP_PATHS="/opt/stalwart/data /opt/stalwart/etc /var/lib/rancher/k3s/server/db/snapshots /opt/dezky-backup/dumps" BACKUP_RETENTION="--keep-daily 7 --keep-weekly 4 --keep-monthly 6" BACKUP_HEALTHCHECK_URL="" # optional dead-man's-switch base URL diff --git a/infrastructure/production/host/restic/install.sh b/infrastructure/production/host/restic/install.sh index 07099c2..d52e75b 100755 --- a/infrastructure/production/host/restic/install.sh +++ b/infrastructure/production/host/restic/install.sh @@ -49,16 +49,24 @@ if [[ ! -f "$KEY" ]]; then ssh-keygen -t ed25519 -N "" -C "dezky-backup@node1" -f "$KEY" >/dev/null ok "Generated backup SSH key." fi -# Single wildcard config covers BOTH Storage Boxes (same domain, port 23, key). -cat > "$SSH_DIR/config" </dev/null; then + cat >> /root/.ssh/config < "$BACKUP_HOME/restic.env" <