Backup and Restore Service · View 11 of 26 · 4 · Data
Decisions
- catalogue_event is the only table written to. Status, recovery ranges and custody copies are projections, so a correction appends an event and the history of what was once claimed survives.
- protection_status holds last_proven_restore and not last_backup_succeeded. The second field is deliberately absent from the status projection, so no dashboard can be built on it by accident.
- recovery_range records gaps explicitly. A WAL segment that never arrived is a hole in PITR coverage, and it is reported as one rather than smoothed over by the nearest base copy.
Numbers
- About 30 million artefacts at the retention horizon, most of them WAL and binlog batches. Recovery-point lookup is an index range scan on (datastore_id, from_ts), with a p95 target of 500 ms.
- Events are partitioned by month and kept for the life of the artefact plus 12 months.
Assumptions
- ULIDs as artefact ids, so ids sort by time and the envelope key prefix can be derived from them without a lookup.