You can restore specific databases and tables from a backup set or to a point in time to the original instance or a new one. This process avoids a full data restore, making it ideal for quickly correcting operational errors or analyzing historical data.
Prerequisites
-
The data source is Running.
-
The data source must have a backup set in the Completed state. For information about how to create a backup, see Configure automatic backup for a data source or Manual backup.
Limitations
You cannot restore backup data to an ApsaraDB RDS instance in another region.
Billing
The restore feature is free of charge. However, if you restore data to a new ApsaraDB RDS instance, you are charged for the new instance. The fees for the new instance depend on its selected instance specifications and storage space, and the final cost is reflected on your bill.
Procedure
Log in to DMS 5.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. Then, click the ID of the target data source to open its details page.
-
For an Alibaba Cloud database: On the page, click the tab, and then click Create Restore Task.
-
For a self-managed database on an Elastic Compute Service (ECS) instance, an on-premises database, or a database from another cloud provider (with automatic backup): On the Backup Data page, click Create Restore Task.
-
-
Configure the restore destination and mode, and then click Next.
Parameter
Description
Restore task name
Enter a descriptive name for easy identification. The name does not need to be unique.
Restore to
-
Restore to Original Instance: The database and table data are restored to the original instance.
-
Restore to New Instance: A new ApsaraDB RDS instance is automatically created, and the data is restored to it. You must configure the new instance in Step 5.
Restore mode
-
By Backup Set: Select the target backup set from which to restore data. Make sure the data in the selected backup set is valid.
-
By Point in Time: Select a point in time within the retention period of the backup sets. The selectable time range begins at the earliest restore point of a valid backup set and ends at the current time. The maximum time range is 30 days.
Note-
Log backup is enabled by default and logs are readable. You cannot disable this feature.
-
The retention period for log backup sets is fixed at 30 days and cannot be changed.
-
-
-
(Optional) If you select Restore to New Instance, configure the following parameters.
Parameter
Description
Database location
The location of the new instance. This is set to RDS by default and cannot be changed.
Instance region
The region of the new instance. This is fixed to the same region as the data source and cannot be changed.
VPC
Select the Virtual Private Cloud (VPC) for the new instance. To create a VPC, see Create and manage a VPC.
instance specifications
Select the instance specifications for the new instance. The available options are displayed in the console.
NoteWe recommend that the new instance has specifications equal to or greater than those of the source instance. Using lower specifications can lead to data loss or operational issues.
storage space
The storage space for the new instance. The available options are displayed in the console.
NoteTo ensure enough space for the restore, we recommend a storage space that is at least 1.3 times the size of the source instance's storage space, or 5 to 6 times the size of the full backup set from Data Disaster Recovery (DBS), as DBS compresses data during backup.
You can view the backup set size on the Backup Data page of the data source. If the data source is an Alibaba Cloud database, you must also navigate to the Logical Backup tab.
-
Select the objects to restore and click Submit.
Parameter
Description
Restore objects
In the Source Objects box, select the databases or tables you want to restore, and click
to move them to the Selected Objects box. You can click Edit to configure the restored databases and tables.conflict handling
The default option is Rename if object with same name exists. For example, if a table named
job_infois restored and a table with the same name already exists, the system renames the new table tojob_info_dbs_<restore_task_ID>_<timestamp>. -
After the precheck is complete, click Start in the Precheck dialog box.
NoteYou can also click Cancel to postpone the restore task. To start it later, go to the Task Management > Restore Tasks page, find the task, and click Start in the Actions column.
View the restore progress
On the data source details page, navigate to Task Management > Restore Tasks to view the progress of the restore task.
-
The time required for a restore depends on the instance specifications and the size of the database. Higher specifications result in faster restores, while larger data volumes increase the restore time. For more information, see Backup and restore performance.
-
If you choose to restore to a new instance, the system takes about 5 to 10 minutes to create a pay-as-you-go ApsaraDB RDS instance. After the restore is successful, you can find the new ApsaraDB RDS instance in the ApsaraDB RDS console.
Related documentation
You can log on to the original or new instance to verify the data. For information about how to log on to an instance, see Connect to an instance.
FAQ
Q: What are the common causes of restore task exceptions, and how do I troubleshoot them?
A: Common causes include:
-
Reason 1: The authorized account for Data Disaster Recovery does not have the permissions to restore databases and tables.
Solution: See Account permissions to check if the account used for the restore has the necessary permissions.
-
Cause 2: The server hosting the database may have network connectivity issues.
Solution: Check the database server for these issues and resolve them. If the issue persists, contact us through the DBS customer service group (DingTalk group ID: 35585947) for assistance.