Repository navigation
backups: encrypted per-machine storage box sub-accounts, + coaxmetal, styx, acheron, yellow - #107
Merged
Merged
Conversation
added 6 commits
October 19, 2026 09:34
Every machine now backs up into its own Hetzner storage box sub-account (isolation: one machine's ssh key can't read or delete another's archives), into ./borg in the sub-account's home. lass.backup.user replaces lass.backup.repo and enables the job; host, port 23 and the box's host key are module defaults, so a machine's backup.nix is only the sub-account. Repos are always encrypted (repokey-blake2). The passphrase comes from a per-machine clan vars generator borgbackup-repokey; it lives in the password store, so passphrase + repo are enough to restore. The borgbackup ssh key generator is unchanged. neoprism moves to a new repo on u550643-sub1 (doInit creates it); the old unencrypted repo u550643@...:/./neoprism is no longer referenced and is removed by hand. Its paths, excludes and hooks are unchanged. The job stays `hetzner`: with fresh repos nothing gains from a rename, and the unit name is used for the postBackup hooks. The timers get a fixed random delay of up to 1h after 03:00, so the machines sharing the box don't all start at once.
Each machine gets a backup.nix with its storage box sub-account (coaxmetal sub2, styx sub3, acheron sub4, the yellow container sub5); what is backed up is declared next to the services: - coaxmetal: the hermes home without caches, toolchains, git clones, node_modules and target dirs. Every *.db under .hermes (except cache/), also in subdirs such as cron/ and the matrix crypto store, is dumped with sqlite3 .backup into /var/backup/hermes, recreated each run so removed databases don't linger; the live files are excluded. - styx: n8n's DynamicUser state (/var/lib/private/n8n), its default SQLite database dumped. - acheron: zigbee2mqtt (devices, coordinator backup; database.db is JSON) and mosquitto's retained messages as plain copies. - yellow: jellyfin, sonarr, radarr, prowlarr, jellyseerr and sabnzbd configs with their SQLite databases dumped. Excluded: jellyfin metadata, logs and transcodes, servarr MediaCover and logs (also logs.db), jellyseerr cache and logs, sabnzbd's incomplete Downloads and logs. Media and downloads live in /var/download and are not backed up. A missing database fails the hook instead of sqlite3 creating an empty one. Grafana (coaxmetal, styx) is not backed up: datasources and dashboards are provisioned from the repo, admin password and secret key come from vars, anonymous users are viewers; both instances only have the four provisioned dashboards.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Already deployed to neoprism, styx, acheron, yellow and coaxmetal from this branch; first backup into each encrypted sub-account repo succeeded (neoprism 12 min / 15 GB, coaxmetal 2 min, yellow 2 min, styx, acheron). Includes the generated public vars (ssh pubkeys).