If you have created a cross-region backup, you can use the backup files to restore data to a new or existing instance. The destination instance can be in the same region as the source instance or in the backup's destination region.
Prerequisites
You have created a cross-region backup.
For more information about data restoration solutions, see Overview of data restoration solutions.
To restore data across regions for an ApsaraDB RDS for SQL Server instance, see Restore data across regions for an ApsaraDB RDS for SQL Server instance.
To restore data across regions for an ApsaraDB RDS for PostgreSQL instance, see Restore data across regions for an ApsaraDB RDS for PostgreSQL instance.
Usage notes
If the database proxy feature is enabled on the source instance and no privileged account is available, you may need to reset the new instance's password to connect to it.
Cross-region log backups are synchronized in near real time. The system scans for changes in local binary logs (binlogs) in the source region every 2 seconds and then incrementally uploads new logs to the destination region. Due to short delays in scanning and transmission, you might not be able to recover the most recent second of data in extreme cases, such as a complete region failure.
Restore data to a new instance
You can use the backup files of a source ApsaraDB RDS for MySQL instance to restore data to a new instance. This method is supported for instances that use Premium Local SSDs or cloud disks and does not affect source instance performance.
Premium Local SSDs
Log on to the ApsaraDB RDS console. In the left-side navigation pane, click Backups. In the top navigation bar, select a region.
On the Cross-region Backup tab, click the Backup Instances tab. Then, click the source instance ID to go to the Cross-region Backup Recovery page.
In the Actions column for the target backup set, click Restore.
Select Restore to New Instance and click OK.
On the Restore Instance page, configure the following parameters.
Parameter
Description
Billing method
Subscription: A prepaid billing method suitable for long-term use. You pay upon instance creation, and it is more cost-effective than pay-as-you-go, offering greater discounts for longer subscription periods.
Pay-as-you-go: A postpaid, hourly-billed method ideal for short-term needs. You can release the instance at any time to save costs.
Restoration mode
By backup set: Restores data from a specific backup set to the new instance.
By point in time: Restores data to the new instance from any point in time within the log backup retention period.
By backup set
If you set Restoration mode to By backup set, select the backup set to use for the restoration.
Restoration time
If you set Restoration mode to By point in time, specify the point in time to which you want to restore data.
NoteBoth local and cross-region log backups can be used for a point-in-time restore.
Region
The region for the new instance.
Deployment mode
You can deploy the instance in a Single-zone Deployment or across Multi-zone Deployment:
Single-zone Deployment: The primary and secondary nodes are in the same zone.
Multi-zone Deployment (Recommended): The primary and secondary nodes are deployed in different zones for disaster recovery.
Note
After the instance is created, you can view the information about the primary and secondary nodes on the Service Availability page.
Instances of Basic Edition support only single-zone deployment.
Instance type
Each instance type provides a specific allocation of CPU cores, memory, maximum connections, and maximum IOPS. For more information, see primary instance types.
Storage capacity
The storage space accommodates data, system files, binary log (binlog) files, and transaction files.
NoteParameters such as the database engine, version, and edition are inherited from the source instance and cannot be changed.
Click Next: Instance Configuration. Configure the network type and resource group for the instance by setting the following parameters.
Category
Description
Network type
classic network: The traditional network type.
VPC (Recommended): A VPC is an isolated network that offers higher security and performance than a classic network. If you select this option, you must also specify a VPC and a vSwitch of Primary Node.
NoteMake sure that the ApsaraDB RDS instance and the ECS instance that you want to connect to are in the same network. If you select the VPC network type, they must be in the same VPC. Otherwise, they cannot communicate over the internal network.
Resource group
Resource groups allow you to manage your Alibaba Cloud resources in logical groups. This simplifies resource organization and permission management. You can select an existing resource group or create a new one. If you have no resource grouping requirements, select the Default Resource Group.
-
Click Next: Confirm Order.
Click Next: Confirm Order.
-
(Optional) Log in to the new RDS instance and verify the data.
Cloud disks
Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.
In the left-side navigation pane, click Backup and Restoration.
Click the Cross-region Backups tab and select a region from the Region of Backup Set drop-down list.
In the Actions column of the target backup set, click Restore.
On the Restore Instance page, configure the following parameters.
Parameter
Description
Billing method
Subscription: A prepaid billing method suitable for long-term use. You pay upon instance creation, and it is more cost-effective than pay-as-you-go, offering greater discounts for longer subscription periods.
Pay-as-you-go: A postpaid, hourly-billed method ideal for short-term needs. You can release the instance at any time to save costs.
Restoration mode
By backup set: Restores data from a specific backup set to the new instance.
By point in time: Restores data to the new instance from any point in time within the log backup retention period.
By backup set
If you set Restoration mode to By backup set, select the backup set to use for the restoration.
Restoration time
If you set Restoration mode to By point in time, specify the point in time to which you want to restore data.
NoteBoth local and cross-region log backups can be used for a point-in-time restore.
Region
The region for the new instance.
Zone of primary node
An availability zone is an independent physical area within a region. All availability zones in a region are interconnected with low-latency links. You can create the ApsaraDB RDS instance and the ECS instance in the same availability zone or in different availability zones.
Instance type
Each instance type provides a specific allocation of CPU cores, memory, maximum connections, and maximum IOPS. For more information, see Primary instance types.
Storage capacity
The storage space accommodates data, system files, binary log (binlog) files, and transaction files.
Click Next: Instance Configuration. Configure the network type and resource group for the instance by setting the following parameters.
Category
Description
Network type
classic network: The traditional network type.
VPC (Recommended): A VPC is an isolated network that offers higher security and performance than a classic network. If you select this option, you must also specify a VPC and a vSwitch of Primary Node.
NoteMake sure that the ApsaraDB RDS instance and the ECS instance that you want to connect to are in the same network. If you select the VPC network type, they must be in the same VPC. Otherwise, they cannot communicate over the internal network.
Resource group
Resource groups allow you to manage your Alibaba Cloud resources in logical groups. This simplifies resource organization and permission management. You can select an existing resource group or create a new one. If you have no resource grouping requirements, select the Default Resource Group.
-
Click Next: Confirm Order.
Confirm the Parameter Configuration, select the Quantity and Duration (for subscription instances only), click Pay Now, and complete the payment.
Note
For subscription instances, we recommend that you select Auto-renewal. This saves you from the need to perform manual renewals and prevents service interruptions caused by overdue payments.
-
(Optional) Log in to the new RDS instance and verify the data.
Restore data to an existing instance
Cross-region restores to an existing instance are supported only for instances that use Premium Local SSDs.
To restore data to an existing instance across regions, you must first enable database and table-level backup for the instance and have at least one backup set available.
Log on to the ApsaraDB RDS console. In the left-side navigation pane, click Backups. In the top navigation bar, select a region.
On the Cross-region Backup tab, click the Backup Instances tab. Then, click the source instance ID to go to the Cross-region Backup Recovery page.
In the Actions column for 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
Restoration mode
By backup set: Restores data from a specific backup set to the existing instance.
By point in time: Restores data to the existing instance from any point in time within the log backup retention period.
Region
The region where the destination instance is located.
Destination Instance
The target instance for the restoration.
Databases and tables to restore
Select the databases and tables to restore.
Selected databases and tables
Specify the names for the restored databases and tables. By default, the suffix
_backupis added to the original names.Click OK.
Related documents
After you create an instance, you must configure a whitelist and create an account. If you want to connect to the instance over the internet, you must also apply for a public endpoint. Then, you can connect to the instance.
Related APIs
API | Description |
Verifies that a cross-region backup set is available for a cross-region restore. | |
Restores data to a new instance across regions. | |
Modifies the cross-region backup settings of an ApsaraDB RDS instance. | |
Queries the cross-region backup settings. | |
Lists the cross-region data backup files. | |
Lists the cross-region log backup files. | |
Lists the available destination regions for cross-region backups from the current region. | |
Queries the restorable time range of a backup file. | |
Queries the cross-region backup settings for instances in the specified region. |