Add nightly restic backups to Scaleway Object Storage #4
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "agent/restic-backups"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds nightly restic backups of the VPS to the Scaleway bucket, including the panel's apps. See
BACKUPS.mdfor setup, day-to-day use and a full disaster-recovery runbook.What it does
One restic repository with three jobs (
backups.nix):panel/var/lib/containers+ rootless named volumes. Running containers are stopped during the backup (usually under a minute) and started again afterwards, even if the backup fails, so DBs inside apps are copied consistently.system/etc,/home,/root,/var/lib,/var/backup. Before it runs, Forgejo/Nextcloud/Authelia/panel SQLite DBs are.dumped (consistent while services run).maintenanceforget --prune(7 daily / 4 weekly / 6 monthly) +check --with-cache --read-data-subset=2GCost choices
Scaleway charges nothing for requests, only for stored GB-hours, egress over 75 GB/month, and Glacier restores. So:
ONEZONE_IA), half the price of Multi-AZ;/nix/store, container images, caches and Nextcloud previews are excluded (all rebuildable);/var/cache/restic, so metadata is downloaded once;Before merging / deploying
This won't build until two agenix secrets exist:
secrets/restic-password.ageandsecrets/restic-env.age(repo URL + Scaleway keys). Steps are inBACKUPS.md→ One-time setup. Keep the restic password and keys in a password manager as well.Testing
nixosConfigurations.vpsto a derivation in a Nix container (with dummy.agefiles and the panel input overridden to localmain). Also built and read the generated unit files and prepare/cleanup scripts, and ranbash -non them.BACKUPS.mdcovers that.🤖 Generated with Claude Code
https://claude.ai/code/session_01HA82gUd5tW9VHStkEKmgqu