When does database rollback change?

Picture a store moving its orders database to a new cloud environment. At 14:00, the team sends writes to the new database. By 14:08 it sees payment errors. Pointing the app back to the old database gets the application online, but any valid orders or refunds written after 14:00 need to be accounted for first.

Record that boundary before you start. Put the currently writable database, the final replication position and the person authorized to switch writers in the runbook. Keep one authoritative writer during the transition unless the system was designed and tested for concurrent writes.

How do you protect the writes made after cutover?

A rollback can use a tested reverse replication path or a replay of durable changes into the old system. Verify the replay handles updates and deletes as well as inserts. If the old schema can’t represent a new record, decide how to recover forward before the first production write.

Airbnb’s key-value store migration describes keeping writes durable and using shadow reads and dual-write modes. project44’s engineering team used change capture to move records without inserting dual-write logic throughout the old service. The common idea is to make the change stream something you can inspect and validate.

What should your rehearsal prove?

In staging, switch the writer, submit a test order, update its address and issue a refund. Trigger rollback. Check the same order ID on the original side and reconcile the refund against the payment ledger. A matching total row count can miss an incorrect order status or a duplicated refund.

AWS DMS can compare rows between supported sources and targets. Pair that validation with business checks, and time how long it takes to recover. Write down the point after which the team will fix forward if a clean rollback would exceed the agreed recovery window.

If you’re moving a stateful service to AWS or Google Cloud, bring the app’s dependencies, its current deployment workflow and your recovery window. Inframan can help you plan the application rollout and rehearse traffic rollback alongside your team’s database migration plan.

Walk through your migration with Inframan