Fail over to secondary disks and reverse-replicate back to primary disks for multi-disk disaster recovery.
Failover and reverse replication operations on a replication pair-consistent group apply to all replication pairs in the group.
Prerequisites
-
Primary disks are detached from ECS instances and in the Unattached state (see Detach data disk), or the attached ECS instances are in the Stopped state.
NoteThis ensures primary disks are read-only during reverse replication, preventing replication failure.
-
We recommend that you create snapshots to back up disk data. See Create a snapshot.
NoteSnapshots are billed. See Snapshot billing.
(Optional) Step 1: Perform a disaster recovery drill
After async replication is activated, the group continuously replicates data from primary disks to secondary disks. Use the disaster recovery drill feature to clone secondary disk data to new drill disks and verify application integrity at the secondary site. A drill does not affect async replication, and a primary-site disk fault does not affect the drill. However, a secondary-site disk fault may cause a drill exception.
Log on to the EBS console.
In the left navigation bar, select .
In the upper-left corner of the page, select a region and resource group.
-
On the Replication Pair-Consistent Group page, find the target group and click its ID.
-
In the Drills section, click Create Drill.
-
In the Create Drill message, confirm the region and zone, and click OK.
A drill disk is created for each secondary disk in the group's zone, matching the secondary disk configurations. Each drill disk contains data at the most recent recovery point, which you can use to verify application integrity.
Note-
You can create multiple drills to back up data at different recovery points.
-
After the drill completes, delete the drill and drill disks in the Drills section promptly to reduce costs.
-
Step 2: Perform a failover
A failover may suspend async replication. Perform a failover only when a primary disk fails to prevent data loss.
-
In the top navigation bar, switch to the region of the secondary site, such as China (Beijing).
-
Find the target group and choose
> Failover in the Actions column.NoteAlternatively, click the group ID and click Failover in the upper-right corner.
-
In the message that appears, read the notes and click OK.
After the failover, Failed Over appears in the Status column.
-
Attach the secondary-site disks to temporary ECS instances to resume business operations.
See Create an instance with Custom Launch and Attach a data disk.
Step 3: Perform a reverse replication
After reverse replication, disk data at the primary site is overwritten by secondary-site data. Create snapshots for primary-site disks to prevent data loss. See Create a snapshot.
-
In the top navigation bar, switch to the region of the secondary site, such as China (Beijing).
-
Find the failed-over group and choose
> Reverse Replication in the Actions column.NoteAlternatively, click the group ID and click Reverse replication in the upper-right corner.
-
In the Reverse replication message, read the notes and click OK.
The group enters the Stopped state, and the primary/secondary site relationship is reversed.
NoteThe original primary site becomes the secondary site, and vice versa. Example:
-
Before reverse replication: China (Beijing) is the primary site, China (Shanghai) is the secondary site.
-
After reverse replication: China (Shanghai) becomes the primary site, China (Beijing) becomes the secondary site.
-
-
Find the reverse-replicated group and click Start in the Actions column.
Async replication starts, replicating data from the original secondary-site disks to the original primary-site disks.
When the group enters the Normal state, data replication is complete, and disaster recovery is finished.
-
(Optional) Restore the initial relationship between the primary site and secondary site in the replication pair-consistent group.
Reverse replication reverses the primary/secondary relationship. To restore the original relationship, perform the following operations:
-
Check the Secondary Region/Zone column and switch to that region in the top navigation bar.
-
Find the group and choose
> Failover in the Actions column. -
Choose
> Reverse replication in the Actions column. -
After reverse replication completes, click Start in the Actions column to reactivate the group.
-
Verify that the Primary Region/Zone and Secondary Region/Zone columns show the original relationship.
-