Skip to content

backups: encrypted per-machine storage box sub-accounts, + coaxmetal, styx, acheron, yellow - #107

Merged
lassulus merged 6 commits into
masterfrom
backup-more
Oct 19, 2026
Merged

lassulus merged 6 commits into
masterfrom
backup-more

Conversation

@lassulus

Copy link
Copy Markdown
Owner

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).

Hermes 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.
@lassulus
lassulus enabled auto-merge (rebase) October 19, 2026 07:51
@lassulus
lassulus merged commit e10e148 into master Oct 19, 2026
12 checks passed
@lassulus
lassulus deleted the backup-more branch October 19, 2026 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant