Episode 7: nightly restic backup to S3 with consistent dumps, heartbeat, and a restore script for a fresh box
Claude-Session: https://claude.ai/code/session_01Y1BTehJjJ4Chr6YscVRXmn
This commit is contained in:
parent
80d5b00b67
commit
cf374770c4
7 changed files with 444 additions and 0 deletions
18
backup/.restic-env.example
Normal file
18
backup/.restic-env.example
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
# ~$ selfhostedops - restic credentials for backup/backup.sh
|
||||
# Copy to backup/.restic-env and chmod 600 it. The file is sourced by the
|
||||
# backup script and by you on a restore box (set -a; . ./.restic-env; set +a).
|
||||
|
||||
# Any S3-compatible bucket: Hetzner Object Storage, Backblaze B2, Wasabi,
|
||||
# MinIO or Garage on a second box. Use a key that can only see this bucket.
|
||||
RESTIC_REPOSITORY=s3:https://s3.example.com/selfhostedops-backup
|
||||
AWS_ACCESS_KEY_ID=GK0000000000000000000000
|
||||
AWS_SECRET_ACCESS_KEY=change-me
|
||||
AWS_DEFAULT_REGION=garage
|
||||
|
||||
# Encrypts everything in the repository. Generate with: openssl rand -hex 32
|
||||
# Store it in Vaultwarden AND somewhere outside the stack (paper, second
|
||||
# password manager): without it the backup is a pile of random bytes.
|
||||
RESTIC_PASSWORD=change-me
|
||||
|
||||
# Optional: Uptime Kuma push monitor "Nightly backup" (episode 6).
|
||||
# KUMA_PUSH_URL=https://status.example.com/api/push/XXXXXXXXXX
|
||||
Loading…
Add table
Add a link
Reference in a new issue