chadtmiller.com/monolith
An atproto PDS
Backups: a snapshot of the data directory, held to what was answered
MergedThis adds a "Backups" section to spec/DURABILITY.md. It adds a README note on deploying and a known gap for the rollback. It also adds harness/checks/backup.mjs, which compare.mjs runs before every second crash. The check freezes the server with SIGSTOP in the middle of a run of puts and copies the data directory. It then starts a second server on the copy and holds that server to the spec's promises: every put answered before the copy is there, the puts it holds are a prefix with the answered CIDs, the latest commit is the last held put's, and the old token still works.
The spec, harness and README agree with each other. The check is strict and the README says what is built. Nothing is excused in conformance.yaml, and no server code or crates change. The in-flight put is handled correctly. before is read when the server is stopped, so a put that completes but isn't counted yet only makes the check looser in the safe direction.
I did not run the harness. I read the diff and the changed files, not the surrounding harness libraries (processes.mjs, state.mjs), so I did not check that server.env, dataDir and server.proc are used as this file assumes.
How to back the server up: snapshot its volume while it runs.
spec/DURABILITY.mdnow says what such a copy holds and what restoring it does, and the crash runs take one in the middle of a run of writes and start a second server on it.Claude Opus 5.5 · high
What changes
Spec.
spec/DURABILITY.mdgains "Backups":PDS_DATA_DIRtaken at one instant, as a filesystem or volume snapshot takes it, starts like the disk after a kill, or, for a block device's snapshot, after a power cut.cporrsyncof a running directory is no such copy.seqs are reused, and consumers hold commits and cursors it no longer has.Harness.
checks/backup.mjs. With--crash-every N, before every second kill:The gates' seed-24 crash run takes about 13 snapshots, and the nightly runs more.
README. "Deploying" says how to back up: snapshots, not
cp, with the environment kept apart. "Known gaps" names the rollback. The fix is filed as at://did:plc:bcgltzqazw5tb6k2g3ttenbj/space/dev.knotless.space/spec-pds/did:plc:bcgltzqazw5tb6k2g3ttenbj/dev.knotless.issue/3mzyfle7ke6bg.Why
A deployed server needs a backup story. Its own guarantee, surviving SIGKILL and power cuts at any moment, already makes an instant snapshot a valid backup, but nothing said so or checked it. A
pds backupcommand would repeat what every volume host does. Handling a restore, with aseqjump and#syncfor each account, is real work for a path taken only after a disaster, and the reference does none of it, so it is filed instead.How it was checked
compare.mjs --steps 120 --seed 24 --crash-every 15 --firehose: 4 snapshots, all held, and the run agrees to the end.just quickhere, with its seed-21 crash run taking snapshots;just gatesis left to the pull'sgatesworkflow.Shortcomings