This topic answers frequently asked questions about disaster recovery.
Billing FAQ
Fees after purchasing a backup schedule
-
Backup schedule specification fees: You pay specification fees when you purchase a subscription backup schedule. Different backup schedule specifications provide different backup and recovery performance, free data quotas, and pricing. For more information about specification fees, see Backup fees.
-
Backup plan storage fees (Optional): If you configure a subscription backup plan and select DBS Storage as the backup destination storage type, storage fees are charged based on the size and duration of the actual data stored in the Data Disaster Recovery built-in storage. For more information, see Storage fees.
-
Backup schedule backup fees (optional): If a backup schedule exceeds its free data quota, Database Backup Service (DBS) charges you for the overage. For information about the free data quota and the pricing for excess data for each backup schedule specification, see Backup fees.
-
Sandbox fees (optional): This feature lets you create sandbox instances for emergency recovery of self-managed MySQL databases.
-
After you enable the sandbox feature, you are charged sandbox storage fees based on the amount of data in the sandbox storage.
-
After you create a sandbox instance, you are charged sandbox instance fees based on the instance specifications and usage duration. For details about the fees, see Billable items (DMS).
-
You cannot directly create a pay-as-you-go backup schedule.
Offset scope of DBS storage and network plans
Database Backup Service (DBS) storage plans
Data Disaster Recovery offers the following two types of storage plans. These plans are available in various storage sizes, such as 100 GB, 500 GB, 1 TB, and 500 TB, and for various subscription periods, such as 1 month, 6 months, and 1 year. If your storage usage exceeds your storage plan quota, the excess storage is charged on a pay-as-you-go basis.
Storage plan type | Offsettable items |
CDM sandbox storage plan | These storage plans can be used to offset the fees incurred for your account when you use sandbox storage. For pricing details, see Sandbox billing. |
Backup instance storage plan | Offsets the built-in storage fees for backup schedule instances within the same Alibaba Cloud account. For more information, see Built-in storage and OSS. |
Database Backup Service (DBS) network plans
|
Offset scope |
Description |
|
Network usage for cross-region backups |
Database Backup Service (DBS) network plans can be used in any region to offset network fees for cross-region backups of ApsaraDB RDS for MySQL, ApsaraDB RDS for PostgreSQL, ApsaraDB RDS for SQL Server, PolarDB for MySQL, PolarDB for PostgreSQL, and ApsaraDB for MongoDB. The offset varies by region and is calculated by using different offset factors. |
|
Network usage for backup set downloads |
Database Backup Service (DBS) network plans can be used in any region to offset network fees incurred when you download backup sets from ApsaraDB RDS for MySQL, ApsaraDB RDS for PostgreSQL, and ApsaraDB RDS for SQL Server. The offset varies by region and is calculated by using different offset factors. |
For more information about the offset rules, offset factors, offset examples, and purchase methods, see Use storage plans and Use network plans.
Charges for unused backup schedules
You are still charged for storage even if a backup schedule is not creating new backup sets, because historical backups continue to consume storage resources.
To release a backup schedule or reduce the amount of backup data, see View and reduce backup data, Delete or reduce backups, and Delete backups of a released instance.
-
Pay-as-you-go: If you do not intend to use a pay-as-you-go backup schedule for an extended period, we recommend that you release the backup schedule after you save the data and download the backup sets. Releasing the backup schedule stops all future backup and storage fees. For more information, see Release or unsubscribe from a backup schedule.
-
Subscription: If you do not intend to use a subscription backup schedule for an extended period but want to retain historical backup sets without generating new ones, we recommend that you pause or restart the backup schedule. After you pause the schedule, you no longer incur backup fees. However, storage fees are still incurred for subscription backup schedules that use DBS Storage.
-
Pausing a running subscription backup schedule does not affect its subscription period.
-
You incur storage fees only for subscription backup schedules that use DBS Storage.
Switching billing methods
No, this is not supported.
Releasing a pay-as-you-go backup schedule
Yes. For more information, see Release a backup schedule.
Unsubscribing from or releasing subscription schedules
-
You cannot release a subscription backup schedule.
-
You cannot unsubscribe from a subscription backup schedule.
For more information, see Refund policy.
Effects of plan expiration
Storage plans and network plans are prepaid resource plans offered by Database Backup Service (DBS). After a plan expires, it can no longer be used to offset storage or network fees. This does not affect your backup schedules or existing backup data.
Expiration and overdue payments
For more information, see Expiration and overdue payments.
How to reduce the costs of a subscription data disaster recovery backup plan?
Purchase a storage plan to offset the DBS Storage fees for backup schedules under the same account. For more information, see DBS Storage and user-created OSS buckets.
Unexpected database backup charges
The backup and restoration features for ApsaraDB RDS, PolarDB, ApsaraDB for MongoDB, ApsaraDB for Redis, Tair, and AnalyticDB for PostgreSQL are provided by Database Backup Service (DBS). You may have incurred these charges by using the backup features within those products. For more information, see Billing overview.
Resolve a failed backup schedule
Symptom
On the Backup Schedules page, a failed backup schedule has a status of Error.
Cause
The Error status means that at least one task in the backup schedule failed. This can be a full backup, an incremental backup, or another type of task.
-
When a task fails, Data Disaster Recovery does not automatically restart it. This prevents any potential impact on your business services.
-
To ensure your services run smoothly, investigate the cause of the error promptly. If the issue persists after trying the solutions in this topic, contact us in the DBS customer support group (DingTalk group ID: 35585947).
Resolution
Data Disaster Recovery offers the following solutions for failed backup tasks.
|
Scenario and solution |
Notes |
|
If you have identified and resolved the cause of the task failure, click Restart Backup. For example, if a backup failed because the source instance was stopped, restart the failed task once the source instance is running. |
|
|
If you have identified and resolved the cause of the task failure, click Ignore Error. For example, if a backup failed because the backup instance was shut down or a service was unavailable but is now available, you can ignore the error. The backup will run as scheduled during the next backup window. |
If the issue is resolved, the task status changes to Completed after you ignore the error. If this was the only failed task in the backup schedule, the schedule's status returns to Running. If the schedule's status remains Error, check for other failed tasks. |
|
If you cannot determine the cause of the error or how to resolve it, you can hover over the exclamation point (!) icon to view the error message. Then, search for the error message in the Troubleshoot Data Disaster Recovery errors topic. |
If your error is not listed in the topic, or if the recommended solution does not resolve the issue, contact us in the DBS customer support group (DingTalk group ID: 35585947). |
Procedure
-
Click Rectify in the Status column of the failed backup schedule. You are redirected to the page for the failed backup task.
If the failed task is a full backup, you are redirected to the Full Data page. If the failed task is an incremental backup, you are redirected to the Incremental Data page.
-
Choose a solution to fix the failed backup task.
-
To restart the failed backup task, click Restart Backup.
NoteIf the failed task is a full backup, consider the impact of the backup operation on the source database before you restart the task. Perform this action during off-peak hours.
-
To ignore the error, click Ignore Error.
-
To troubleshoot the issue, hover over the exclamation point (!) icon to view the error message. Then, click View Exception Fixing Suggestions (for a failed full backup) or View Incremental Exception Fixing Suggestions (for a failed incremental backup). You are redirected to the Common errors topic. Search for the error message in the topic.
NoteIf you cannot locate the error message, the failure might be caused by another type of task. In this case, contact us in the DBS customer support group (DingTalk group ID: 35585947).
-
Activate Database Backup Service (DBS)
When you use Database Backup Service (DBS) for the first time, you must grant the AliyunServiceRoleForDBS role to DBS and activate Object Storage Service (OSS). This allows DBS to access, query, and manage your databases and back them up to OSS in real time. This authorization ensures that the backup and recovery features of DBS function correctly and does not affect the performance of your DBS backup instances.
Step 1: Authorize DBS service-linked role
The DBS service-linked role, AliyunServiceRoleForDBS, is a RAM role that grants permissions to access other cloud services. When DBS needs to access your Alibaba Cloud databases, such as ApsaraDB for RDS, ApsaraDB for MongoDB, ApsaraDB for Redis, or PolarDB, or a self-managed database hosted on an Elastic Compute Service (ECS) instance, it uses AliyunServiceRoleForDBS to obtain the required permissions. For more information, see service-linked roles.
The first time you use DBS, you must grant the service-linked role (AliyunServiceRoleForDBS) to DBS. For more information about the permissions, see Appendix: AliyunServiceRoleForDBS.
Log in to DMS 5.0.
-
In the top navigation bar, choose Security and disaster recovery (DBS) > Data Disaster Recovery (DBS) > Disaster Recovery Data Source.
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 All Features > Security and disaster recovery (DBS) > Data Disaster Recovery (DBS) > Disaster Recovery Data Source. -
In the dialog box that appears, click Authorize DBS SLR.
NoteIf the authorization dialog box does not appear after you log on to the DBS console, skip the remaining steps in this topic and proceed to create a backup. For more information, see Manage a backup by using a disaster recovery data source or Create a backup from the backup plan list.
-
Click OK.
The DBS service-linked role (AliyunServiceRoleForDBS) is created. If you need to delete the service-linked role (AliyunServiceRoleForDBS), see Delete a RAM role.
Step 2: Activate OSS
Activating Object Storage Service (OSS) does not incur fees. After activation, when you use Data Disaster Recovery to create backups, Data Disaster Recovery can store the backup data in OSS (cloud storage).
-
Log on to the Data Management Service (DMS) 5.0 console.
-
In the top navigation bar, choose Security and disaster recovery (DBS) > Data Disaster Recovery (DBS) > Backup Plan.
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 All Features > Security and disaster recovery (DBS) > Data Disaster Recovery (DBS) > Backup Plan. -
In the dialog box that appears, click Activate OSS Now.
-
In the dialog box that appears, click Activate Now.
-
On the Object Storage Service (OSS) page, read the service agreement, select the agreement checkbox, and then click Activate Now.
You have now activated the DBS service.
Appendix: AliyunServiceRoleForDBS
Role name: AliyunServiceRoleForDBS
Policy: AliyunServiceRolePolicyForDBS
Permissions:
{
"Version": "1",
"Statement": [
{
"Action": [
"rds:DescribeDBInstanceNetInfo",
"rds:DescribeDBInstanceNetInfoForChannel",
"rds:DescribeTasks",
"rds:DescribeDBInstances",
"rds:DescribeFilesForSQLServer",
"rds:DescribeImportsForSQLServer",
"rds:DescribeSlowLogRecords",
"rds:DescribeBinlogFiles",
"rds:DescribeSQLLogRecords",
"rds:DescribeParameters",
"rds:DescribeParameterTemplates",
"rds:DescribeDBInstanceAttribute",
"rds:DescribeDatabases",
"rds:DescribeAccounts",
"rds:DescribeSecurityIPList",
"rds:DescribeSecurityIps",
"rds:DescribeDBInstanceIPArray",
"rds:DescribeDBInstanceIPArrayList",
"rds:DescribeDBInstanceSSL",
"rds:DescribeDBInstanceTDE",
"rds:CreateDBInstance",
"rds:CreateAccount",
"rds:CreateDatabase",
"rds:ModifySecurityIps",
"rds:GrantAccountPrivilege",
"rds:CreateMigrateTask",
"rds:CreateOnlineDatabaseTask",
"rds:DescribeMigrateTasks",
"rds:DescribeOssDownloads",
"rds:CreateBackup",
"rds:DescribeBackups",
"rds:DescribeBackupPolicy",
"rds:ModifyBackupPolicy",
"rds:DescribeBackupTasks",
"rds:DescribeBinlogFiles"
],
"Resource": "*",
"Effect": "Allow"
},
{
"Action": [
"ecs:DescribeInstance",
"ecs:DescribeInstances",
"ecs:DescribeVpcs",
"ecs:DescribeSecurityGroups",
"ecs:DescribeSecurityGroupAttribute",
"ecs:AuthorizeSecurityGroup",
"ecs:JoinSecurityGroup",
"ecs:RevokerSecurityGroup"
],
"Resource": "*",
"Effect": "Allow"
},
{
"Action": [
"kms:ListKeys"
],
"Resource": "*",
"Effect": "Allow"
},
{
"Action": [
"cms:PutEventRule",
"cms:PutEventTargets",
"cms:ListEventRules",
"cms:ListEventTargetsByRule",
"cms:DeleteEventRule",
"cms:DeleteEventTargets"
],
"Resource": "*",
"Effect": "Allow"
},
{
"Action": [
"polardb:DescribeDBClusterIPArrayList",
"polardb:DescribeDBClusterNetInfo",
"polardb:DescribeDBClusters",
"polardb:ModifySecurityIps",
"polardb:DescribeDBClusterEndpoints",
"polardb:DescribeDBClusterAccessWhitelist",
"polardb:ModifyDBClusterAccessWhitelist"
],
"Resource": "*",
"Effect": "Allow"
},
{
"Action": [
"dds:DescribeDBInstanceAttribute",
"dds:DescribeReplicaSetRole",
"dds:DescribeSecurityIps",
"dds:DescribeDBInstances",
"dds:ModifySecurityIps"
],
"Resource": "*",
"Effect": "Allow"
},
{
"Action": [
"kvstore:DescribeSecurityIps",
"kvstore:DescribeInstances",
"kvstore:DescribeAccounts",
"kvstore:DescribeDBInstanceNetInfo",
"kvstore:CreateAccount",
"kvstore:ModifySecurityIps",
"kvstore:DescribeInstanceAttribute",
"kvstore:AllocateInstancePrivateConnection",
"kvstore:DescribeLogicInstanceTopology"
],
"Resource": "*",
"Effect": "Allow"
},
{
"Action": [
"drds:DescribeDrdsDB",
"drds:DescribeDrdsDBs",
"drds:DescribeDrdsDbInstance",
"drds:DescribeDrdsDbInstances",
"drds:DescribeDrdsDBIpWhiteList",
"drds:DescribeDrdsInstances",
"drds:ModifyDrdsIpWhiteList",
"drds:CreateDrdsDB",
"drds:DescribeTable",
"drds:DescribeTables",
"drds:ModifyRdsReadWeight",
"drds:ChangeAccountPassword",
"drds:CreateDrdsInstance",
"drds:CreateInstanceAccount",
"drds:CreateInstanceInternetAddress",
"drds:DescribeInstanceAccounts"
],
"Resource": "*",
"Effect": "Allow"
},
{
"Action": [
"vpc:DescribeVpcs"
],
"Resource": "*",
"Effect": "Allow"
},
{
"Action": [
"bssapi:QueryResourcePackageInstances"
],
"Resource": "*",
"Effect": "Allow"
},
{
"Action": "hdm:AddHDMInstance",
"Resource": "*",
"Effect": "Allow"
},
{
"Action": "ram:DeleteServiceLinkedRole",
"Resource": "*",
"Effect": "Allow",
"Condition": {
"StringEquals": {
"ram:ServiceName": "dbs.aliyuncs.com"
}
}
}
]
}
Account permissions
MySQL
|
Feature |
Permissions |
|
Backup |
|
|
Restoration |
SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, and TRIGGER. |
-
To perform an incremental backup on a MySQL database, you must use the
show binary logsstatement. For MySQL 5.5.24 and earlier, the database account must have thesuperpermission to run this statement. For MySQL 5.5.25 and later, only theREPLICATION CLIENTpermission is required. -
For an RDS database, a read-only account is sufficient for backups, while restorations require a read-write account.
SQL Server
|
Feature |
Permissions |
|
Backup |
SELECT and VIEW DEFINITION |
|
Restoration |
SELECT, INSERT, ALTER Database, REFERENCES, and VIEW DEFINITION |
PostgreSQL
|
Feature |
Permissions |
|
Backup |
SELECT permission or a SUPER role |
|
Restoration |
CREATE, INSERT, USAGE, REFERENCES, and TRIGGER |
Data consistency
-
For logical backups, to minimize the impact on database performance, Data Disaster Recovery uses a lock-free method during the full backup process to pull data in parallel and back it up to OSS.
-
Full backups contain data from different points in time. During data recovery, the full backup is restored first, followed by the incremental backup. The idempotent incremental backup recovery process ensures data consistency.
|
Incremental backup |
Data consistency |
|
Enabled |
Supported |
|
Disabled |
Not supported |
Lifecycle management
Lifecycle
The lifecycle of a backup set can range from 7 to 3,650 days (10 years). Data Disaster Recovery automatically deletes expired backup sets that meet the cleanup criteria.
According to the cleanup policy, if a backup schedule contains more than three full backup sets, Data Disaster Recovery automatically deletes the expired full and incremental backup sets.
-
You can wait for the next scheduled backup or manually initiate one if needed. The cleanup policy is triggered when the number of full backup sets exceeds three. For more information, see Manually initiate a backup task.
-
If you continuously delete full backup sets so that the number of full backup sets remains at three or less, the cleanup policy is not triggered. As a result, incremental backup sets are stored indefinitely in Data Disaster Recovery and consume storage space. If you no longer require incremental backups, disable the incremental log backup feature. For more information, see Enable or disable incremental log backup.
-
If you modify the lifecycle after you create a backup schedule, the new lifecycle rules apply to both new and existing backup sets.
Modifying the lifecycle
For more information, see Modify the backup policy of a backup schedule or Modify the lifecycle of a backup schedule.
Related operations
To learn how to view backup sizes and reduce data backups, see Delete backup sets or reduce the backup frequency.
FAQ
-
Q: I set the lifecycle for my backup schedule to 7 days. Why are the expired backup sets not deleted?
A: The cleanup policy is not triggered if a backup schedule contains three or fewer full backup sets. As a result, expired backup sets are not automatically deleted.
-
Q: My backup sets have expired. Why are incremental backups still consuming storage space?
A: This occurs if manual deletions keep the number of full backup sets at three or fewer, preventing the cleanup policy from being triggered. For more information, see Lifecycle rules.
Backup data size
The backup data size is the volume of data transmitted over the Data Disaster Recovery backup path.
Key concepts
Database backup scenarios involve the following concepts: database disk space, data file size, backup data size, and storage data size.
| Data amount | Description |
| Database disk space | The total space consumed by data files, logs, operating system files, and the available space of the operating system of the server where the database resides. Note
|
| Data file size | The amount of disk space occupied by database data files on the server where the database resides. You can perform the following operations to view the data file size of a database:
|
| Backup data size | The amount of data backed up by using Database Backup (DBS). This size depends on a variety of factors such as the database type, backup mode, and backup granularity. |
| Storage data size | The volume of data stored in the storage system. This size depends on a variety of factors such as the backup data size, the storage format of backup data, and the compression algorithm. |
In general, the relationship between these sizes is as follows: database disk space (on RDS/ECS) > data file size (actual usage) > backup data size > storage data size.
In summary, you can reduce the backup data size by adjusting the backup granularity and backup cycle provided by Data Disaster Recovery, which in turn reduces your Data Disaster Recovery costs. You can also reduce the storage data size by using the compact storage format, compression, and automatic lifecycle and cleanup policies provided by Data Disaster Recovery, which in turn reduces your OSS costs.
Backup usage
-
Click manage in the actions column for the target backup schedule.
-
You can view the backup data size in the billing information section.
Parameter
Description
Instance type
Data Disaster Recovery supports various instance types, including serverless, micro, small, medium, large, and xlarge. For more information, see How to select backup schedule specifications.
Billing method
Data Disaster Recovery supports the pay-as-you-go and subscription billing methods. For more information, see billing items (DMS).
Free backup data quota
Free data quotas, pricing, and backup and recovery performance vary by instance type. For more information, see billing items (DMS).
NoteYou can upgrade the instance type to increase its free data quota. For more information, see Upgrade a backup schedule and Free quotas for each instance type.
Billed backup data this month
Data usage that exceeds the free quota is billable. A higher instance type offers better backup and recovery performance at a lower unit price.
Full backup data this month
The total data from all full backup tasks.
Incremental backup data this month
The total data from all incremental backup tasks.
Statistical period
Statistics are calculated on a calendar month basis.
Created at
The time the backup schedule was created.
Modify backup source
Use cases
-
Your original database is migrated or decommissioned, and you need to switch to a new database for backups.
-
The testing phase is complete, and you need to switch to a production database for backups.
-
The configured account credentials for the source database are incorrect or have insufficient permissions, and you need to update them.
-
The schema of the source database has changed, and you need to reconfigure the backup objects.
Procedure
Modify credentials and backup objects
Prerequisites
-
The backup schedule uses the logical backup method.
-
The database account for the source database must have the required permissions to back up and restore data. For more information, see Account permissions.
Procedure
-
In the Actions column of the target backup schedule, click Manage. The Configure Task page appears.
-
In the Basic Information section, click Edit Backup Source. For details on how to configure the backup source for different databases, see Configure a backup schedule and restore data.
-
Update the backup source information and click Next after the connection test passes.
Parameters include Backup Method, Database Location, Instance region, RDS instance ID, Connection address, Database Account, and Password. After you enter the information, click Check Connection.
-
Specify the database objects to back up and click Save.
-
To add a new source database, select the database in the Available section and click the
icon. -
To delete a selected database, select the database in the Selected section and click the
icon.
This page uses a dual-list selector. Click the > and < arrows to move database objects between the two lists.
-
-
In the precheck dialog box, the system runs the source database connectivity check, database permission check, OSS check, and storage engine check in sequence. After all checks pass, click Start Immediately.
Note-
After you click Start Immediately, if an incremental backup task is running, the system marks it as complete and schedules a new incremental backup task with the new account credentials.
-
If no full backup task is running, the system immediately starts a full backup task. To minimize the impact on your source database, we recommend that you modify the configuration during off-peak hours.
-
If a full backup task is running, the system does not update its configuration. The system uses the new configuration for the next scheduled or manually started full backup task.
-
Modify backup objects
-
In the Actions column of the target backup schedule, click Manage. The Configure Task page appears.
-
In the Basic Information section, click Edit Backup Objects.
-
Modify the backup objects and click Save.
-
To add a new source database, select the database in the Source Database Objects area on the left and click
. -
To remove a previously selected database, select the database in the Selected Database Objects area on the right and click
.
This page uses a dual-list selector. Click the > and < arrows to move database objects between the two lists.
-
-
The Start Full Backup dialog box appears with the message "Are you sure you want to back up the database immediately?". Click OK or Close.
-
If you click OK, the backup task starts in about one minute and backs up the objects specified in the backup schedule. To minimize the impact on your source database, we recommend that you perform this operation during off-peak hours.
-
If you click Close, the system saves the configuration but does not start an immediate full backup task. The new configuration applies to the next scheduled backup.
-
Cross-region backup schedule
When you enable the cross-region backup feature in the ApsaraDB RDS console, Data Disaster Recovery uses Express Connect to transfer and back up your RDS instance data (ApsaraDB RDS for MySQL, ApsaraDB RDS for SQL Server, or ApsaraDB RDS for PostgreSQL) across regions. This process also creates a new backup schedule in the Data Disaster Recovery console. You can view the source database information on the backup schedule's details page.
For more information about the cross-region backup feature and its billing, see the following topics:
FAQ
-
Q: How do I disable the backup schedule?
A: After you disable the cross-region backup feature in the ApsaraDB RDS console, Data Disaster Recovery automatically stops the corresponding backup schedule.
-
Q: Why am I still charged after I disable the cross-region backup feature?
A: After you disable the cross-region backup feature, billing for data transfer stops and no new backups are created. However, the system retains existing backups for at least 7 days based on the retention policy. You can set the retention period to 7 days. After the 7-day period, the system automatically deletes all cross-region backup files, and you will no longer incur storage fees for them.
-
Q: Can I switch the billing method for the backup schedule to subscription?
A: No. This type of backup schedule uses the pay-as-you-go billing method by default, and you cannot switch it to a subscription.
-
Q: After I disable the cross-region backup feature in the ApsaraDB RDS console, why does the backup schedule still appear in the Data Disaster Recovery console?
A: The backup schedule remains in the Data Disaster Recovery console temporarily, but it no longer incurs any fees.
Impact of backups
Performing backups for data disaster recovery affects database performance. To minimize this impact, schedule backup tasks during off-peak hours.
Backup principles and impact
|
Item |
Logical backup |
Physical backup |
|
Full backup principle |
Reads data from tables in parallel by executing SQL statements across multiple threads. |
A backup gateway installed on the database server directly copies the database files. |
|
Incremental backup principle |
Captures logs from the database's memory in real time to perform incremental backups. This method prevents data accumulation and reduces the impact on the database's I/O performance. |
|
|
Impact on the Database |
Reads data from the database instance, which affects database performance but does not cause table locks. |
Reads data from the database disk, which affects I/O performance but does not cause table locks. |
Binlog format for MySQL
Data Disaster Recovery supports full backup, incremental backup, and data restoration. To ensure that backups run correctly, Data Disaster Recovery requires specific configurations and account permissions for the database you want to back up.
Error scenario
When you configure a backup schedule in the Data Disaster Recovery console, the precheck fails. The error message indicates that the binlog_format parameter of the source database is not set to ROW. For more information, see Back up on-premises and third-party cloud databases.
To resolve this issue, run the set global binlog_format=ROW command on the source database and then terminate all active connections. If you do not terminate the connections, existing sessions may continue to write data in a non-ROW format, which causes inconsistent incremental data.
Usage notes
-
The
binlog_formatparameter must be set to ROW. In ROW mode, the binary log records the complete before-image and after-image for any Data Manipulation Language (DML) operations. This detailed logging is essential for data restoration. -
Setting
binlog_formatto STATEMENT or MIXED is not recommended. The ROW format is more stable and reliable for backup and recovery purposes. -
Changing
binlog_formatto ROW only affects the content of the binary log and does not impact database queries. However, we recommend that you terminate all active database connections to ensure all connections use the ROW format.
Procedure
-
Use a privileged account to connect to the source database and run the following command to set
binlog_formattoROW.SET GLOBAL binlog_format = 'ROW';To verify the current value of the binlog_format parameter, run the following command:
SHOW GLOBAL VARIABLES LIKE 'binlog_format'; -
Terminate all active connections to the database. This step is critical to prevent existing sessions from writing data in a non-ROW format, which causes inconsistent incremental data.
Back up a read-only instance
Prerequisites
-
You have purchased a backup schedule. For more information, see Create a backup schedule.
NoteWhen you purchase the backup schedule, select MySQL as the database type and logical backup as the backup method.
-
You have created a read-only ApsaraDB RDS for MySQL instance. For more information, see Create a read-only ApsaraDB RDS for MySQL instance.
-
Method 1: Configure a backup schedule using a public endpoint:
-
Obtain the public endpoint of the read-only instance. For more information, see View and manage instance endpoints and port numbers.
-
Add the CIDR blocks of Database Backup Service (DBS) to the whitelist of the read-only instance. For more information, see Configure an IP whitelist.
NoteWhen you configure the backup schedule, select Self-managed database with Public IP:Port for Database Location, and then click How to Add to Whitelist to obtain the CIDR blocks of Database Backup Service (DBS).
You must also specify parameters such as Backup Method, Database Type, and Connection Address.
-
-
Method 2: Configure a backup schedule using an internal endpoint:
-
You have obtained the internal endpoint of the read-only instance and used the ping command locally to get its current internal IP address.
~ % ping rr-bp1xxx.mysql.rds.aliyuncs.com PING rr-bp1xxx.mysql.rds.aliyuncs.com (172.xx.xxx.101): 56 data bytes Request timeout for icmp_seq 0 Request timeout for icmp_seq 1ImportantThe internal IP address that you obtain may change in some scenarios, which can cause the backup to fail. For more information, see What are the impacts of a backup on a database?.
-
You have added the CIDR blocks of Database Backup Service (DBS) to the whitelist of the read-only instance. For more information, see Configure an IP whitelist.
NoteWhen you configure the backup schedule, select RDS Instance for Database Location, and then click How to Add to Whitelist to obtain the CIDR blocks of Database Backup Service (DBS).
-
Considerations
-
Binlog replication may be delayed during backups over the public network. We recommend setting a higher value for the local log Retention Period on the Backup Policy tab of the Backup and Restoration page for your read-only ApsaraDB RDS for MySQL instance. The default retention period is 18 hours.
-
When you configure a backup schedule using an internal endpoint, the internal IP address can change if you clone the read-only instance, migrate it to another availability zone, or change its VPC or vSwitch. A change in the IP address causes the connection to the source instance to fail, resulting in a backup failure.
If this occurs, obtain a new current internal IP address as described in the Prerequisites section, and then modify the backup source database. Save the changes.
Procedure
You can configure a backup plan for an ApsaraDB RDS for MySQL read-only instance by selecting one of two options for Database Location: A self-managed database with a public IP address and port or A self-managed database connected through Express Connect, a VPN Gateway, or an Intelligent Gateway.
Method 1: Use a public endpoint
On the Backup Schedules page, find the ID of the backup schedule that you want to configure and click Configure Backup Schedule in the Actions column.

