Create a disaster recovery instance (set up a disaster recovery instance group)
This topic explains how to create a cross-region disaster recovery instance for a primary ApsaraDB RDS for SQL Server instance, which allows you to quickly establish a cross-region disaster recovery architecture. If your primary instance fails or its region becomes unavailable, you can promote the disaster recovery instance to the primary role to ensure business continuity, high availability, and disaster recovery. The disaster recovery instance also supports read-only access to offload query workloads from the primary instance. This capability is ideal for multi-region deployments that require low-latency access from local applications.
Key concepts
Before you begin, familiarize yourself with the following concepts:
-
disaster recovery instance group: A group that consists of a primary instance and a disaster recovery instance in a one-primary-one-secondary architecture. For more information, see Architecture.
-
primary instance: The instance serving the primary role in a disaster recovery instance group. It handles read and write requests and synchronizes data to the disaster recovery instance in real time.
-
disaster recovery instance: The instance serving the secondary role in a disaster recovery instance group. It provides the following benefits:
-
Cross-region disaster recovery: The disaster recovery instance acts as a remote disaster recovery node for the primary instance. If the primary instance or its region fails, you can use the disaster recovery instance to quickly restore services, ensuring data security and business continuity.
-
Cross-region read-only access: The disaster recovery instance supports read-only access to offload query workloads from the primary instance. This is suitable for multi-region deployments and read/write splitting scenarios, which allows applications to access data from a nearby location, reducing data access latency.
-
Fast data migration: You can quickly migrate business data to other regions by switching the disaster recovery instance to the primary role.
-
Prerequisites
If you are using a disaster recovery instance group for the first time, you must first authorize DTS to access your cloud resources.
Limits
Category | Limits on primary instance | Limits on disaster recovery instance |
Region limits |
Note To deploy disaster recovery in other regions, you can submit a ticket. | |
Version and configuration limits | The primary instance must meet the following requirements:
Note If the major version of the primary instance is not supported, you must upgrade the major version. | The disaster recovery instance must meet the following requirements:
|
Operation limits after a disaster recovery instance group is created |
|
|
Usage notes
-
A disaster recovery instance group supports only one primary instance and one disaster recovery instance.
-
An ApsaraDB RDS for SQL Server instance can be added to only one disaster recovery instance group, either as a primary or a disaster recovery instance.
-
Databases and accounts created on the primary instance are synchronized to the disaster recovery instance. However, high-privilege accounts on the primary instance become standard accounts after they are synchronized.
Billing
After you create a disaster recovery instance, the system automatically configures the primary and disaster recovery instances to form a disaster recovery instance group. For more information about billing, see Billing details.
-
If you set up a disaster recovery instance group using a new ApsaraDB RDS instance, you are charged for both the new instance and the DTS data synchronization task.
-
If you set up a disaster recovery instance group using an existing instance, you are not charged for the instance, but you are charged for the data synchronization task.
Method 1: Create a new disaster recovery instance
Primary instance page
-
On the RDS instances page, click the ID of the primary instance to open the Basic Information page.
-
In the section, click Add to the right of Disaster Recovery Instances.
NoteAfter you click Add, the system automatically creates a disaster recovery instance group on the Global Active Database page. You can go to this page to view the group.
-
On the instance creation page, note the following parameters:
For information about other parameters, see Create an ApsaraDB RDS for SQL Server instance.
Parameter
Description
Region
The supported regions are displayed on the console. Select a region that is different from the region of the primary instance.
Database Engine
By default, the database engine version of the disaster recovery instance is the same as that of the primary instance and cannot be changed.
Edition
Basic Edition and Cluster Edition are supported. Select an edition based on your business requirements.
Capacity
The storage capacity of the disaster recovery instance must be greater than or equal to that of the primary instance.
Character Set Collation Rule
The character set collation of the disaster recovery instance must be the same as that of the primary instance and cannot be changed.
-
After you complete the configuration, the cost details (for the ApsaraDB RDS instance and DTS task) are displayed on the right. Confirm the details and click Pay Now.
-
After successful payment, you are redirected to the details page of the disaster recovery instance group. The system then automatically creates a disaster recovery ApsaraDB RDS for SQL Server instance and a one-way DTS data synchronization link.
-
First, the system creates the disaster recovery ApsaraDB RDS for SQL Server instance, and the group status changes to Adding Secondary Instance. After the instance is created, the system establishes a data synchronization link, and the status changes to Creating Data Synchronization Task.
-
When the setup is complete, the instance group status changes to Running. You can then view the disaster recovery instance details and data synchronization performance on the group's details page.
-
Global Active Database page
-
Create a disaster recovery instance group
-
Go to the Global Active Database page and click Create Instance Group.
-
On the Create Global Active Instance Group page, configure the following parameters and click Yes.
Parameter
Description
Instance Group Name
Enter a custom name for the instance group. We recommend that you use a name related to your business for easy identification.
Naming conventions: The name must start with a letter or a Chinese character, can contain digits, underscores (_), and hyphens (-), and must be 2 to 126 characters in length.
Database Instance Type
Select SQL Server.
Instance Group Type
Disaster Recovery: Suitable for cross-region disaster recovery and disaster recovery drills. The primary role supports read and write operations, while the secondary role is read-only. Failover and promotion are supported.
Region of Primary Instance
This must be the same as the region selected in the ApsaraDB RDS console. To select a different region, change the region in the top navigation bar of the console.
Primary Instance
From the drop-down list, select an ApsaraDB RDS for SQL Server instance in the primary role's region.
If no instances are available in the current region, click Create Primary Instance to go to the purchase page and create one.
-
-
Create a disaster recovery instance
-
On the Global Active Database page, find the target instance group and click Add Secondary Instance in the Actions column.
-
On the instance creation page, note the following parameters:
For information about other parameters, see Create an ApsaraDB RDS for SQL Server instance.
Parameter
Description
Region
The supported regions are displayed on the console. Select a region that is different from the region of the primary instance.
Database Engine
By default, the database engine version of the disaster recovery instance is the same as that of the primary instance and cannot be changed.
Edition
Basic Edition and Cluster Edition are supported. Select an edition based on your business requirements.
Capacity
The storage capacity of the disaster recovery instance must be greater than or equal to that of the primary instance.
Character Set Collation Rule
The character set collation of the disaster recovery instance must be the same as that of the primary instance and cannot be changed.
-
After you complete the configuration, the cost details (for the ApsaraDB RDS instance and DTS task) are displayed on the right. Confirm the details and click Pay Now.
-
After successful payment, you are redirected to the details page of the disaster recovery instance group. The system then automatically creates a disaster recovery ApsaraDB RDS for SQL Server instance and a one-way DTS data synchronization link.
-
First, the system creates the disaster recovery ApsaraDB RDS for SQL Server instance, and the group status changes to Adding Secondary Instance. After the instance is created, the system establishes a data synchronization link, and the status changes to Creating Data Synchronization Task.
-
When the setup is complete, the instance group status changes to Running. You can then view the disaster recovery instance details and data synchronization performance on the group's details page.
-
-
Method 2: Add an existing instance
You can add an existing ApsaraDB RDS for SQL Server instance as a disaster recovery instance, provided it meets the limitations described above.
-
Create a disaster recovery instance group
-
Go to the Global Active Database page and click Create Instance Group.
-
On the Create Global Active Instance Group page, configure the following parameters and click Yes.
Parameter
Description
Instance Group Name
Enter a custom name for the instance group. We recommend that you use a name related to your business for easy identification.
Naming conventions: The name must start with a letter or a Chinese character, can contain digits, underscores (_), and hyphens (-), and must be 2 to 126 characters in length.
Database Instance Type
Select SQL Server.
Instance Group Type
Disaster Recovery: Suitable for cross-region disaster recovery and disaster recovery drills. The primary role supports read and write operations, while the secondary role is read-only. Failover and promotion are supported.
Region of Primary Instance
This must be the same as the region selected in the ApsaraDB RDS console. To select a different region, change the region in the top navigation bar of the console.
Primary Instance
From the drop-down list, select an ApsaraDB RDS for SQL Server instance in the primary role's region.
If no instances are available in the current region, click Create Primary Instance to go to the purchase page and create one.
-
-
Add the existing instance as a disaster recovery instance
-
Go to the RDS instances page. In the top navigation bar, select the region of the target instance that you want to use as the disaster recovery instance. Then, click the instance ID.
-
In the upper-right corner of the page, click Add to Global Active Database Cluster.
-
In the dialog box that appears, verify the information for the disaster recovery instance (secondary role) and select the disaster recovery instance group that you created.
In the Add to GAD Cluster Information section, select the Region where the target Global Active Database is located, and then select the corresponding disaster recovery instance group from the Select Global Active Database (Name/ID) drop-down list.
-
Click Check. After the pre-checks pass, review the data synchronization fee and click OK.
You are redirected to the details page of the disaster recovery instance group. The system automatically creates a one-way DTS data synchronization task.
-
The system creates the data synchronization link between the primary and disaster recovery instances. The instance group status is Creating Data Synchronization Task.
-
After the task is complete, the status changes to Running. You can then view information such as the disaster recovery instance and data synchronization performance on the disaster recovery instance group details page.
-
-