- Offsite backup is now live: restic over SFTP to the CVM host via a scoped ~/.ssh/config alias (no host/key in tracked files); restic.env (600, outside the repo) holds the repo URL + generated password. Verified: first push dedupes to ~32 MiB and 'restic check --read-data-subset=10%' is clean. - scripts/drill-relay.mjs: throwaway in-memory NIP-01 relay (ws) for restore drills. Ran the loop end-to-end against the real archive: 114/114 events restored, 0 missing. Scripts/docs only — the deploy timer skips this (no Netlify credits).
32 lines
1.2 KiB
Text
32 lines
1.2 KiB
Text
# Template for the offsite backup target used by scripts/backup-relay.sh.
|
|
# Copy to ~/.config/skatespots/restic.env and fill in — that file is outside the
|
|
# repo and must never be committed.
|
|
#
|
|
# Any restic backend works. Examples:
|
|
# Backblaze B2: RESTIC_REPOSITORY=b2:my-bucket:skatespots/relay
|
|
# S3 / R2: RESTIC_REPOSITORY=s3:https://<account>.r2.cloudflarestorage.com/<bucket>
|
|
# SFTP directly: RESTIC_REPOSITORY=sftp:user@host:/srv/skatespots-backups
|
|
# SFTP via an ~/.ssh/config alias (keeps the key path out of this file):
|
|
# Host my-backup
|
|
# HostName <host>
|
|
# User <user>
|
|
# IdentityFile ~/.ssh/backup_key
|
|
# → RESTIC_REPOSITORY=sftp:my-backup:/path/to/repo
|
|
#
|
|
# Configured here: the CVM host over SFTP using the `skatespots-cvm` ssh alias
|
|
# (see AGENTS.md → Relay archive).
|
|
#
|
|
# One-time init, from this machine:
|
|
# set -a; . ~/.config/skatespots/restic.env; set +a
|
|
# restic init
|
|
#
|
|
# Then the weekly timer will keep it in sync (restic backup + forget --prune).
|
|
|
|
RESTIC_REPOSITORY=
|
|
RESTIC_PASSWORD=
|
|
|
|
# Backend credentials (only the ones your backend needs):
|
|
# AWS_ACCESS_KEY_ID=
|
|
# AWS_SECRET_ACCESS_KEY=
|
|
# B2_ACCOUNT_ID=
|
|
# B2_ACCOUNT_KEY=
|