-
On the Configure Backup Source and Destination page, configure the backup source and destination, and then click Next in the lower-right corner.
Note-
Set Database Location to Self-managed database with Public IP:Port.
-
For the Connection Address, enter the public endpoint of the read-only ApsaraDB RDS for MySQL instance. For more information, see View and manage instance endpoints and port numbers.
-
For details on other parameters, see Manage a backup schedule.
-
-
On the Edit Backup Objects page, move the target databases or tables to the Selected box, and then click Next.
Note-
Logical backup: You can select which databases and tables to back up during a full backup. Some database engines allow you to back up multiple databases, a single database, or a single table. Some database engines also support incremental backup. An incremental backup does not distinguish between databases or tables and backs up all incremental data by default.
-
You can click Select All in the lower-left corner to back up the entire database. The supported backup objects and granularity vary by database engine. For more information, see Supported database types and features.
-
Databases created after you configure the backup schedule are not backed up by default. To back up a newly created database, you must add it to the backup schedule configuration. For more information, see Modify backup objects.
-
-
Physical backup: You can only back up an entire database instance.
-
-
On the Configure Backup Time page, configure the backup time and other parameters, and then click Next in the lower-right corner.
Parameter
Description
Full Backup Frequency
Select Periodic Backup or Single Backup as needed.
NoteIf you need to restore incremental data, we recommend that you select Periodic Backup and perform a full backup at least once a week. Otherwise, restoring the data requires replaying a large number of binlog files, which increases the risk of restoration failures and prolongs the recovery time objective (RTO).
Full Backup Cycle
This parameter is required if you set Full Backup Frequency to Periodic Backup. Select the days of the week for the backup. You must select at least one day per week.
Full Backup Start Time
This parameter is required if you set Full Backup Frequency to Periodic Backup. Select a backup start time, for example, 01:00. We recommend that you set this to an off-peak hour.
NoteIf the previous full backup task is still running at the scheduled start time of the next backup, the system skips the scheduled backup.
Incremental Backup
Enables incremental backup. If you enable this feature, ensure that binlog is enabled for the source database.
Note-
This parameter appears only if you set Full Backup Frequency to Periodic Backup.
-
Binlog is enabled by default for ApsaraDB RDS for MySQL. For a self-managed database, you must manually enable binlog.
Maximum Concurrent Threads for Full Backup
Enter the maximum number of concurrent threads for a full backup. You can adjust this parameter to control the backup speed. For example, you can reduce the number of backup threads to minimize the impact on the database.
Backup Network Throttling
The limit on the network bandwidth. Unit: MB/s. You can set the limit based on your business requirements. The default value 0 indicates that the network bandwidth is unlimited.
NoteThis parameter is displayed only when you back up a MySQL database.
-
In the Edit Lifecycle step, configure the lifecycle for full backup data in the Configure Full Data Backup Lifecycle section.
NoteIf you set the Incremental Backup parameter to Enable in Step 6, you must configure the lifecycle for incremental backup data.
After the configurations are complete, click Precheck in the lower-right corner of the page.
-
In the Precheck dialog box, click Start Task after the precheck passes.
Note-
The backup schedule is ready when its Status changes to Running.
-
If the backup schedule becomes abnormal or reports an error, troubleshoot and resolve the issue promptly. For more information, see How to fix an abnormal backup schedule. If the issue persists after you follow the suggestions in the topic, contact technical support in the DingTalk group (ID: 35585947).
-
Method 2: Use an internal endpoint
On the Backup Schedules page, find the ID of the backup schedule that you want to configure and click Configure Backup Schedule in the Actions column.

