Database Backup (DBS) allows you to restore database backups to on-premises databases, cloud databases, or DBS sandbox instances.
At least one database backup is complete. For more information, see Back up databases.
The restoration feature is available free of charge. However, if you restore a database to a new cloud database instance, you are charged for the new instance. For more information, see Overview.
If you use a DBS backup schedule that is created in a region to restore a database to an ApsaraDB RDS instance in another region, make sure that the destination ApsaraDB RDS instance is accessible over a public endpoint.
For example, if a DBS backup schedule is created in the China (Hangzhou) region and you want to use the DBS backup schedule to restore data to an ApsaraDB RDS instance in the China (Beijing) region, make sure that the ApsaraDB RDS instance in the China (Beijing) region is accessible over a public endpoint.
- This example describes only a general procedure for restoring databases. The specific restoration procedure varies based on database engines. For more information about the backup and restoration scenarios for different database engines, see Backup and restoration overview.
- DBS also provides the sandbox feature based on the copy data management (CDM) technology. This feature allows you to restore databases with a recovery time objective (RTO) of several seconds. You can analyze, test, and verify data in a sandbox instance. For more information, see Create a sandbox instance for emergency disaster recovery of a self-managed MySQL database.
- 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 of the Create Restore Task wizard, set the parameters in the Set Time Restored To and Configure Destination Database sections. Then, click Next in the lower-right corner of the page. Note DBS allows you to restore a database such as MySQL or SQL Server to a new ApsaraDB RDS instance without the need to create the instance in advance.
- 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. DBS can restore an entire database instance, one or more databases, or one or more tables. For more information, see Restore data by database or table.
- 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.
Related API operations
|CreateRestoreTask||Creates a restore task.|
|StartRestoreTask||Starts a restore task.|
|DescribeRestoreTaskList||Queries restore tasks.|
Q: What do I do if the precheck fails due to the server_id check failure when I restore a database?
A: Check whether the value of server_id in the database to be restored is greater than 1. If the value of server_id in the database to be restored is not greater than 1, you can execute the
set global server_id = 2 SQL statement to modify the value and perform the precheck again.