DBS (DBS) allows you to restore data by database or table. If data is deleted from a specific database or table by mistake, you can restore the database or table without the need to restore the entire database instance. This shortens the recovery time objective (RTO).
- Log on to the DBS console.
- In the left-side navigation pane, click Backup Schedules. On the Backup Schedules page, select a region in the upper-left corner.
- On the Backup Schedules page, find the ID of the backup schedule that you want to use to create a restore task, and click Manage in the Actions column.
- On the Configure Task page, click Restore Database in the upper-right corner.
- In the Set Time Restored To step, set the parameters in the Set Time Restored To and Configure Destination Database sections and click Next. Note
- If the incremental backup feature is enabled, DBS allows you to restore the data to a point in time from the completion of the first full backup to the completion of the last incremental backup.
- If the incremental backup feature is disabled, DBS allows you to restore the data to a point in time when a full backup is complete.
- In the Configure Objects to Restore step, set the Conflict Handling parameter and specify the databases or tables to be restored in the Objects to Restore section.
Parameter Description Conflict Handling Select one of the following methods for conflict handling:
- Fail when Object with the Same Name Exists.
- Rename Object with the Same Name: If you select this option, DBS renames the new table that is to be created by the restore task. 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. The system renames the new table that is restored from the table in the source database in the following format:
job_info_dbs_<ID of the restore task>_</Timestamp>.
Objects to Restore The database or table that you want to restore. Select the database or table that you want to restore in the Available section and click the right arrow to add it to the Selected section. In this example, only the
sbtest100tables are selected for restoration.
- In the lower-right corner of the page, click Precheck. DBS checks the preceding configurations, database connectivity, and database permissions.
- After the Precheck Passed message appears in the Precheck dialog box, click Start Task.
To view the database restoration progress, click Restore Tasks in the left-side navigation pane.Note The amount of time used to restore a database depends on the specifications of the backup schedule and the size of the database. For more information, see Performance tests on backup and restoration.
If you restore a database to a new ApsaraDB RDS instance, it takes about 5 to 10 minutes for the instance to be created. After the database is restored, you can view the new ApsaraDB RDS instance in the ApsaraDB RDS console. Alternatively, perform the following steps to view the new ApsaraDB RDS instance: On the Restore Tasks page, click the ID of the restore task. On the page that appears, click the ID of the ApsaraDB RDS instance in the Basic Information section. You are navigated to the ApsaraDB RDS console.