When a source region becomes unavailable or data is accidentally modified, cross-region backups let you restore your ApsaraDB RDS for MySQL instance in a different region. Use this guide to restore data to a new instance (local disk or cloud disk) or to an existing instance.
Prerequisites
Before you begin, ensure that you have:
A completed cross-region backup
For other database engines, see Restore data across regions for SQL Server and Restore data across regions for PostgreSQL. For an overview of all restoration options, see Data restoration solution overview.
Usage notes
Database proxy and password reset: If the source instance has the database proxy feature enabled but no privileged account configured, reset the password before connecting to the restored instance.
Log backup synchronization and RPO: Cross-region log backups are synchronized in near real time. The system scans for changes in local binary logs (binlogs) every 2 seconds and incrementally uploads them to the destination region. Because of a short delay in scanning and transmission, you may not be able to recover data from the last second before a full regional outage.
Choose your restore path
This document covers three restore paths. Identify yours before proceeding:
| Goal | Disk type | Go to |
|---|---|---|
| Restore to a new instance | High-performance local disk | Restore to a new instance — local disk |
| Restore to a new instance | Cloud disk | Restore to a new instance — cloud disk |
| Restore to an existing instance | High-performance local disk only | Restore to an existing instance |
Restore to a new instance
Restoring to a new instance does not affect the performance of the source instance. Both high-performance local disks and cloud disks are supported.
Restore to a new instance — local disk
Applies to: Instances that use high-performance local disks.
Log in to the ApsaraDB RDS console. In the top navigation bar, select the region where the source instance is located.
In the left navigation pane, click Backups.
On the Cross-region Backup tab, click the Backup Instances tab, then click the ID of the source instance to open the Cross-region Backup Recovery page.
In the Actions column of the target backup set, click Restore.
Select Restore To New Instance and click OK.
On the Restore Database page, configure the following parameters.
The database engine, version, and edition match the source instance and cannot be changed.
Parameter Description Billing Method Subscription: Pay upfront for a set term. More cost-effective for long-term use. Pay-as-you-go: Billed hourly. Release the instance at any time to stop charges. Suitable for short-term use. Restoration Mode By Backup Set: Restore from a specific backup set. By Time Point: Restore to any point in time within the log backup retention period. By Backup Set When Restoration Mode is set to By Backup Set, select the backup set to restore from. Restore Time When Restoration Mode is set to By Time Point, specify the target point in time. Both local and cross-region log backups are supported for point-in-time restore. Region The region where the new instance will be created. Zone Single-zone Deployment: The primary and standby nodes are in the same zone. Multi-zone Deployment (Recommended): The primary and standby nodes are deployed across different zones for disaster recovery. Not available for RDS Basic Edition. NoteAfter the RDS instance is created, you can view information about the new RDS instance and its secondary RDS instance on the Service Availability page.
Instance Type Determines the number of CPU cores, memory, maximum connections, and maximum IOPS. See Primary ApsaraDB RDS instance types. Storage Capacity Includes space for data, system files, binary log files, and transaction files. Click Next: Instance Configuration, then configure the network type, resource group, and the following parameters.
Parameter Description Network Type Classic Network: Traditional network type. VPC (Recommended): A virtual private cloud (VPC) provides higher security and better performance. Requires selecting the VPC and Primary Node vSwitch. The RDS instance and the ECS instance it connects to must use the same network type. If both use VPC, they must be in the same VPC. Resource Group Assign the instance to a resource group to simplify resource and permission management. Select an existing group, create a new one, or use the Default Resource Group. Click Next: Confirm Order.
In the Parameters section, review the configuration. Set the Purchase Plan and Duration (required for subscription billing), accept the Terms of Service, click Pay Now, and complete the payment.
For subscription instances, enable Auto-Renew Enabled to avoid service interruptions if a payment becomes overdue.
(Optional) Log in to the new instance and verify the data. See Connect to an ApsaraDB RDS for MySQL instance.
Restore to a new instance — cloud disk
Applies to: Instances that use cloud disks.
Go to the Instances page. In the top navigation bar, select the region where the source instance is located, then click the instance ID.
In the left navigation pane, click Backup and Restoration.
Click the Cross-region Backups tab, then select a region from the Region of Backup Set list.
In the Actions column of the target backup set, click Restore.
On the Restore Database page, configure the following parameters.
Parameter Description Billing Method Subscription: Pay upfront for a set term. More cost-effective for long-term use. Pay-as-you-go: Billed hourly. Release the instance at any time to stop charges. Suitable for short-term use. Restoration Mode By Backup Set: Restore from a specific backup set. By Point In Time: Restore to any point in time within the log backup retention period. By Backup Set When Restoration Mode is set to By Backup Set, select the backup set to restore from. Restore Time When Restoration Mode is set to By Point In Time, select the target point in time. Both local and cross-region log backups are supported for point-in-time restore. Region The region where the new instance will be created. Zone An independent physical area within a region. Place the new RDS instance and its connected ECS instance in the same zone or different zones based on your availability requirements. Instance Type Determines the number of CPU cores, memory, maximum connections, and maximum IOPS. See Primary instance types. Storage Capacity Includes space for data, system files, binary log files, and transaction files. Click Next: Instance Configuration, then configure the network type, resource group, and the following parameters.
Parameter Description Network Type Classic Network: Traditional network type. VPC (Recommended): A virtual private cloud (VPC) provides higher security and better performance. Requires selecting the VPC and Primary Node vSwitch. The RDS instance and the ECS instance it connects to must use the same network type. If both use VPC, they must be in the same VPC. Resource Group Assign the instance to a resource group to simplify resource and permission management. Select an existing group, create a new one, or use the Default Resource Group. Click Next: Confirm Order.
In the Parameters section, review the configuration. Set the Purchase Plan and Duration (required for subscription billing), accept the Terms of Service, click Pay Now, and complete the payment.
For subscription instances, enable Auto-Renew Enabled to avoid service interruptions if a payment becomes overdue.
(Optional) Log in to the new instance and verify the data. See Connect to an ApsaraDB RDS for MySQL instance.
Restore to an existing instance
Applies to: Instances that use high-performance local disks only. Cloud disk instances do not support cross-region restore to an existing instance.
Before you begin, ensure that the destination instance has at least one available database- and table-level backup set.
Log in to the ApsaraDB RDS console. In the top navigation bar, select the region where the source instance is located.
In the left navigation pane, click Backups.
On the Cross-region Backup tab, click the Backup Instances tab, then click the ID of the source instance to open the Cross-region Backup Recovery page.
In the Actions column of the target backup set, click Restore.
Select Restore To Existing Instance and click OK.
In the dialog box that appears, configure the following parameters.
Parameter Description Restore Method By Backup Set: Restore from a specific backup set. By Point In Time: Restore to a point in time within the log backup retention period. Region The region where the destination instance is located. Destination Instance Name The destination instance to restore data to. Databases And Tables To Restore Select the databases and tables to restore. Selected Databases And Tables Set names for the restored databases and tables. The suffix _backupis appended to the original names by default.Click OK.
What to do next
After the new instance is created, complete the following steps before connecting to it:
Configure a whitelist to allow inbound connections.
(Optional) Apply for a public endpoint if you need to connect over the internet.
API reference
| API | Description |
|---|---|
| Precheck a cross-region backup | Checks whether an RDS instance has a cross-region backup set available for cross-region restore. |
| Restore data to a new instance across regions | Restores data to a new instance across regions. |
| Modify cross-region backup settings | Modifies the cross-region backup settings of an RDS instance. |
| Query cross-region backup settings | Queries the cross-region backup settings of an RDS instance. |
| Query cross-region data backup files | Queries the list of cross-region data backup files. |
| Query cross-region log backup files | Queries the list of cross-region log backup files. |
| Query available cross-region backup regions | Queries the destination regions available for cross-region backup from a selected source region. |
| Query the restorable time range | Queries the time range to which data can be restored using a cross-region backup set. |
| Query cross-region backup instances | Queries the instances with cross-region backup enabled in a specified region. |