Backup and Restore Service  ·  View 09 of 26  ·  3 · Structure

Engine Adapters — One Contract, Six Mechanisms

How each kind of datastore is captured, how consistent the copy is, and how it can be restored, all behind one artefact contract.

Editable source SVG draw.io All views
Base copy Change log Consistency Encryption Restore forms PostgreSQL · 14 pgBackRest full · diff · block incr WAL archive-async timeout 60 s Engine-native repo cipher key from Transit PITR to the second MySQL · 4 XtraBackup full + incremental Binlog streamer mysqlbinlog --raw Engine-native xbstream encrypt PITR to the event TiDB · 3 BR snapshot at backup TSO BR log backup continuous Engine-native BR crypter Point restore ClickHouse · 6 BACKUP … base_backup incremental Part-level snapshot Encrypted disk Table or partition Volumes · 30 Velero + Kopia CSI data mover Crash unless hooked Kopia repo key Volume or path Buckets · 25 Object mirror seed once RGW notifications Kafka · persistent Per-object Envelope AEAD Prefix or object Engine Adapters — One Contract, Six Mechanisms Twelve config sources use the Kopia adapter on exports. Every adapter refuses to run against an uncertified version pair. v 1.0 · owner Backup Platform · date 2026-09

Decisions

  • Point-in-time recovery comes from each engine's native tool (pgBackRest, binlog, TiDB log backup), orchestrated but not reimplemented. The platform standardises the promise and the recovery-point map, not the replay code.
  • Every adapter implements the same contract: capture, write the envelope, report size, duration, log position, checksum and consistency level. A missing or unreadable result is a failed capture.
  • Volume snapshots are marked crash-consistent unless the owner declares a freeze hook. Restoring one of a running database is a crash recovery, and the catalogue says so.

Numbers

  • Tier 1 PostgreSQL: weekly full, daily differential, hourly block-incremental. Maximum chain depth 25, and never more than 7 days from a full.
  • WAL archive timeout is 60 s, which is what actually sets the 5-minute RPO. The rest is margin for the async push queue.

Risks

  • Tool-native expiry (pgBackRest expire, Velero repository maintenance, TiDB log truncate) wants to delete. It is switched off for capture identities and run by the disposal identity, with Object Lock as the backstop if its retention setting is ever wrong.
  • ClickHouse backup to an encrypted disk over S3, and TiDB BR against a locked bucket, are the two adapter behaviours the proof of concept must confirm before they are relied on.