All Products
Search
Document Center

Data Management:Logical backup for read-only ApsaraDB RDS for MySQL instances

Last Updated:May 08, 2026

This topic describes how to use Data Disaster Recovery (DBS) to back up a read-only ApsaraDB RDS for MySQL instance.

Prerequisites

  • You have purchased a backup schedule. For more information, see Create a backup schedule.

    Note

    When you make the purchase, 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 an ApsaraDB RDS for MySQL read-only instance.

  • To use Method 1: Configure a backup schedule by using a public endpoint, meet the following requirements:

    • You have obtained the public endpoint of the read-only instance. For more information, see Obtain internal and public endpoints.

    • You have added the CIDR blocks of the DBS service to the whitelist of the read-only instance. For more information, see Configure an IP address whitelist.

      Note

      When you configure the backup schedule, select User-Created Database with Public IP Address <IP Address:Port Number> for Database Location and click Set Whitelist to obtain the CIDR blocks of the DBS service.

      image

  • To use Method 2: Configure a backup schedule by using an internal endpoint, meet the following requirements:

    • You have obtained the internal endpoint of the read-only instance and used the ping command on a local machine to obtain its real-time internal IP address.获取内网IP

      Important

      The internal IP address may change in some scenarios, causing the backup to fail. For more information, see Usage notes.

    • You have added the CIDR blocks of the DBS service to the whitelist of the read-only instance. For more information, see Configure an IP address whitelist.

      Note

      When you configure the backup schedule, select RDS Instance for Database Location and click Set Whitelist to obtain the CIDR blocks of the DBS service.

      image

Usage notes

  • If you perform a backup over a public network, the transmission of the binary log may be delayed. We recommend setting Retention Period for local logs to a large value 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.

    image

  • If you configure the backup schedule by using an internal endpoint, the real-time internal IP address may change when the read-only instance is cloned, migrated to another availability zone, or moved to a different VPC or vSwitch. This change can cause a connection failure to the source instance, resulting in backup failure.

    If this issue occurs, obtain a new real-time internal IP address as described in the Prerequisites section and reconfigure the backup objects. Then, save the configuration to apply the changes.

  • Do not perform Data Definition Language (DDL) operations to change the schema of a database or table during a full backup. Otherwise, the backup task may fail or the resulting backup may be unrecoverable.

Procedure

You can configure a backup schedule for a read-only ApsaraDB RDS for MySQL instance by setting Database Location to User-Created Database with Public IP Address <IP Address:Port Number> or Express Connect DB/VPN Gateway/Intelligent Gateway.

Method 1: Public endpoint

  1. Log on to the Data Management Service (DMS) console.

  2. In the top navigation bar, choose Security and disaster recovery (DBS) > Data Disaster Recovery (DBS) > Backup Plan.

    Note

    If you use the DMS console in simple mode, move the pointer over the 2023-01-28_15-57-17.png 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.

  3. 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.

    image.png

  4. On the Configure Backup Source and Destination page, configure the backup source and destination, and click Next.

    Note
    • Set Database Location to User-Created Database with Public IP Address <IP Address:Port Number>.

    • In the Endpoint field, enter the public endpoint of the read-only ApsaraDB RDS for MySQL instance. For more information, see Obtain internal and public endpoints.

    • For information about other parameters, see Manage a backup schedule.

  5. In the Edit Backup Objects step, find the database or table that you want to back up and add it to the Selected section. Then, click Next.

    Note
    • If you selected Logical Backup when you purchased a backup schedule, DBS allows you to specify the databases and tables to be backed up during full backups. You can back up a single table, a single database, multiple databases, or an entire database instance for some types of databases during full backups. DBS supports incremental backups only for some types of databases. By default, all the incremental data is backed up during incremental backups.

      • You can click Select All in the lower-left corner of the Available section to back up the entire database. The database objects that can be backed up and the backup granularity vary based on the database type. For more information, see Database engines and features.

      • By default, a backup schedule cannot be used to back up a database that is created after the backup schedule is configured. To back up the database, you can add the database to the backup schedule on the Edit Backup Objects page of the backup schedule. For more information, see Modify backup objects.

    • If you selected Physical Backup when you purchased a backup schedule, you must back up an entire database instance.

  6. In the Configure Backup Time step, configure the parameters that are described in the following table. Then, click Next in the lower-right corner of the page.

    Parameter

    Description

    Full-scale Backup Frequency

    The frequency of the backup schedule. Valid values: Periodic Backup and Single Backup.

    Note

    In scenarios in which incremental data needs to be restored, we recommend that you select Periodic Backup and perform a full backup at least once a week. Otherwise, a large number of binary logs must be replayed during restoration. This process is prone to errors and may result in a prolonged recovery time objective (RTO).

    Full Data Backup Recurrence

    The days of the week on which DBS runs the backup schedule. This parameter is required if the Full-scale Backup Frequency parameter is set to Periodic Backup. Select at least one day of the week.

    Started At

    The point in time at which DBS starts a full backup. This parameter is required if the Full-scale Backup Frequency parameter is set to Periodic Backup. We recommend that you specify a point in time during off-peak hours. Example: 01:00.

    Note

    If a previous full data backup is not complete at the start time of the next backup, DBS skips the next backup.

    Incremental Backup

    Specifies whether to enable incremental backup. If you enable incremental backup, make sure that the binary logging feature is enabled for the database that you want to back up.

    Note
    • This parameter is displayed only if you set the Full-scale Backup Frequency parameter to Periodic Backup.

    • By default, the binary logging feature is enabled for an ApsaraDB RDS for MySQL instance. If you use a self-managed database, you must manually enable the binary logging feature.

    Maximum Concurrent Threads for Full Data Backup

    The maximum number of concurrent threads that are available for a full backup. You can configure this parameter to adjust the backup speed. For example, you can reduce the number of backup threads to minimize impacts on the database.

    The maximum number of actual concurrent threads varies based on backup schedule specifications. For more information, see How do I change the maximum backup speed?

    Backup network speed limit

    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.

    Note

    This parameter is displayed only when you configure a backup schedule for a MySQL database.

  7. In the Edit Lifecycle step, configure the lifecycle for full backup data in the Configure Full Data Backup Lifecycle section.

    Note

    If you set the Incremental Backup parameter to Enable in Step 6, you must configure the lifecycle for incremental backup data.

  8. After the configurations are complete, click Precheck in the lower-right corner of the page.

  9. If the Precheck Passed message appears, click Start Task.

    Note
    • If the state of the backup schedule changes to Running, the backup schedule takes effect.

    • If an exception or error occurs when you start the backup schedule, troubleshoot the exception or error at the earliest opportunity. For more information, see How do I fix errors for an abnormal backup schedule in DBS? If your issue persists after you use the solution that is provided in the preceding topic, contact technical support in the DBS DingTalk group (ID: 35585947).

