diff --git a/docs/architecture.md b/docs/architecture.md index 6beec52..65f1368 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -233,10 +233,11 @@ credentials (S3 secret sealed) are Restart settings. ## 11. CLI -`in admin backup --out DIR`, `in admin backup-verify SET`, `in admin restore --from SET --data-dir NEW`, -`in admin export --user --out DIR` (plain tree with real names), `in admin fsck` (every row has -its blob, every blob has a row, sizes and hashes match; `--repair-thumbs`), `in admin audit-purge ---older-than-days N`. +A bare `in` (or `in serve`) runs the server. Backups are written by the server's backup worker. +`in restore --from SET` replaces the database with a verified set (server stopped; needs the same `in.key`). +`in export --member --out DIR` writes a plain tree with real names. `in fsck [--hash]` checks +that every row has its blob and every blob has a row (sizes, and hashes with `--hash`); it changes nothing. +`in quota recompute` recomputes used bytes. --- diff --git a/docs/conventions.md b/docs/conventions.md index 12c49e4..eed1b03 100644 --- a/docs/conventions.md +++ b/docs/conventions.md @@ -61,8 +61,9 @@ tokens, passwords, cookies, or secrets. - Constraints live in the schema (`NOT NULL`, `CHECK`, `UNIQUE`, `REFERENCES ... ON DELETE ...`), not only in Rust. - Backups: `snapshot_to(path)` with `VACUUM INTO` on the writer, then checkpoint the copy so it is one self-contained file, then fsync. `admin backup --out DIR` writes the snapshot, the blob tree (where the app - has one) and a `manifest.json` with a sha256 per file. `admin backup-verify SET` checks hashes, - `integrity_check` and contiguous migrations. Never copy a live DB file. + has one), a `manifest.json` with a sha256 per file and a `manifest.mac`: HMAC-SHA256 of the manifest bytes + under a subkey of the instance key, which lives outside the backup. Verify and restore check the MAC first + (constant time), then hashes, `integrity_check` and contiguous migrations. Never copy a live DB file. ## 5. HTTP and pages