CDC, Backup Integrity, and Point-in-Time Recovery

Change Data Capture (CDC) publishes database changes from logs or change streams to downstream systems such as search indexes, warehouses, and caches. Consumers must handle duplicates, lag, schema evolution, initial snapshots, and recovery when a log position expires. A storage-level row change is not automatically a meaningful domain event.

A consistent CDC bootstrap must establish a snapshot and a corresponding stream position without leaving a gap. Monitor connector offsets, lag age, schema errors, and sink failures. Make derived projections rebuildable where practical.

Point-in-time recovery combines a base backup with a complete sequence of archived changes up to a target time. Backups require encryption, access controls, retention, isolation from accidental deletion, and restore tests. Replication is not a substitute: corrupted or deleted data can replicate to every replica. Validate restored records with checksums, row counts, and business invariants.

Key Takeaways
  • CDC needs snapshot/stream coordination and idempotent consumers.
  • Backups are unproven until restore drills succeed.
  • Replication does not protect against every deletion or corruption event.