Migration Fallback
A migration fallback is a prepared procedure for returning clients to the source after switchover, with the target-side changes required by the recovery contract. Google’s database migration guide treats this as a reverse migration. Problems may emerge days or weeks later when a business cycle first exercises affected functionality, so the return path needs preparation before the switch.
A backup supplies recoverable data; it does not by itself supply a complete return procedure. PostgreSQL, for example, can restore a compatible base backup and replay archived WAL to recover later state. A standalone snapshot contains no subsequent writes, and one engine’s logs cannot be assumed usable by another. Backup-based reconstruction can be part of a fallback if the full process meets its objectives. A deployment rollback restores a retained version within its scope; it does not automatically reconcile the current data or undo external actions. In a fictional telecom, the team had only Saturday’s copy and no tested way to recover the following six days onto the old system.
Preparing the reverse path
Capture the required target changes before the first production write and maintain the ability to apply them to the source throughout the stated window. Preserve identities, ordering dependencies, deletes, and safe retry behavior. At return time, fence target writers, resolve in-flight transactions, verify durable reverse application through every final position, reconcile the result, then hand write authority and client traffic back. A marker is sufficient only within a scope where it cannot overtake the changes it represents; parallel paths need their own completion evidence. Check that retries or restarted clients cannot duplicate payments and notifications already performed.
The source schema and old clients must represent the state and behavior promised by the recovery contract. Aggregation or lossy conversion can make that impossible without retained detail. Preserve that information, add a compatible adapter, restrict target-only features during the window, or revise the scope. Required information that cannot be represented blocks fallback approval; any permitted loss must be explicitly bounded and accepted. Compatibility may require old-client changes, but need not mean copying every target implementation change. Rehearse the data transfer, dependencies, client behavior, and external-effect handling together, and revalidate after material changes.
Decide whether this reverse path is worth maintaining by comparing it with other tested recovery options. Record acceptable interruption, data loss, erroneous business effects, and uncertainty in repair time. A forward fix or target restore may be sufficient; a plan that cannot meet its objectives needs a delayed switch or redesign, rather than a fallback promised on paper. Rehearse the chosen recovery path. If no return to the source is planned, explicitly state that choice and its consequences.
The fallback window should cover the risks it is meant to address, including business cycles that may reveal late failures. In the telecom’s later migration, reverse synchronization and compatible old clients remained available through three month-end validations. An isolated representative rehearsal before production cutover completed the return in forty minutes; the team did not need it in production. After accepting the results, it closed the fallback window and relied on the approved target recovery plan. How this fits with reconciliation, cutover, and retirement is covered in The Counts Matched and the Totals Did Not.
References:
- Google Cloud Architecture Center: Database migration: Concepts and principles (Part 2) (CC BY 4.0).
- PostgreSQL documentation: Continuous Archiving and Point-in-Time Recovery.
Discover more from Insightful Data Lab
Subscribe to get the latest posts sent to your email.
