Expand description
Backup capture and restore planning over the audit database.
Modules§
- capture
- Re-exports used by the executors.
- extractor
- Backup spec extraction (
backup/extractor.tsport): what to capture before a mutation so it can be undone. - journal
- Operation journal (D3): durable, crash-recoverable records linking backups, mutations, and audit across the local/remote database boundary. Because the audit DB and the target server cannot share a distributed transaction, every gated mutation writes journal transitions; a crash between remote commit and local finalization leaves a visibly ambiguous record rather than silent success/failure.
- restore
- Backup restore (legacy
backup/restore.tsport): build a dialect-specific replay plan from a stored backup row, then execute it inside one transaction. Row backups replay as upserts, schema backups as their capturedCREATE TABLE, and insert-hint backups as the DELETE of exactly the rows the original INSERT created. The restore always goes through the normal gate when invoked as a tool (it counts as a write).
Structs§
- Backup
Detail - Backup
Row - Backup listing row (legacy shape).
- Captured
Backup
Enums§
Functions§
- capture_
backup_ sqlite - Capture a pre-mutation backup from a SQLite handle, enforcing the row and byte caps with the policy’s overflow behaviour.
- capture_
insert_ hint - Record an insert rollback hint (explicit PK values or autoincrement range) after a successful INSERT.
- get_
backup - insert_
rows_ backup_ row - Insert a rows/combined backup row (used by the MySQL path).
- insert_
schema_ backup_ row - Insert a schema-only backup row (used by the MySQL and SQLite paths).
- list_
backups