Skip to content
Preptima
hardScenarioDesignMidSeniorStaff

A maintenance script deletes rows it should not have touched, and nobody notices for six hours. Walk me through the recovery.

6 min readUpdated 2026-08-15Target archetype: Big Tech, Enterprise Captive, Product Startup

Answer

Short answer

Replication propagates the deletion, so recovery depends on point-in-time restore from a base backup plus the write-ahead log, and the hard part is not the restore but extracting one tenant's rows from a shared store while the rest of the system keeps serving traffic.

Was this answer helpful?

Likely follow-ups

  • How do you find the exact moment to stop replaying the log when you only know the deletion happened some time overnight?
  • Your backup restore has never been run against a full-size dataset. What is the first number you would want, and how would you get it?
  • How would you make this class of mistake impossible for a maintenance script rather than merely recoverable?
  • The deleted rows are referenced by rows in three other tables that were then updated. What does restoring only the deleted table give you?

Related questions

Related Topics