What is failback procedure?
In the world of Disaster Recovery, "Failover" is the frantic 3:00 AM sprint to get the business back online. Failback is the calm, calculated walk back home once the crisis has passed.
Failback is the procedure of returning operations to the original Primary site after it has been repaired. While it sounds simple, it is often more technically complex than the initial failover because you have to ensure the data that changed during the outage is safely merged back.
While your Primary site was "dead," your Standby site was busy processing thousands of new transactions. If you simply turn the old Primary back on, it is now outdated and disconnected.
To perform a successful failback, you must:
Resynchronize: Get the new data from the "Temporary Primary" (the old standby) back to the "Original Primary."
Reinstate: Convince the old Primary that it is now a Standby.
Swap Roles: Perform a graceful switch to make the original site the Boss again.
In the old days, failback required a full rebuild of the original database (restoring multi-terabyte backups), which could take days. Today, Oracle uses Flashback Database to make this near-instant.
Step 1: You fix the hardware/power at the original site.
Step 2: You boot up the original Primary. It thinks it's the Boss, but it sees another Boss online.
Step 3: You issue the REINSTATE command.
Step 4: Oracle uses Flashback Logs to "rewind" the original Primary to the exact moment the failover happened (removing any "split-brain" data).
Step 5: It then starts pulling the missing redo logs from the current active site to catch up.
Failover is an emergency (Unplanned). It usually involves potential data loss and is done when the primary is unreachable.
Failback is a maintenance task (Planned). It is done during a scheduled window, involves zero data loss, and is graceful.
Don't Rush: Wait until the original site is 100% stable. If you failback to a "shaky" server, you'll just end up failing over again.
Check the Lag: Never attempt the final role swap until the "Apply Lag" is near zero.
Use the Broker: The Data Guard Broker makes failback a two-click process rather than a 20-step manual nightmare.
Once your old primary is fixed and mounted, you simply talk to the Broker:
A failback is the ultimate test of your DR strategy. If you can failover in 2 minutes but it takes you 2 days to failback, your strategy is incomplete. By using Flashback Database, you ensure that returning home is just as fast as fleeing the house.