Data Disaster Recovery supports Alibaba Cloud databases, self-managed databases hosted on the Elastic Compute Service (ECS) instances, on-premises databases, and cloud databases from third-party providers. The topic describes how to back up an on-premises database or a cloud database from a third-party provider.
Usage notes
If the databases and tables that you want to back up have issues, such as unreasonable table schema, large tables, and large fields, the backup schedule may have insufficient resources and may cause backup exceptions. Therefore, we recommend that you select a large specification type when you create a backup schedule to avoid exceptions in subsequent backups.
Procedure
Automatic backup for services
Purchase a backup schedule (logical backup)
- 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 upper part of the page, select a region. On the Disaster Recovery Data Source page, choose
, and click the ID of the data source that you want to use to go to the details page.On the Backup Policies page, click Configure Backup Policy.
In the Select Backup Schedule step, click Purchase Backup Schedule to go to the buy page.
Configure the following parameters and click Buy Now in the lower-right corner of the page.
Parameter
Description
Product Type
Select Backup Schedule.
Region
The region in which you want to store the backup data.
NoteMake sure that the backup schedule and the Elastic Compute Service (ECS) instance reside in the same region.
Data Source Type
Set the value to MySQL.
Specification
The backup schedule specifications that you want to use. Higher specifications offer higher backup and restoration performance. DBS supports the following backup schedule specifications: micro, small, medium, large, and xlarge. The xlarge specification type provides extra large specifications without an upper limit on the amount of backup data.
NoteTo ensure fast backup and restoration of specific database instances, such as database instances in the production environment, we recommend that you select xlarge or Large.
If you do not require high backup and restoration performance, you can select the most cost-effective backup schedule type based on your business requirements. For more information, see Select a backup schedule type.
If the databases and tables that you want to back up involve issues such as unreasonable schemas, large tables, and large fields, the resources of a backup instance of lower specifications may be insufficient to complete the backup. As a result, a backup error occurs. We recommend that you purchase a backup instance of higher specifications to prevent backup errors.
Backup Method
Select Logical Backup.
Storage Size
You do not need to select a capacity when you create the backup schedule. You are charged based on the amount of data that is stored in Data Disaster Recovery. For more information, see Storage fees.
Resource Group
The resource group that is used by the backup schedule. You can use the default resource group or select a resource group based on your business requirements.
Quantity
The number of backup schedules that you want to purchase. To back up multiple database instances, you must purchase multiple backup schedules. For example, if you want to back up Database Instance A and Database Instance B, you must purchase two backup schedules.
Subscription Duration
The subscription duration of the backup schedule that you want to purchase.
On the Confirm Order page, confirm the order information, read and select the terms of services, and then click Pay.
After you complete the payment, go back to the Select Backup Schedule step and click Paid to view the created backup schedule.
Configure the backup policy
In the Select Backup Schedule step, select the backup schedule that you want to configure and click Next.
In the Select Database and Table step, select the databases and tables that you want to back up, click the
icon to move them to the Selected Objects section, and then click Submit.
On the Backup Policy page, click the Logical Backup tab and then click Start to initiate backups.
After you click Start, the system immediately initiates a full backup and an incremental backup.
NoteIf you want to perform other operations, such as modifying the backup policy, you can skip this step. Data Disaster Recovery automatically initiates the backup later based on the backup policy.
Automatic backup for users
Only database instances that run MySQL 5.5 are supported.
Only the China (Hangzhou) region is supported.
Configure the backup source and upload the backup file
- 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 upper part of the page, select a region. On the Disaster Recovery Data Source page, click the On-premise Database and Cloud Database from Third-party Provider tab, and add the data source based on the data source type.
Click Add Data Source. In the dialog box that appears, configure the following parameters, select the backup schedule that you want to use, and then click Next.
Parameter
Description
Data Source Name
We recommend that you use a descriptive name that is easy to identify.
Engine Type
The type of database engine. Only MySQL is supported.
Engine Version
The engine version of the database that you want to back up.
Engine Parameters
{"lower_case_table_names":1}
If no backup schedule is available, click Purchase Backup Schedule to go to the buy page and purchase a backup schedule.
Description
Product Type
Select Backup Schedule. The pay-as-you-go billing method is not supported.
Region
The region in which you want to store the backup data.
Data Source Type
Select MySQL.
Specification
Select xmicro. For more information about the free quota provided by the xmicro specification type, see Backup schedule types.
Backup Method
Select Physical Backup.
Storage Size
You do not need to select a capacity when you create the backup schedule. You are charged based on the amount of data that is stored in Data Disaster Recovery. For more information, see Storage fees.
Resource Group
The resource group that is used by the backup schedule. You can use the default resource group or select a resource group based on your business requirements.
Quantity
The number of backup schedules that you want to purchase. To back up multiple database instances, you must purchase multiple backup schedules. For example, if you want to back up Database Instance A and Database Instance B, you must purchase two backup schedules.
Subscription Duration
The subscription duration of the backup schedule that you want to purchase.
Upload the backup set to the specified bucket. For more information, see Upload data (automatic backup for users).
Click OK.
View the backup information
On the Automatic Backup for Users tab, click the ID of the data source that you want to manage.
Configure the backup policy
On the Automatic Backup for Users tab, find the data source that you want to manage and click View Backup Policy in the Actions column.
Click OK.
View and download backup data
On the Automatic Backup for Users tab, click the ID of the data source that you want to manage.
In the left-side navigation pane, click Backup Data.
NoteAfter you upload the data scripts and create a data source, when a new backup set is generated, the system automatically synchronizes the backup set to the Backup Data page.
Click Download in the Actions column of the backup set to download the backup set.
Create a restoration task
To restore data, the backup set must be displayed on the Data Backup page and must be in the Completed state.
On the Automatic Backup for Users tab, click the ID of the data source that you want to manage.
In the left-side navigation pane, click Backup Data. On the Logical Backup tab, click Create Restore Task to configure the following restoration parameters.
Parameter
Description
Task Name
The name of the restoration task. We recommend that you use a descriptive name that is easy to identify.
Restore To
The destination database instance. Default value: New Instance(RDS).
Database Location
The location of the destination database instance. Default value: RDS.
Instance Region
The region where the destination database instance resides. Only the China (Hangzhou) region is supported.
VPC
The virtual private cloud (VPC) in which the destination database instance resides.
VSwitch
The vSwitch that is connected to the destination database.
Instance Edition
The edition of the destination database instance.
Instance Specifications
The type of the destination database instance.
Storage Space
The storage space required for the destination database instance.
Restore Mode
You can restore the database only by point in time.
Restore Time
The point in time to restore the backup sets. The available time range is displayed after the Restore Mode parameter.
After the configuration is complete, click Submit. A restoration task is created. The task information is displayed on the Restore Tasks page.
View a restoration task
On the Automatic Backup for Users tab, click the ID of the data source that you want to manage.
In the left-side navigation pane, choose
.Click the instance ID in the Restoration Result column to go to the Basic Information page of the RDS instance to which the backup sets are restored.
View the recovery drill
On the Automatic Backup for Users tab, click the ID of the data source that you want to manage.
In the left-side navigation pane, click Recovery Drill.
Recovery drill metrics
The recovery drill metrics are Recovery Task Success Rate, Average Recovery Duration, Data Backup Drill Coverage Rate, and Log Backup Drill Coverage Rate.
Metric
Description
Recovery Task Success Rate
The success rate of restoration tasks that restore data to points in time within the specified period of time.
Average Recovery Duration
The average duration of successful restoration tasks within the specified period of time.
Data Backup Drill Coverage Rate
The coverage rate of the data recovery drills that are performed on open source MySQL instances or ApsaraDB RDS for MySQL instances within the specified period of time.
Log Backup Drill Coverage Rate
The coverage rate of the log recovery drills that are performed on open source MySQL instances or ApsaraDB RDS for MySQL instances within the specified period of time.
Recovery drill timeline
The timeline displays the recovery drill details at each point in time within the specified period of time. You can click the timeline to view the drill information at the current point in time.
Recovery drill details
Click the Data Backup tab to view the recovery drill details for data backup. Click the instance ID in the Drill Result column to go to the Basic Information page of the restored RDS instance.
Click the Log Backup tab to view the recovery drill details for log backup.