Data Disaster Recovery lets you register databases as data sources so you can manage and back up their data. Alibaba Cloud databases (ApsaraDB RDS and PolarDB) sync automatically. For self-managed databases on Elastic Compute Service (ECS), on-premises databases, or databases from third-party cloud providers, you add them manually.
Billing
Adding a data source is free. Charges apply only when you enable backup for the data source.
How it works
Data Disaster Recovery supports two ways to add a data source:
| Method | Supported database types |
|---|---|
| Automatic sync | ApsaraDB RDS for MySQL, ApsaraDB RDS for SQL Server, ApsaraDB RDS for PostgreSQL, PolarDB for MySQL |
| Manual registration | Self-managed MySQL on ECS instances, on-premises MySQL databases, MySQL databases from third-party cloud providers |
For the full list of supported database types, see Supported database types and features.
Prerequisites
Before you begin, make sure you have:
Access to the DMS console V5.0
The database endpoint (IP address) and port number
Network connectivity between Data Disaster Recovery and your database:
Public network: Confirm that inbound connections from Data Disaster Recovery CIDR blocks are allowed in your database's security settings.
Private network: Confirm that Data Disaster Recovery can reach the database over a Virtual Private Cloud (VPC) or a leased line.
Procedure
View automatically synced databases
ApsaraDB RDS and PolarDB databases are automatically registered when you create them. Use this procedure to view them.
Log on to the DMS console V5.0.
In the top navigation bar, choose Security and Specifications (DBS) > Disaster Recovery for Data (DBS) > Disaster Recovery Data Source.
In simple mode, move the pointer over the
icon in the upper-left corner and choose All Features > Security and Specifications (DBS) > Disaster Recovery for Data (DBS) > Disaster Recovery Data Source.On the Disaster Recovery Data Source page, click the Cloud Database tab to view the registered databases.
Add a self-managed database on an ECS instance
This procedure uses a self-managed MySQL database on an ECS instance as an example.
Log on to the DMS console V5.0.
In the top navigation bar, choose Security and Specifications (DBS) > Disaster Recovery for Data (DBS) > Disaster Recovery Data Source.
In simple mode, move the pointer over the
icon in the upper-left corner and choose All Features > Security and Specifications (DBS) > Disaster Recovery for Data (DBS) > Disaster Recovery Data Source.On the Self-managed Database on ECS tab, click Add Data Source.
In the Add Data Source dialog box, select the ECS instance and click Next.
Configure the backup settings.
Parameter Description Required Engine type Only self-managed MySQL databases on ECS instances are supported. Yes Backup method Set to Logical Backup. Yes Port The port of your database. The default MySQL port is 3306.Yes Data source name A descriptive name to identify this data source. Names do not need to be unique. No 
Click OK.
The data source appears on the Self-managed Database on ECS tab.
Troubleshooting: If Data Disaster Recovery cannot automatically add its CIDR blocks to the ECS security group, access permissions may have been revoked. Manually add the CIDR blocks to the ECS instance security group.
Add an on-premises or third-party cloud database
This procedure uses a third-party cloud MySQL database as an example.
Log on to the DMS console V5.0.
In the top navigation bar, choose Security and Specifications (DBS) > Disaster Recovery for Data (DBS) > Disaster Recovery Data Source.
In simple mode, move the pointer over the
icon in the upper-left corner and choose All Features > Security and Specifications (DBS) > Disaster Recovery for Data (DBS) > Disaster Recovery Data Source.At the top of the page, select a region.
On the On-premise Database and Cloud Database from Third-party Provider tab, choose a backup type and follow the corresponding steps.
Automatic backup for services
Automatic backup for services is suited for on-premises self-managed databases, third-party self-managed databases, and databases hosted in a data center.
Choose On-premise Database and Cloud Database from Third-party Provider > Automatic Backup for Services and click Add Data Source.
In the dialog box, configure the following parameters and click OK.
ImportantClick Configure Whitelist in the console to add Data Disaster Recovery's CIDR blocks to your database's security settings. Without this step, Data Disaster Recovery cannot connect to the database. For details, see Manually add the CIDR blocks of DBS to the security settings of self-managed databases.
Parameter Description Engine type Set to MySQL. Backup method Set to Logical Backup. For a comparison of backup methods, see Logical backup, physical backup, and snapshot. Network type Select the network through which Data Disaster Recovery connects to your database: Public Network (Classic Network) connects over the internet using a public IP address. Proprietary Network (VPC/Leased Line) connects over a private network for a more secure and controllable connection. For more information, see What is a VPC? Proprietary Network (VPC/Leased Line) The VPC or leased line network where your database is deployed. Displayed only when Network Access Type is set to Proprietary Network (VPC/Leased Line). Source database IP address The endpoint used to connect to the database. Port The port used to connect to the database. The default MySQL port is 3306.Data source name A descriptive name to identify this data source. 
Automatic backup for users
The MySQL database version must be 5.5.
Automatic backup for users requires a backup schedule. Each database instance needs its own backup schedule. If you don't have one, purchase a backup schedule before adding the data source.
Purchase a backup schedule (if needed)
Click Purchase Backup Schedule to open the purchase page.
Configure the following settings and complete the purchase.
Parameter Description Product type Select Backup Schedule. Pay-as-you-go billing is not supported. Region The region where backup data is stored. Data source type Select MySQL. Specification Select xmicro. The free backup quota varies by specification type. For details, see Select a backup schedule type. Backup method Select Physical Backup. Storage size No capacity selection is needed. You are charged based on the amount of data stored. For details, see Storage fees. Resource group The resource group for the backup schedule. Use the default or select one based on your requirements. Quantity The number of backup schedules to purchase. Purchase one per database instance. Subscription duration The subscription duration for the backup schedule.
Add the data source
Click Add Data Source. In the dialog box, configure the following parameters, select a backup schedule, and click Next.
Parameter Description Data source name A descriptive name to identify this data source. Engine type Only MySQL is supported. Engine version The version of the database engine. Engine parameters {"lower_case_table_names":1}
Upload a backup set to the specified bucket. For details, see Upload data (automatic backup for users).
Click OK.
What's next
After adding a data source, enable backup to start protecting your data.