-
On the Configure Backup Source and Destination page, configure the backup source and destination, and then click Next in the lower-right corner.
Note-
For Database Location, select Self-managed database accessed via Express Connect/VPN Gateway/Intelligent Gateway.
-
For Destination VPC, select the VPC of the target ApsaraDB RDS for MySQL read-only instance.
-
For Connection address, enter the private IP address as described in Prerequisites.
-
For Port, enter the port number of the target ApsaraDB RDS for MySQL read-only instance.
-
For details on other parameters, see Manage a backup schedule.
-
-
On the Edit Backup Objects page, move the target databases or tables to the Selected box, and then click Next.
Note-
Logical backup: You can select which databases and tables to back up during a full backup. Some database engines allow you to back up multiple databases, a single database, or a single table. Some database engines also support incremental backup. An incremental backup does not distinguish between databases or tables and backs up all incremental data by default.
-
You can click Select All in the lower-left corner to back up the entire database. The supported backup objects and granularity vary by database engine. For more information, see Supported database types and features.
-
Databases created after you configure the backup schedule are not backed up by default. To back up a newly created database, you must add it to the backup schedule configuration. For more information, see Modify backup objects.
-
-
Physical backup: You can only back up an entire database instance.
-
-
On the Configure Backup Time page, configure the backup time and other parameters, and then click Next in the lower-right corner.
Parameter
Description
Full Backup Frequency
Select Periodic Backup or Single Backup as needed.
NoteIf you need to restore incremental data, we recommend that you select Periodic Backup and perform a full backup at least once a week. Otherwise, restoring the data requires replaying a large number of binlog files, which increases the risk of restoration failures and prolongs the recovery time objective (RTO).
Full Backup Cycle
This parameter is required if you set Full Backup Frequency to Periodic Backup. Select the days of the week for the backup. You must select at least one day per week.
Full Backup Start Time
This parameter is required if you set Full Backup Frequency to Periodic Backup. Select a backup start time, for example, 01:00. We recommend that you set this to an off-peak hour.
NoteIf the previous full backup task is still running at the scheduled start time of the next backup, the system skips the scheduled backup.
Incremental Backup
Enables incremental backup. If you enable this feature, ensure that binlog is enabled for the source database.
Note-
This parameter appears only if you set Full Backup Frequency to Periodic Backup.
-
Binlog is enabled by default for ApsaraDB RDS for MySQL. For a self-managed database, you must manually enable binlog.
Maximum Concurrent Threads for Full Backup
Enter the maximum number of concurrent threads for a full backup. You can adjust this parameter to control the backup speed. For example, you can reduce the number of backup threads to minimize the impact on the database.
Backup Network Throttling
The limit on the network bandwidth. Unit: MB/s. You can set the limit based on your business requirements. The default value 0 indicates that the network bandwidth is unlimited.
NoteThis parameter is displayed only when you back up a MySQL database.
-
In the Edit Lifecycle step, configure the lifecycle for full backup data in the Configure Full Data Backup Lifecycle section.
NoteIf you set the Incremental Backup parameter to Enable in Step 6, you must configure the lifecycle for incremental backup data.
After the configurations are complete, click Precheck in the lower-right corner of the page.
-
In the Precheck dialog box, click Start Task after the precheck passes.
Note-
The backup schedule is ready when its Status changes to Running.
-
If the backup schedule becomes abnormal or reports an error, troubleshoot and resolve the issue promptly. For more information, see How to fix an abnormal backup schedule. If the issue persists after you follow the suggestions in the topic, contact technical support in the DingTalk group (ID: 35585947).
-
Obtain internal and public endpoints
Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.
-
On the Basic Information page, click View Connection Details to view the internal and public endpoints of the read-only instance. The Database Connection page lists the Internal Endpoint and Public Endpoint with their corresponding port numbers. The internal endpoint uses the format
rr-bp1xxx.mysql.rds.aliyuncs.com.NoteIf the read-only instance does not have a public endpoint, click Apply for Public Endpoint in the Public Endpoint row on the Database Connection page, and then click OK. The new endpoint is displayed after it is enabled.
FAQ
-
Q: Why does my backup schedule fail to connect to the source instance when using an internal IP address, and how do I fix it?
A: Possible causes: The internal IP address used in Method 2 is dynamic and can change if you clone the read-only instance, migrate it to another availability zone, or change its VPC or vSwitch. This change breaks the connection to the source instance and causes the backup to fail.
Solution: Use the internal endpoint of the read-only instance and run the ping command locally to obtain a new current internal IP address. Then, modify the backup source database and save the changes.
~ % ping rr-bp1xxx.mysql.rds.aliyuncs.com PING rr-bp1xxx.mysql.rds.aliyuncs.com (172.xx.xxx.101): 56 data bytes Request timeout for icmp_seq 0 Request timeout for icmp_seq 1 -
Q: Does Database Backup Service (DBS) support full and incremental backups of a read-only instance?
A: Yes, DBS supports both.
Disaster recovery and RDS backup
-
disaster recovery provides dump and logical backups, enabling cross-region and flexible backups.
-
RDS provides physical backups, enabling local backups and fast restoration.
Benefits of Database Backup Service (DBS) dump backups
Cross-region backup
-
Backups use a secure, stable, and dedicated network.
-
DBS directly dumps native physical backups and logs from ApsaraDB RDS, so you do not need to start a separate backup.
-
Restore a backup set to an ApsaraDB RDS instance in a single click.
-
Retain backup sets for up to five years. They are stored independently and remain available for the specified period, even after the ApsaraDB RDS instance is released.
-
DBS provides maintenance-free, auto-scaling storage.
Flexible backup
-
Database Backup Service (DBS) protects critical data by backing up core tables in real time. It combines single-table full backups with real-time incremental backups to achieve a recovery point objective (RPO) of seconds and enable point-in-time recovery.
-
Database Backup Service (DBS) supports single-table recovery, which lets you extract a specific table from a backup set. Because recovery time depends only on the amount of data restored, you can recover data in minutes.
-
Data Disaster Recovery provides a schema mapping feature for restoration. You do not need to purchase an additional database instance for data restoration and can restore data directly to the original database instance. The schema mapping feature allows you to manually rename schemas and tables for restoration. In addition, data disaster recovery provides a conflict resolution strategy for objects with the same name. If a schema or table with the same name is encountered during the restoration process, it is automatically renamed. This process does not delete or modify the original data on the target database.
-
For RDS databases, Data Disaster Recovery is deeply integrated with DMS, which allows you to directly initiate backups and restorations. You can access this feature from: Security and Specifications (DBS) > Data Disaster Recovery.
View backup files in OSS
Data Disaster Recovery supports backing up database instances to your own OSS. When you back up data to OSS For User, Data Disaster Recovery automatically creates a backup directory in the specified OSS Bucket. You do not need to create it manually. The naming convention for backup files is <Backup task ID>/<Backup type>/<Backup task run ID (full or incremental)>/<Specific data>.
On the Backup Schedules page, find the backup schedule that you want to manage and click Manage in the Actions column.
-
On the Configure Task page, find Destination OSS Bucket and click the bucket name.
You are automatically redirected to the destination bucket's directory in the OSS console. This directory contains a
fullfolder for full backups and acontinuousfolder for incremental backups. For more information about OSS, see Quick start.
Execution time mismatch for data disaster recovery
Data disaster recovery executes backup SQL in the UTC+0 time zone to ensure data reliability for logical backups. However, the SQL audit feature of ApsaraDB RDS records these executions in the UTC+8 time zone. Consequently, the time shown in the ApsaraDB RDS console is eight hours ahead of the actual execution time displayed in the data disaster recovery console.
Impact on databases
Data disaster recovery backups can affect database performance. We recommend running backups during off-peak hours to minimize the impact.
|
Item |
Logical backup |
Physical backup |
|
How full backups work |
Splits the data in each table and executes SQL statements to read the data in parallel using multiple threads. |
A backup gateway on the database server directly copies the database files. |
|
How incremental backups work |
Performs incremental backups by capturing logs from the database's memory in real time. This method prevents data accumulation and reduces the impact on the database's I/O performance. |
|
|
Impact on the database |
Reads data from the database instance, which affects database performance. However, this method does not cause table locks. |
Reads data from the database disk, which affects database I/O performance. However, this method does not cause table locks. |