All Products
Search
Document Center

Data Management:Logical backup and restoration for cross-cloud or self-managed MySQL

Last Updated:May 09, 2026

Data Backup Service (DBS) can be used for the geo-redundancy, long-term archiving, and single-table restoration of MySQL databases. This topic describes how to use DBS to back up and restore a cross-cloud or self-managed MySQL database.

Feature overview

Feature

Description

Incremental backup

Retrieves binary logs in real time to perform incremental backups.

Full backup

Logical backups are stored in the Parquet format. Physical backups are stored in the gzip format by default.

Download backup files

You can download backup sets.

Geo-redundancy

You can back up a MySQL database to a different region and restore the data to an ApsaraDB RDS instance or a self-managed MySQL database in the source, destination, or another region.

Long-term archiving

You can retain backup sets for up to 10 years. Backup sets automatically transition to archival storage.

Fine-grained backup

You can back up an multiple databases, a single database, or a single table.

Single-table restoration

You can restore a single table without restoring the entire database instance, which reduces the recovery time. When you configure the objects to restore, simply select the target table.

Create a backup schedule

For detailed instructions, see Create a backup schedule.

Note
  • When you purchase the backup schedule, select MySQL as the database type and logical backup as the backup method.

  • To learn about the granularity for backing up and restoring MySQL databases, see Supported database types and features.

  • During the full backup phase, do not perform DDL operations that change the database or table schema. Otherwise, the backup may fail or the data may not be restorable.

