All Products
Search
Document Center

Restore a database

Last Updated: Jun 03, 2020

DBS provides the database restore feature that allows you to restore a database to a specified time accurate to the second. You can also flexibly select restore objects.

Procedure

Log on to the DBS console. In the left-side navigation pane, click Backup Schedules. On the Backup Schedules page that appears, click Manage in the Actions column of the specified backup schedule. On the configuration page of the schedule, click Restore Database in the upper-right corner. Then, perform the following steps:

  1. Set the restore time point.
  2. Configure objects to restore.
  3. Perform a precheck.

Set the restore time point

DBS displays the time points to which the database can be restored in a restore calendar. You can quickly specify the time point to which the database will be restored.

  • New instance: when creating the recovery task, the customer can choose to automatically create the RDS pay-as-you-go instance and automatically complete the subsequent data recovery operation. According to the backup set information, DBS will automatically determine the RDS instance of the corresponding specification and disk space, automatically open the paid by quantity instance, and detect the creation status of the instance in real time. When the instance is successfully created, it will automatically trigger the data recovery operation, and the whole process requires no human intervention, greatly reducing the recovery time.
  • Use existing instances: use the customer’s existing instances for recovery.1.1

Configure objects to restore

DBS supports database or table mapping during data restore. You can select an object in the Selected section, and click Edit to rename the object.

DBS supports conflict handling for tables with duplicate names, and provides three options:

  • Fail When Object with the Same Name Exists: The restore task fails when an object with the same name exists. You need to process the corresponding object in the destination database manually.

For example, if you select Fail When Object with the Same Name Exists when you restore an object named DB1.table1, and the original object named DB1.table1 is found in the destination instance, you need to manually rename the original DB1.table1 object in the destination instance, and restart the DBS restore task.

  • Skip Object with the Same Name: The restore task skips the object that has the same name as that of an existing object in the destination instance, and normally restores other objects.

For example, if you select Skip Object with the Same Name when you restore an object named DB1.table1, and the original object named DB1.table1 is found in the destination instance, the DB1.table1 object is skipped and not restored. To restore this object, you need to manually rename the original DB1.table1 object in the destination instance, and restart the DBS restore task.

  • (Not recommended) Rename Object with the Same Name: The object to be restored will be automatically renamed when an existing object with the same name is found in the destination instance. In this case, the existing object in the destination instance remains unchanged.

For example, if you select Rename Object with the Same Name when you restore an object named DB1.table1, and the original object named DB1.table1 is found in the destination instance, the DB1.table1 object to be restored is renamed, and the restore task is completed without any problems. The original object DB1.table1 and the restored object DB1xxx.table1xxx coexist in the destination instance. In the object name format, xxx is the standard naming suffix. Note that there is a small chance that this option may cause incremental data restore failures. We recommend that you manually process objects with duplicate names in the destination instance before you run the restore task.

1.2

Perform a precheck

After you have configured database restore settings, you can precheck the configurations, database connectivity, and database permissions. If the precheck is successful, the system will perform database restore immediately.