052. Backups on our own Logos Storage nodes, encrypted to a Keycard

Status: superseded by ADR-077 (2026-11-01). Never built; re-checked against current Logos Storage, --block-ttl 0 expires blocks at once rather than never, so this design as written would have lost every backup. The inventory below still stands.

Context

Nothing on the fleet is backed up. The few ~/backups folders are copies made by hand before a risky change. An inventory of every machine on 2026-10-13 found what a lost disk would take with it:

Without the large items (Forgejo, the drop, TeslaMate), the set worth keeping is under 50 MB per machine. Source checkouts with a remote, build output, models (~/.local/share/whisper, 397 MB) and browser profiles (Foray's .browser, 2.8 GB) can all be fetched or rebuilt, so they are not backed up.

The off-the-shelf answer is restic to a server on two machines: it has encryption, deduplication, snapshots and pruning already built. We build on Logos Storage instead. It is the stack this project exists to use, a backup is a demanding first real job for it, and (below) it is the only route to a backup that does not live on our own machines.

What Logos Storage gives us today, from its source (the jimmy-crib checkout of 2026-09-17):

Blocks expire after --block-ttl, 30 days by default, unless that is set to 0. The current code has no erasure coding and no marketplace, so the only redundancy is the copies we place ourselves.

Decision

Three storage nodes on our own office mesh: the VPS, proteus and scribe. They have 88 GB, 943 GB and 905 GB free. pi5 and jimmy-crib are left out because their disks are small or nearly full. Each node:

A keeper beside each node is the only part reachable over the mesh. It does three things for fleet machines: it accepts an encrypted archive and stores it, it fetches a CID from the other nodes when told to, and it appends to its copy of the catalog. It has no delete call. A mesh member can add to the backups but cannot remove any.

Every machine, twice a day (a systemd timer at about 03:00 and 15:00, randomised):

  1. Tars its own list of paths. The list is per machine, from the inventory, kept in /etc/shrooms-backup/paths.
  2. Compresses it with zstd and encrypts it with age to the backup recipient.
  3. Hands it to the nearest keeper, which returns a CID.
  4. Tells the other two keepers to fetch that CID.
  5. Waits until all three report it with /exists.
  6. Records {machine, time, cid, size, sha256} in all three catalogs.

A run counts only when it is complete on all three. A partial run is reported, not counted. The large items (Forgejo, the drop, TeslaMate's database dump) run daily, as separate archives.

The key comes from a Keycard. A card does not hand out signing keys, but it does derive secrets for other uses.

Retention: every run for 14 days, then one a week for 12 weeks. The keepers prune together; whatever falls out of the catalog's retention is deleted from all three.

Checking: each day, a keeper fetches a random catalog entry from another node and checks its sha256 and its age header. That much runs without the card. Once a month, a person holding the card restores one machine's latest archive into a scratch directory and compares it with the live files. A backup nobody has restored does not count.

Consequences

Beyond our own mesh

The same design reaches past our machines without changing its shape. Archives are encrypted before they leave the machine, so a holder we do not trust is already accounted for. CIDs are content addresses, so they stay valid wherever the blocks live. And the catalog is only a list of CIDs.

When our nodes bootstrap from the public Logos Storage network, and storage has a dispersal mechanism again, two things change and nothing else. A dispersal mechanism means erasure coding across independent providers, with storage requests that are paid for and proven, as Codex had. The changes:

The backup then survives the loss of every machine we own. That is the point of building on Logos Storage rather than restic. Until then the nodes stay private, because nothing would keep our blocks on anyone else's disk.

What would change our mind