Portainer CE git stacks cannot bind-mount relative repo paths; sync auxiliary files to the host path documented in README.
1.5 KiB
1.5 KiB
backup stack
Kopia → Backblaze B2. Backs up /config, selected labdata paths (see SCOPE.md), and nightly SQL dumps.
Before first deploy
-
Backblaze B2 (recommended offsite — ~$6/TB/mo)
- Create a bucket (e.g.
valhalla-homelab-backup) - Create an Application Key scoped to that bucket
- Note the S3 endpoint for your region
- Create a bucket (e.g.
-
Fill
stack.envKOPIA_REPOSITORY_PASSWORD—openssl rand -hex 32B2_KEY_ID,B2_APPLICATION_KEY,B2_BUCKET,B2_ENDPOINT
-
Host paths
/config/kopia/{config,cache,logs}— Kopia state/config/backup/dumps— nightly SQL dumps/config/backup/{init-kopia.sh,snapshot-paths.txt,crontab,scripts/}— copied from this repo (Portainer CE cannot bind-mount relative git paths; sync after editing those files)
-
Register new Portainer git stack →
stacks/backup(one-time) -
Push → Portainer redeploys within 5 min
After deploy
- UI:
http://valhalla:51515(or addbackup.ginnoir.cominternal-only in Caddy) - Subscribe phone to ntfy topic
backup(or path inNTFY_URL) - Restore test (do once): pick a small dump from
/config/backup/dumps/, restore to a throwaway container
Schedule
| Time | What |
|---|---|
| 02:50 | backup-dump-databases.sh — SQL dumps |
| 03:00 | Kopia snapshots (paths in snapshot-paths.txt) |
If B2 creds are empty
Kopia still starts with UI — configure repository manually, then set policies for each path in snapshot-paths.txt.