Configure a backup schedule

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

  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. Find the target backup schedule ID and click Actions in the Configure Backup Schedule column.

    image.png

  4. On the Configure Backup Source and Destination page, configure the backup source and destination information, and then click Next in the lower-right corner.

    image.png

    Table 1. Database configuration

    Section

    Parameter

    Description

    N/A

    Backup schedule name

    DBS automatically generates a task name. We recommend that you specify a descriptive name for easy identification. The name does not need to be unique.

    Backup Source Information

    Backup method

    This parameter defaults to the backup method that you selected when you created the backup schedule. In this example, logical backup is selected.

    Database location

    Select a value based on the type of the source database that you want to back up:

    • No public network IP: Port's self-built database (accessed through the database gateway): Backs up a self-managed database by using a database gateway. You must configure a database gateway for the database instance in advance and select the target Database Gateway ID in this step.

    • User-Created Database with Public IP Address <IP Address:Port Number>: Backs up a self-managed database over the Internet. You must also configure the connection address and port for the source database instance.

    • ECS-Hosted Database: Backs up a database that is deployed on an Elastic Compute Service (ECS) instance. You must also configure the ECS instance ID and the database port for the source database instance.

    • Express Connect DB/VPN Gateway/Intelligent Gateway: Backs up a self-managed database over a Virtual Private Cloud (VPC). You must configure a VPC for the database instance in advance and select the target Peer VPC in this step.

    • PolarDB: Backs up a PolarDB for MySQL cluster. You must also select the source PolarDB Cluster ID.

    Instance region

    Select the region of the source database instance.

    Note

    This parameter is displayed only when you select RDS Instance, PolarDB, ECS-Hosted Database, or No public network IP: Port's self-built database (accessed through the database gateway).

    PolarDB cluster ID

    Select the PolarDB cluster that you want to back up.

    Database type

    The default value is MySQL.

    Note

    This parameter is displayed only if you select User-Created Database with Public IP Address <IP Address:Port Number>, PolarDB, ECS-Hosted Database, Express Connect DB/VPN Gateway/Intelligent Gateway, or No public network IP: Port's self-built database (accessed through the database gateway).

    Peer VPC

    Select the VPC.

    Note

    This parameter is displayed only if you set Database Location to Self-managed database connected over Express Connect, a VPN gateway, or Smart Access Gateway (SAG).

    ECS instance ID

    Select the ID of the ECS instance that you want to back up.

    Note

    This parameter is displayed only if you set Database Location to Self-managed database on an ECS instance.

    Database gateway ID

    Select the database gateway instance.

    Note

    This parameter is displayed only if you set Database Location to Self-managed database without a public IP address, accessed by using a database gateway.

    Connection address

    The connection address of the source database instance.

    Note
    • If network security settings such as a firewall are configured on your server, click Set Whitelist to obtain the CIDR blocks of DBS. You must add the CIDR blocks to the whitelist of your server to ensure that DBS can access your server.

    • This parameter is displayed only if you select No public network IP: Port's self-built database (accessed through the database gateway), Express Connect DB/VPN Gateway/Intelligent Gateway, or User-Created Database with Public IP Address <IP Address:Port Number>.

    Port

    The port that is used to connect to the source database.

    Note

    This parameter is not displayed if you set Database Location to PolarDB.

    Database account

    Enter a database account with the required permissions to back up the database. For more information, see Account permissions.

    Note

    For an RDS database, an account with read-only permissions meets backup requirements, and an account with read and write permissions meets backup and restoration requirements.

    Password

    Enter the password that corresponds to the database account.

    After you specify the account and password, you can click Test Connection to check whether the specified database information is valid. If the source database information is valid, a success message is returned. If the connectivity test fails, click Diagnose and adjust the source database information as prompted.

    Connection method

    Select a connection method. Valid values:

    • Non-encrypted

    • SSL-encrypted: Secure Sockets Layer (SSL) encrypts network connections at the transport layer to improve the security and integrity of data in transit. However, this method increases the response time of network connections.

      Note

      Before you select SSL-encrypted, ensure that SSL encryption is enabled on your source database server. For more information, see Step 1: Enable SSL encryption for an ApsaraDB RDS for MySQL instance.

    Compliance warranty regarding cross-border data transfers

    Read and agree to the compliance commitment by selecting the check box.

    Backup Destination Information

    Backup storage type

    The storage type of the backup destination. Valid values:

    • DBS Storage (Recommended): You do not need to create a storage space. DBS automatically stores data in its built-in storage. You are charged based on the amount of stored data. For more information about billing, see Billable items of DBS.

    • OSS For User: You must create a bucket in Object Storage Service (OSS) in advance. For more information, see Create buckets.

    Note
    • This topic uses DBS Storage as an example. If you select User-owned OSS bucket, you must also configure the OSS Bucket Name parameter. Only OSS Standard storage is supported.

    • If you store a large amount of data, we recommend that you purchase a subscription storage plan to offset the fees for built-in storage. Storage plans are more cost-effective than the pay-as-you-go billing method.

    Storage method

    Select a storage method. Valid values:

    • Encrypted (Recommended): uses the industry-standard AES-256 algorithm for encrypted storage.

      OSS supports server-side encryption. When you upload an object, OSS encrypts the received object before the object is stored. When you download the object, OSS automatically decrypts the encrypted object and returns the decrypted object to you.

    • Non-encrypted: does not enable encryption.

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

    Note
    • You can back up specific databases and tables, including single tables, single databases, and multiple databases. You can click Select All in the lower-left corner of the page to select all existing databases. Supported backup objects vary based on the database type. For more information, see Supported database types and features.

    • By default, a backup schedule does not back up databases that are created after the schedule is configured. To back up a new database, add the database to the backup objects in the backup schedule. For more information, see Modify backup objects.

  6. 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 based on your business requirements.

    Note

    If you select Periodic Backup, you must also configure the Full Backup Period and Full Backup Start Time parameters.

    Full backup period

    Select the days of the week to perform full backups. You can select one to seven days. At least one backup must be performed per week.

    Full backup start time

    Select a start time for the backup, for example, 01:00. We recommend that you schedule backups during off-peak hours.

    Note

    If a full backup task is still running at the specified start time, the current backup task is automatically skipped.

    Incremental backup

    Specifies whether to enable incremental backup.

    Note

    If you enable this feature, make sure that binary logging is enabled for the source database. Binary logging is enabled by default for ApsaraDB RDS for MySQL instances. You must manually enable binary logging for self-managed databases.

    This parameter is displayed only if you set the Full Backup Frequency parameter to Periodic Backup.

    Maximum number of parallel threads for full backup

    Specify the maximum number of parallel threads for a full backup. You can set this parameter to adjust the backup speed. For example, you can decrease the number of backup threads to reduce the impact on the database.

    Backup network throttling

    The network bandwidth limit. Unit: MB/s. The default value is 0, which indicates that the network bandwidth is not limited. You can specify any value.

  7. On the Edit Lifecycle page, specify the retention period of full backup data in the built-in storage.

    If you enabled the Incremental Backup feature in the previous step, you must also configure the retention period of incremental backup data. For more information about the lifecycle of backup data, see Manage the lifecycle of backup data.

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

  9. In the Precheck dialog box, after Start Task is displayed, click Start Task.

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

    • If a backup schedule encounters an exception or error, we recommend that you troubleshoot and resolve the issue promptly. For more information, see How do I fix an abnormal backup schedule?. If the issue persists after you try the solutions provided in the topic, join the customer support group (DingTalk group ID: 35585947) for assistance.

Restore data

After you back up a database, if data is lost or damaged or is maliciously tampered with due to hardware failures, software errors, human errors, or natural disasters, you can use the data restoration feature to rapidly restore the data to the most recent available state.

Precautions

When you restore data to an existing instance, make sure that the database account that you specify for the restore task has the required permissions on the destination database. Otherwise, the restore task may fail. For more information, see Account permissions.