Method 2: Internal endpoint

  1. Log on to the Data Management Service (DMS) console.

  2. In the top navigation bar, choose Security and disaster recovery (DBS) > Data Disaster Recovery (DBS) > Backup Plan.

    Note

    If you use the DMS console in simple mode, move the pointer over the 2023-01-28_15-57-17.png 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.

  3. 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.

    image.png

  4. On the Configure Backup Source and Destination page, configure the backup source and destination, and click Next.

    配置备份源

    Note
    • Set Database Location to Express Connect DB/VPN Gateway/Intelligent Gateway.

    • Set Peer VPC to the VPC in which the target read-only ApsaraDB RDS for MySQL instance is deployed.

    • Set Address to the internal IP address that you obtained. For more information, see the Prerequisites section.

    • Set Port Number to the port number of the target read-only ApsaraDB RDS for MySQL instance.

    • For information about other parameters, see Manage a backup schedule.

  5. On the Edit Backup Objects page, move the databases or tables to back up to the Selected box, and click Next.

    Note
    • Logical backup: You can select the databases and tables to include in a full backup. For some database engines, you can back up multiple databases, a single database, or a single table. DBS also supports incremental backup for some database engines. Incremental backup applies to the entire instance, and all incremental data is backed up by default.

      • You can click Select All in the lower-left corner to back up the entire database. The supported backup objects and backup granularity vary by database engine. For more information, see Supported database engines and features.

      • By default, newly created databases are not automatically backed up. To back up a new database, you must add it to the backup schedule. For more information, see Modify backup objects.

    • Physical backup: Only the entire database instance can be backed up.

  6. On the Configure Backup Time page, configure the backup time and other parameters, and click Next.

    Parameter

    Description

    Full Backup Frequency

    Select Periodic Backup or Single Backup.

    Note

    If 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 data requires replaying a large number of binary log files, which increases the likelihood of recovery exceptions, a long recovery time objective (RTO), and recovery failures.

    Full Backup Period

    This parameter is required if you set Full Backup Frequency to Periodic Backup. Select the days of the week on which to perform a backup. You must select at least one day.

    Full Backup Start Time

    This parameter is required if you set Full Backup Frequency to Periodic Backup. Select a start time for the backup, such as 01:00. We recommend setting the start time to off-peak hours.

    Note

    If a previous full backup is still in progress at the scheduled start time, the current backup is skipped.

    Incremental Backup

    Specifies whether to enable incremental backup. If you enable this feature, make sure that binary logging is enabled for the source database.

    Note
    • This parameter is available only when Full Backup Frequency is set to Periodic Backup.

    • Binary logging is enabled by default for ApsaraDB RDS for MySQL instances. For a self-managed database, you must manually enable binary logging.

    Maximum number of parallel threads for full backup

    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 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.

    Note

    This parameter is available only when you back up a MySQL database.

  7. In the Edit Lifecycle step, configure the lifecycle for full backup data in the Configure Full Data Backup Lifecycle section.

    Note

    If you set the Incremental Backup parameter to Enable in Step 6, you must configure the lifecycle for incremental backup data.

  8. After the configurations are complete, click Precheck in the lower-right corner of the page.

  9. In the Pre-check dialog box, after the pre-check is successful, click Start Task.

    Note
    • The backup schedule is configured after its status changes to Running.

    • If an error occurs in the backup schedule, promptly troubleshoot and fix the issue. For more information, see Fix an abnormal backup schedule. If the issue persists after you follow the instructions in the topic, join the DBS customer support group on DingTalk (Group ID: 35585947) for assistance.

Obtain internal and public endpoints

  1. 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.

  2. On the Basic Information page, click View Details to obtain the internal and public endpoints of the read-only instance.内外网地址

    Note

    If a public endpoint has not been enabled for the read-only instance, click Apply for Public Endpoint > OK. After the endpoint is enabled, you can obtain it.开通外网地址

Related operations

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 cause: The IP address used in Method 2 is a real-time internal IP address. This IP address may change when the read-only instance is cloned, migrated to another availability zone, or moved to a different VPC or vSwitch. This change can cause a connection failure to the source instance, which leads to backup failure.

    Solution: Use the internal endpoint of the read-only instance and run the ping command locally to obtain a new internal IP address. Then, update the backup source database with the new IP address and save the changes.Obtain the internal IP

  • Q: Does Data Disaster Recovery support full and incremental backups for a read-only instance?

    A: Yes, it does.