Learn how to manage database backups for data disaster recovery.
This feature is in preview and available only to some allowlisted users. If you do not see this feature on the console, see Create a backup from the backup plan list.
Step 1: Add or sync a data source
To back up a database using Data Disaster Recovery (DBS), add the database as a data source in the DBS console.
Prerequisites
Supported data sources:
-
Alibaba Cloud databases: ApsaraDB RDS for MySQL, ApsaraDB RDS for PostgreSQL, ApsaraDB RDS for SQL Server, and PolarDB for MySQL
-
Self-managed databases on ECS: MySQL
-
On-premises and other cloud databases: MySQL
Procedure
Alibaba Cloud databases
Data Disaster Recovery (DBS) automatically syncs Alibaba Cloud databases to the page. You do not need to add them manually.
After the synchronization is complete, the page displays a list of synced cloud databases with columns such as Data source ID, Engine type, Data source authorization status, Backup method, Creation time, and Actions.
Other data sources
You must manually add self-managed databases on ECS instances, on-premises databases, and third-party cloud databases to the tab or the tab.
Self-managed on ECS
Log in to DMS 5.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 . -
Select a region. On the Self-managed database on ECS tab, click Add data source.
-
Select the ECS instance and click Next.
-
On the Configure backup information page, configure the following parameters and click OK.
Parameter
Description
Engine type
Select the database engine type. This topic uses MySQL as an example.
Backup method
Currently, only logical backup is supported. For more information, see Logical backups, physical backups, and snapshots.
Port
The connection port of the source database. The default port for MySQL databases is 3306.
Data source name
Enter a descriptive name for easy identification.
On-premises and other clouds
Log in to DMS 5.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 . -
Select a region. On the On-premises and third-party cloud databases tab, select a method to add your data source.
Service backup
NoteAutomatic backup for services applies to self-managed databases, including those in data centers or on third-party clouds.
-
On the page, click Add data source.
-
In the dialog box that appears, configure the following parameters and click OK.
Parameter
Description
Engine type
Select the database engine type. Currently, only MySQL is supported.
Backup method
Currently, only logical backup is supported. For more information, see Differences between logical backups, physical backups, and snapshots.
Network connection type
-
Public network (Classic Network): Access cloud resources over the internet.
-
Virtual Private Cloud (VPC/leased line): A dedicated and isolated private network on the cloud that provides a flexible, secure, and controllable network environment. For more information, see What is Virtual Private Cloud?.
ImportantFollow the instructions in the How to add to the allowlist section of the console to add the required CIDR blocks to the allowlist of the source database. This allows DBS to access and back up the database. For more information, see Manually add the CIDR blocks of DBS to the allowlist of a database.
Virtual Private Cloud (VPC/leased line)
Select the VPC.
NoteThis parameter is required only when Network connection type is set to Virtual Private Cloud (VPC/leased line).
Source database endpoint
The endpoint of the source database.
Port
The connection port of the source database. The default port for MySQL databases is 3306.
Data source name
Enter a descriptive name for easy identification.
-
User backup
Compared with Automatic backup for services, Automatic backup for users is more complex to configure. Use this method if you manage your own local backup sets, including their data formats and protocols. For more information, see Automatic backup for users.
-
Step 2: Authorize the disaster recovery data source
After syncing or adding a data source to the disaster recovery data source console, you must authorize the data source by providing its account credentials. This enables subsequent backup and restoration operations.
Prerequisites
-
The data source has been synced or added to the disaster recovery data source console.
-
You have obtained the database account and database password for the target database.
Notes
-
The database account that you add must have the required read and write permissions to perform backup and restoration operations on the target database tables. For details about the required permissions, see Account permission description.
-
To ensure that backups run without interruption, if you change the password for the source database account, you must update the corresponding credentials in the console and re-authorize the account.
Data source authorization status
|
Status |
Description |
|
Not Authorized |
Indicates that the database account and password have not been added to the console. Backup and restoration operations cannot be performed on the data source. |
|
Authorized |
Indicates that the database account and password have been successfully added to the console. You can use this account to perform subsequent backup and restoration operations on the data source. |
|
Authorization Failed |
Indicates that validation failed when you added the database account and password. This failure may occur if the password contains special characters or the account has insufficient permissions. |
Procedure
Log in to DMS 5.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 . -
ApsaraDB database
-
Select a region at the top of the page. On the Cloud Database tab, click the ID of the target data source to open its details page.
-
On the page, click account authorization.
-
In the dialog box that appears, enter the database account and database password, and then click Authorize.
-
After all authorization diagnostics pass, click OK.
ECS self-managed database
-
Select a region at the top of the page. On the ECS Self-managed Database tab, find the target data source and click account authorization in the Actions column.
-
In the dialog box that appears, enter the database account and database password, and then click Authorize.
-
After all authorization diagnostics pass, click OK.
NoteIf the credentials are correct, the status in the Data source status column changes to Authorized.
External database
-
Select a region at the top of the page. On the tab, find the target data source and click account authorization in the Actions column.
NoteIf the data source is for user automatic backup, which means it is a backup set file that you upload, account authorization is not required. Instead, follow the instructions in the user automatic backup section of Manually add a data source (self-managed database hosted on an ECS instance or a database not deployed on Alibaba Cloud).
-
In the dialog box that appears, enter the database account and database password, and then click Authorize.
-
After all authorization diagnostics pass, click OK.
NoteIf the credentials are correct, the status in the Data source status column changes to Authorized.
-
Step 3: Configure data source backups (Recommended)
Add your data source to the Disaster Recovery Data Source console and configure a flexible backup policy, including the backup cycle, backup time, and backup set retention policy. DBS then automatically backs up data and logs to simplify management, protect your data, and improve service reliability.
Prerequisites
-
RAM users must have the AliyunDBSFullAccess permission to perform this operation. For information about how to grant permissions, see Manage permissions for a RAM user.
-
You have added or synced the data source to the Disaster Recovery Data Source console and authorized the data source account.
Usage notes
-
Cross-region backup is not supported.
-
Only logical backup is supported. Physical backups are not supported. For more information, see Differences between logical backups, physical backups, and snapshots.
-
Backups can affect the performance of the source database. We recommend that you run backups during off-peak hours.
-
Configuring a logical backup automatically creates a default backup policy. You do not need to set the backup cycle or retention period. The default policy is as follows:
-
Log backup: Enabled by default and cannot be disabled. The log backups are readable. The retention period for log backup sets is fixed at 30 days.
-
Data backup: Enabled by default and cannot be disabled. Backups are performed every Monday, Wednesday, Friday, and Sunday. The retention period for data backup sets is 7 days. After the configuration is complete, you can modify the data backup policy as needed. For more information, see Modify the backup policy.
-
-
A backup schedule with a low specification may fail due to insufficient resources when backing up databases or tables with poorly designed schemas, large tables, or large fields. We recommend that you select a backup schedule with a high specification to prevent backup exceptions.
Billing
|
Billable item |
Description |
|
Backup schedule fee |
Creating a backup schedule incurs a fee. The final fee depends on the selected region, specification, quantity, and subscription duration. The price displayed on the purchase page prevails. |
|
Backup fee |
Backup fees apply after a backup schedule is started. Data Disaster Recovery (DBS) provides a free backup quota that varies based on the specification of the backup schedule. No backup fees are generated if your backup usage does not exceed the free quota. You are charged for the excess usage on a pay-as-you-go basis. For more information about the billing standards, see Backup fees. |
|
Backup storage fee |
Backup sets are stored in built-in storage, which incurs storage fees. For more information about the billing standards, see Storage fees. |
-
No additional storage fees are charged when you purchase a backup schedule. You are charged for storage based on your actual backup usage.
-
Different backup schedule specifications offer different backup performance, free data quotas, and pricing. For more information, see Backup schedule specifications.
Procedure
Cloud database
Step 1: Purchase a backup schedule (logical backup)
Log in to DMS 5.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 . -
Select a region at the top of the page. On the Cloud Database tab, click the ID of the target data source to go to its details page.
-
On the page, click Configure Backup Policy.
-
On the Select Backup Schedule page, click Purchase Backup Schedule to go to the DBS purchase page.
-
Configure the following parameters and click Buy Now in the lower-right corner.
Parameter
Description
Product Type
Select Backup Schedule (Subscription). Pay-as-you-go is not supported.
Backup Schedule Region
Select the region where you want to store backup data.
NoteFor an Alibaba Cloud database, make sure the backup schedule is in the same region as the data source.
Data Source Type
This topic uses RDS MySQL as an example. Select 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.
Note-
For production databases or workloads that require fast backups and restores, we recommend that you select the xlarge or large specification for higher performance.
-
If backup and restore performance is not a high priority, you can calculate and select the most cost-effective backup schedule specification. For more information, see How to select a backup schedule specification.
-
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 Space
You do not need to select a storage capacity when you create the schedule. You are charged based on the actual amount of data stored in the built-in storage of DBS. For more information about billing, see Storage fees.
Resource Group
Select a default or custom resource group to facilitate the management of backup schedules.
Quantity
Select the required quantity. Each database instance requires a dedicated backup schedule. For example, to back up instances A and B, you must purchase two backup schedules.
Subscription Duration
Select the subscription duration for the backup schedule.
-
-
On the Confirm Order page, review the order, read and accept the Terms of Service, and then click Pay.
After completing the payment, return to the Select Backup Schedule page and click Payment Complete to view the new backup schedule.
Step 2: Configure the backup policy
-
On the Select Backup Schedule page, select the backup schedule to be configured and click Next.
-
On the Select Databases and Tables page, select the databases or tables to be backed up, click the
icon to move them to the Selected Objects box, and then click Submit. -
After the submission, on the Backup Policy page, go to the Logical Backup tab and click Start.
After you click Start, a full backup and an incremental backup are immediately initiated.
The page shows the Backup Status as Precheck Passed and displays details of the current backup configuration. The details include parameters such as Full Backup Cycle, Full Backup Start Time, and Full Backup Retention Period (Days), as well as the status and retention period of log backup.
NoteIf you want to perform other operations first, such as modifying the backup policy, you can choose not to start the backup at this time. The system will automatically start the backup at the scheduled time based on the backup policy.
Self-managed database on ECS
Step 1: Purchase a backup schedule (logical backup)
Log in to DMS 5.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 . -
Select a region at the top of the page. On the Self-managed database on an ECS instance tab, click the ID of the target data source to go to its details page.
-
On the Backup Policy page, click Configure Backup Policy.
-
On the Select Backup Schedule page, click Purchase Backup Schedule to go to the DBS purchase page.
-
Configure the following parameters and click Buy Now in the lower-right corner.
Parameter
Description
Product Type
Select Backup Schedule (Subscription). Pay-as-you-go is not supported.
Backup Schedule Region
Select the region where you want to store backup data.
NoteMake sure that the backup schedule is in the same region as the ECS instance.
Data Source Type
Only MySQL is supported.
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.
Note-
For production databases or workloads that require fast backups and restores, we recommend that you select the xlarge or large specification for higher performance.
-
If backup and restore performance is not a high priority, you can calculate and select the most cost-effective backup schedule specification. For more information, see How to select a backup schedule specification.
-
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 Space
You do not need to select a storage capacity when you create the schedule. You are charged based on the actual amount of data stored in the built-in storage of DBS. For more information about billing, see Storage fees.
Resource Group
Select a default or custom resource group to facilitate the management of backup schedules.
Quantity
Select the required quantity. Each database instance requires a dedicated backup schedule. For example, to back up instances A and B, you must purchase two backup schedules.
Subscription Duration
Select the subscription duration for the backup schedule.
-
-
On the Confirm Order page, review the order, read and accept the Terms of Service, and then click Pay.
After completing the payment, return to the Select Backup Schedule page and click Payment Complete to view the new backup schedule.
Step 2: Configure the backup policy
-
On the Select Backup Schedule page, select the backup schedule to be configured and click Next.
-
On the Select Databases and Tables page, select the databases or tables to be backed up, click the
icon to move them to the Selected Objects box, and then click Submit. -
After the submission, on the Backup Policy page, go to the Logical Backup tab and click Start.
After you click Start, a full backup and an incremental backup are immediately initiated.
The page shows the Backup Status as Precheck Passed and displays details of the current backup configuration. The details include parameters such as Full Backup Cycle, Full Backup Start Time, and Full Backup Retention Period (Days), as well as the status and retention period of log backup.
NoteIf you want to perform other operations first, such as modifying the backup policy, you can choose not to start the backup at this time. The system will automatically start the backup at the scheduled time based on the backup policy.
Automatic backup for services
Step 1: Purchase a backup schedule (logical backup)
Log in to DMS 5.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 . -
Select a region at the top of the page. On the tab, click the ID of the target data source to go to its details page.
-
On the Backup Policy page, click Configure Backup Policy.
-
On the Select Backup Schedule page, click Purchase Backup Schedule to go to the DBS purchase page.
-
Configure the following parameters and click Buy Now in the lower-right corner.
Parameter
Description
Product Type
Select Backup Schedule (Subscription).
Backup Schedule Region
Select the region where you want to store backup data.
NoteMake sure that the backup schedule is in the same region as the ECS instance.
Data Source Type
Only MySQL is supported.
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.
Note-
For production databases or workloads that require fast backups and restores, we recommend that you select the xlarge or large specification for higher performance.
-
If backup and restore performance is not a high priority, you can calculate and select the most cost-effective backup schedule specification. For more information, see How to select a backup schedule specification.
-
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 Space
You do not need to select a storage capacity when you create the schedule. You are charged based on the actual amount of data stored in the built-in storage of DBS. For more information about billing, see Storage fees.
Resource Group
Select a default or custom resource group to facilitate the management of backup schedules.
Quantity
Select the required quantity. Each database instance requires a dedicated backup schedule. For example, to back up instances A and B, you must purchase two backup schedules.
Subscription Duration
Select the subscription duration for the backup schedule.
-
-
On the Confirm Order page, review the order, read and accept the Terms of Service, and then click Pay.
After completing the payment, return to the Select Backup Schedule page and click Payment Complete to view the new backup schedule.
Step 2: Configure the backup policy
-
On the Select Backup Schedule page, select the backup schedule to be configured and click Next.
-
On the Select Databases and Tables page, select the databases or tables to be backed up, click the
icon to move them to the Selected Objects box, and then click Submit. -
After the submission, on the Backup Policy page, go to the Logical Backup tab and click Start.
After you click Start, a full backup and an incremental backup are immediately initiated.
The page shows the Backup Status as Precheck Passed and displays details of the current backup configuration. The details include parameters such as Full Backup Cycle, Full Backup Start Time, and Full Backup Retention Period (Days), as well as the status and retention period of log backup.
NoteIf you want to perform other operations first, such as modifying the backup policy, you can choose not to start the backup at this time. The system will automatically start the backup at the scheduled time based on the backup policy.
Automatic backup for users
After you upload backup data, DBS automatically performs backup and restore drills. For more information, see Automatic Backup for Users.
Related operations
Modify backup policy
You can modify the backup policy of a backup instance, including the backup period, backup time, and backup set retention policy.
Notes
-
You can modify only the data backup policy, not the log backup policy. Log backup is enabled by default and cannot be modified or disabled. The retention period for log backup sets is fixed at 30 days.
-
Changes to the data backup policy take effect immediately, and the new retention policy applies to existing data backup sets.
-
Backups can affect the performance of the source database. Set the backup time to off-peak hours to minimize the impact on your business.
Procedure
-
Go to the details page of the target data source.
-
For an Alibaba Cloud database, on the page, click Edit.
-
For a self-managed database on an ECS instance, an on-premises database, or a database on other clouds: On the Backup Policy page, click Edit.
-
-
In the dialog box, modify the data backup policy for the backup instance and click OK.
Parameter
Description
Full backup period
Select the days of the week to perform full backups. You must select at least two days.
Full backup start time
Select the start time for the data backup, for example, 23:00.
Full backup retention period
The default value is 7 days. Valid values: 7 to 3650 days.
View backup data
Cloud database
On the Backup Data page for the target backup source, view details of data backups and log backups on the Logical Backup tab.
Self-managed database
On the Backup Data page of the target backup source, view the details of data backups and log backups.
Related documents
-
To download data backups or log backups to archive them locally or upload them to OSS, see Download data backups and log backups.
-
To restore data backups and log backups to the source instance or a new RDS instance, see Restore a logical backup.
-
In addition to the automatic backup feature described in this topic, you can also manually back up configured databases and tables. For details, see Create a manual backup.