Promote a disaster recovery instance to primary
In a disaster recovery scenario, if the region of the primary instance is unavailable or if high replication lag prevents a standard switchover, you can manually promote a disaster recovery instance to become the new primary instance. This action allows you to quickly restore read and write operations for your services. After the promotion, the replication link between the original primary and disaster recovery instances is broken, and both run as independent instances.
Prerequisites
The disaster recovery instance group must be in the Running state.
Considerations
-
Before you promote the disaster recovery instance, check the replication performance to monitor the replication lag between the primary and disaster recovery instances.
-
Promoting the disaster recovery instance may cause data loss if some data has not been replicated from the primary instance. Carefully assess the business risks before you proceed.
-
After the promotion, assess your services. If you need to connect to the new primary instance, change the endpoint in your application to the endpoint of the new primary instance. You must also configure the network settings between your application and the new primary instance, such as setting an IP allowlist and verifying network connectivity.
Procedure
-
Go to the Global Database page.
-
On the Global Database list page, click the instance ID of the target instance group.
-
In the List of RDS instances section at the bottom of the page, find the disaster recovery instance and click Upgrade to Primary Instance in the Action column.
-
Review the effects of the promotion and click Upgrade to Primary Instance again. During the promotion process, the following changes occur:
-
Disaster recovery instance group: The group continues to exist and its status remains Running. However, the group will contain only the newly promoted primary instance.
-
Original disaster recovery instance: This instance becomes the primary instance of the disaster recovery instance group. Its status changes from Deleting Data Replication Task to Running. The instance is converted to read/write (RW) mode and runs independently as an ApsaraDB RDS for SQL Server instance.
You can view this instance on the Instance List page. Make sure to switch to the target region.
-
Original primary instance: This instance is removed from the disaster recovery instance group but continues to run independently as an ApsaraDB RDS for SQL Server instance. The data, database connections, and access to the instance are not affected.
You can view this instance on the Instance List page. Make sure to switch to the target region. If you no longer need the original primary instance, you can release or unsubscribe from the instance to stop incurring charges.
-
Replication link: After the disaster recovery instance is promoted, the replication link between it and the original primary instance is broken. You are no longer charged for data replication.
-
Related operations
-
You can add a disaster recovery instance for the new primary instance to establish a new cross-region disaster recovery architecture.
-
If a disaster recovery instance group contains only a primary instance, you can delete the group. This action deletes only the group itself. The primary instance continues to run without affecting its accounts or data.
How to delete the group: Go to the Global Database page. In the Actions column, click Delete. Read the instructions in the dialog box and click OK.