Database Disaster Recovery allows you to restore the specified databases and tables to the original instance or a new instance based on a backup set or point in time without the need to restore full data. This feature is suitable for scenarios such as quick data correction after misoperations and historical data analysis.
Prerequisites
The source instance is Running.
A backup set is successfully backed up in the source instance. For more information about how to create a backup file, see Purchase a backup instance or Manually initiate a backup task.
Limits
You cannot restore backup data to an ApsaraDB RDS instance in another region.
Billing method
You are not charged for the restoration feature. However, if you restore data to a new ApsaraDB RDS instance, you are charged for the new instance. The new instance fees are related to the selected instance type and storage space. The actual fees on the bills prevail.
Procedure
- Log on to the DMS console V5.0.
In the top navigation bar, choose .
NoteIf you use the DMS console in simple mode, move the pointer over the
icon in the upper-left corner of the DMS console and choose . In the top navigation bar, select a region and click the ID of the data source that you want to manage to go to the data source details page.
If the data source is an Alibaba Cloud database, choose and then click Create Restore Task.
If the data source is a self-managed database hosted on an Elastic Compute Service (ECS) instance, an on-premises database, or a database from a third-party cloud (automatically backed up), go to the Backup Data page and then click Create Restore Task.
Specify the restoration destination and mode, and click Next.
Parameter
Description
Task Name
The name of the restoration task. We recommend that you specify a descriptive name that can help you identify the task. Task names do not need to be unique.
Restore To
Original Instance: The databases and tables are restored to the original instance.
New Instance(RDS): If you select this option, the system automatically creates an ApsaraDB RDS instance based on Step 5. The data in databases and tables of the original instance are restored to the new instance.
Restore Mode
By Backup Set: Select the backup set from which you want to restore data. Make sure that the backup set that you select is valid.
By Point in Time: Select a point in time based on the retention period of the backup set. The selected point in time must be within the time range available to restore. The time range is from the point in time to which the backup set is restored to the current system point in time. The time range cannot exceed 30 days.
NoteBy default, the log backup feature is enabled, and logs are readable. You cannot disable the feature.
The retention period of log backup sets is 30 days and cannot be changed.
Optional. If you select New Instance for the Restore To parameter, configure the parameters described in the following table.
Parameter
Description
Database Location
The location where the new instance resides. This parameter is set to RDS by default and cannot be modified.
Instance Region
The region where the new instance resides. The value of this parameter is the same as the region of the original instance and cannot be modified.
VPC
The virtual private cloud (VPC) where the new instance resides. For more information about how to create a VPC, see Create and Manage a VPC.
Instance Specifications
The specifications of the new instance. Select an instance specification from the available instance specifications that are displayed in the Data Disaster Recovery console.
NoteWe recommend that you select instance specifications higher than or equal to those of the original database instance. If the specifications of the new instance are lower than those of the original instance, the new instance may not be able to store all the data in the original instance. This results in data losses or makes the new instance unusable.
Storage Space
The storage space of the new instance. Select a size from the available storage space sizes that are displayed in the Data Disaster Recovery console.
NoteTo ensure that sufficient space is available for data restoration, we recommend that you select a storage space that is more than 1.3 times the storage space of the original instance or 5 to 6 times the size of the Data Disaster Recovery full backup set. This is because Data Disaster Recovery compresses backup data.
You can view the backup set size on the Backup Data page of the source instance. If the data source is an ApsaraDB instance, you must also go to the Logical Backup tab.
Select the objects that you want to restore and then click Submit.
Parameter
Description
Objects to Restore
In the Source Objects section, select the databases and tables that you want to restore and click the
icon to move the databases and tables to the Selected Objects section. You can click Edit to configure the databases and tables in the Selected Objects section. Conflict Handling
By default, this parameter is set to Rename Object with the Same Name. If you select this option, Data Disaster Recovery renames the new table that is to be created by the restoration task upon a conflict. For example, a table to be restored in the source database and an existing table in the destination database have the same name
job_info. In this case, Data Disaster Recovery renames the new table in the following format:job_info_dbs_<ID of the restoration task>_</Timestamp>.Wait until the precheck is complete. Then, click Start in the Precheck dialog box.
NoteYou can also click Cancel to choose not to immediately start the restoration task. To start the restoration task later, perform the following steps: Choose Task Management > Restore Tasks, find the restoration task that you want to start, and then click Start in the Actions column.
View the progress of a restoration task
To view the progress of a restoration task, you can choose Task Management > Restore Tasks.
The restoration time varies based on the specifications of the backup instance and the volume of the data to be restored. The higher specifications require the shorter restoration time. The larger data volume requires the longer restoration time. For more information, see Performance tests on backup and restoration.
If you restore data to a new ApsaraDB RDS instance, Data Disaster Recovery takes about 5 to 10 minutes to create a new instance. After the restoration task is complete, you can find the new ApsaraDB RDS instance in the ApsaraDB RDS console.
References
You can log on to the original or new instance and verify the data. For more information, see Use a client or the CLI to connect to an ApsaraDB RDS for MySQL instance.
FAQ
What do I do if a restoration task fails? How do I troubleshoot the issue?
A restoration task fails due to the following causes:
Cause 1: The authorized database account in Data Disaster Recovery does not have the permissions to restore the specified databases or tables.
Solution: Check whether the account that is used to restore data has the required permissions. For more information, see Account permissions.
Cause 2: The network of the server on which the database to be restored resides is abnormal.
Solution: Check the network of the database server and try to troubleshoot the issue that is found. If you cannot find a solution to your issue or the issue persists after troubleshooting, you can join the DingTalk group (ID 35585947) for technical support.