Procedure

  1. On the Backup Schedules page, find the backup schedule that you want to manage and click Manage in the Actions column.

  2. On the Configure Task page, click Restore Database in the upper-right corner.

  3. On the Set Time Restored To page, configure the following parameters and click Next.

    image

    Section

    Parameter

    Description

    N/A

    Task Name

    DBS automatically generates a task name. We recommend that you specify a descriptive name for easy identification. The name does not need to be unique.

    Set Time Restored To

    Restorable time range

    The time range available for restoration. This range starts from the completion of the first full backup and ends at the completion of the latest full backup.

    Selected restore time point

    Select a point in time to which you want to restore data. The point in time must be within the Restorable Time Range.

    Note
    • If incremental backup is enabled, you can restore data to any point in time after the backup starts.

    • If incremental backup is not enabled, you can restore data only to the point in time of a full backup set.

    Destination database

    Destination database instance type

    Select Create Instance (Recommended) or Use Exists.

    Note

    If you select Use Exists, make sure that the destination database is running.

    Database location

    • If you select Create Instance (Recommended) as the destination database type, ApsaraDB RDS instance is selected for this parameter by default.

    • If you select Use Exists as the destination database type, you can select one of the following locations:

      • No public network IP: Port's self-built database (accessed through the database gateway)

      • User-Created Database with Public IP Address <IP Address:Port Number>

      • ECS-Hosted Database

      • RDS Instance

      • Express Connect DB/VPN Gateway/Intelligent Gateway

      • PolarDB

    Instance region

    Select the region of the destination instance.

    Note

    This parameter is not displayed if you set Database Location to User-Created Database with Public IP Address <IP Address:Port Number>.

    VPC

    The VPC in which the new instance resides.

    Note

    If you have not created a VPC, see Create and manage a VPC.

    Instance specification

    The instance specification of the new instance. The available specifications are displayed in the console.

    Note

    We recommend that you select an instance specification that is greater than or equal to that of the source instance.

    Storage (GB)

    The storage space of the new instance. The available storage space options are displayed in the console.

    Note

    To ensure sufficient space for restoration, we recommend that you specify a storage space that is at least 1.3 times that of the source instance. Alternatively, the space should be 5 to 6 times the size of the full backup set because backup sets are compressed.

    Database type

    The database type is MySQL.

    Note

    You must configure this parameter only if you set Database Location to No public network IP: Port's self-built database (accessed through the database gateway).

    Database gateway ID

    The gateway on the server where the self-managed database resides. For more information about how to install a backup gateway, see Install a database gateway.

    Note

    You must configure this parameter only if you set Database Location to No public network IP: Port's self-built database (accessed through the database gateway).

    Connection address

    The public endpoint of the destination database.

    Note

    You must configure this parameter only if you set Database Location to No public network IP: Port's self-built database (accessed through the database gateway), User-Created Database with Public IP Address <IP Address:Port Number>, ECS-Hosted Database, or Express Connect DB/VPN Gateway/Intelligent Gateway.

    Port

    The port that is used to connect to the destination database.

    Note

    You must configure this parameter only if you set Database Location to No public network IP: Port's self-built database (accessed through the database gateway) or User-Created Database with Public IP Address <IP Address:Port Number>.

    Database account

    Enter the account for the destination database instance. The account must have write permissions.

    Password

    The password of the account that is used to connect to the database that you want to back up.

    Data cross-border compliance commitment

    Read and select the checkbox to agree to the compliance commitment.

  4. On the Configure Objects to Restore page, configure the following parameters and click Precheck in the lower-right corner of the page.

    Parameter

    Description

    Conflict resolution

    The default Conflict Handling method is Rename if an object with the same name is encountered. For example, if a table with the same name is encountered when restoring the job_info table, the system renames the new table to job_info_dbs_<restore task ID>_<timestamp>.

    Objects to restore

    In the Source Database Objects box, select the databases or tables that you want to restore and move them to the Selected Database Objects box.

    Note

    Some databases support restoration at the single-table or single-database granularity. This reduces the amount of data to be restored and shortens the Recovery Time Objective (RTO). For more information about the supported restoration granularity, see Supported database types and features.

  5. In the Precheck dialog box, after Precheck Passed is displayed, click Start Task.

    You can go to the Restore Tasks tab in the left-side navigation pane to view the progress of database restoration.

    Note

    A higher specification provides a faster restoration speed. For more information, see Performance tests for logical and physical backups.

    If you restore data to a new instance, creating a new ApsaraDB RDS instance takes about 5 to 10 minutes. After the restoration is successful, you can find the new ApsaraDB RDS instance in the ApsaraDB RDS console. You can also click the ID of the restore task and then click the name of the ApsaraDB RDS instance in the Basic Information section to navigate to the ApsaraDB RDS console.

Related operations

  • To change the backup source or backup objects, or modify the backup policy of a backup schedule, such as the backup time and backup set retention policy, see Manage a backup schedule.

  • For information about billing for a backup schedule, see Billing FAQ.

  • If you do not need to use backups for a period of time, you can pause the backup schedule to reduce backup costs. For more information, see Pause or restart a backup schedule.