All Products
Search
Document Center

Data Management:Logical backup and recovery for cross-cloud or self-managed MariaDB databases

Last Updated:Aug 28, 2026

Data Disaster Recovery can meet the requirements of single-table recovery, remote backup, and long-term archiving for MariaDB databases. This topic describes how to use DBS to back up cross-cloud or self-managed MariaDB databases.

Create a backup schedule

For more information, see Create a backup schedule.

Note
  • When purchasing, select the data source type as MariaDB, and select the backup method as Logical Backup.

  • For information about the specific granularity when DBS backs up and restores MariaDB databases, see Supported database types and features.

Configure the backup schedule

  1. Log in to DMS 5.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 Configure Backup Plan in the Actions column on the right.

  4. In the Configure Backup Source and Destination step, configure the backup source and destination, and click Next in the lower-right corner of the page.

    Table 1. Database Configuration

    Category

    Configuration

    Description

    N/A

    Backup Plan

    The name of the backup schedule. DBS automatically generates a backup schedule name. We recommend that you enter a descriptive name that is easy to identify. Backup schedule names do not need to be unique.

    Backup Source Information

    Backup Method

    The method that is used to back up data. By default, the backup method that you selected when you purchased the backup schedule is used. In this example, Logical Backup is used.

    Database Location

    • No public network IP: Port's self-built database (accessed through the database gateway):You can back up self-managed databases through Database Gateway DG. You need to configure Database Gateway DG for the database instance in advance, and select the target DG Instance ID in this configuration step.

    • User-Created Database with Public IP Address <IP Address:Port Number>: You can back up a self-managed database through a public IP address. You also need to configure the connection address and port of the source database instance.

    • ECS-Hosted Database: Back up a database on an ECS instance. You also need to configure the ECS Instance ID and database port of the source database instance.

    • Express Connect DB/VPN Gateway/Intelligent Gateway: You can back up a self-managed database through a VPC. You need to configure a VPC for the database instance in advance, and select the target Peer VPC in this configuration step.

    • PolarDB: Back up PolarDB MySQL. You also need to select the source PolarDB Instance ID.

    Instance Region

    Select the region of the source database instance.

    Note

    This parameter is displayed only when RDS Instance or PolarDB is selected as the database location.

    PolarDB Instance ID

    Select the PolarDB instance to back up.

    Database Type

    The default value is MySQL.

    Note

    This parameter is displayed only when User-Created Database with Public IP Address <IP Address:Port Number> or Express Connect DB/VPN Gateway/Intelligent Gateway is selected as the database location.

    Peer VPC

    Select a VPC.

    Note

    This parameter is displayed only when the Database Location parameter is set to Self-managed Database Connected over Express Connect/VPN Gateway/Smart Access Gateway.

    ECS Instance ID

    Select the ECS instance ID to back up.

    Note

    This parameter is displayed only when the Database Location parameter is set to Self-managed Database in ECS.

    Database Gateway DG Instance ID

    Select a Database Gateway DG instance.

    Note

    This parameter is displayed only when the Database Location parameter is set to Self-managed Database without Public IP:Port (Connected through Database Gateway DG).

    Connection Address

    Select the connection address of the source database instance.

    Note
    • If your server has network security settings (such as a firewall), you need to click Set Whitelist to obtain the IP addresses of DBS, and add the complete IP addresses to the allowlist of the server.

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

    Port

    The connection port of the destination database.

    Note

    This parameter is not displayed when the Database Location parameter is set to ApsaraDB for MongoDB.

    Database Account

    Enter the database account. This account must have certain permissions to back up the database. For more information, see Account permissions.

    Note

    For ApsaraDB RDS databases, read-only permissions are required for backup, and read and write permissions are required for backup and restoration.

    Password

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

    After you enter the username and password of the database account, click Test Connection next to the password to check whether the information about the database that you want to back up is valid. If the specified parameters are valid, the Test Passed message is displayed. If the Test Failed message is displayed, click Check next to Test Failed. Modify the information about the database that you want to back up based on the check results.

    Cross-border Data Compliance Commitment

    Read and select the compliance commitment.

    Backup Destination Information

    Backup Storage Type

    The storage type for backup data. Supported options:

    • DBS Built-in Storage (Recommended): No need to create storage space. Data is automatically stored in DBS built-in storage. Fees are charged based on the amount of data stored in DBS. For billing details, see Storage fees.

    • OSS For User: You need to create a storage space (Bucket) in OSS in advance. For more information, see Create buckets.

    Note
    • This example uses DBS Built-in Storage. If you select User OSS, you also need to configure the OSS Bucket Name parameter, and only OSS Standard storage is supported.

    • When your stored data volume is large, we recommend that you purchase a DBS storage package (subscription) to offset DBS built-in storage costs. Compared with pay-as-you-go, the DBS storage package is more cost-effective.

    Storage Method

    Select a storage method. Currently supported:

    • Encrypted (Recommended): Uses the industry-standard AES256 algorithm (256-bit Advanced Encryption Standard) for encrypted storage.

      OSS supports server-side encryption. When you upload a file (Object), OSS encrypts the received file and persistently stores the encrypted file. When you download the file, OSS automatically decrypts and returns the file. For more information, see Server-side encryption.

    • Non-encrypted: Encryption is not enabled.

  5. On the Edit Backup Objects page, move the target databases and tables to the Selected box, and click Next in the lower-right corner of the page.

    Note
    • Logical backup: You can select which databases and tables to back up during subsequent full backups. Some databases support selecting multiple databases, a single database, or a single table. Some databases support incremental backup, and incremental backup does not distinguish databases and tables, and backs up all incremental data by default.

      • You can click Select All in the lower-left corner of the page to select the entire database for backup. The backup objects and granularity supported by each database are different. For more information, see Supported database types and features.

      • By default, the backup task does not support backing up databases that are newly created later. If you need to back up such databases, you can add them to the backup schedule configuration for subsequent backups. For more information, see Modify backup objects.

    • Physical backup: Only supports backing up the entire database instance.

  6. On the Configure Backup Time page, configure the backup time and other information, and click Next in the lower-right corner of the page.

    Configuration

    Description

    Full-scale Backup Frequency

    Select as needed: Periodic Backup or Single Backup.

    Note

    For scenarios that require restoring incremental data,we recommend selectingPeriodic Backup. Perform a full backup at least once a week. Otherwise, a large amount of binlog needs to be replayed during recovery, which will likely result in recovery exceptions, long RTO (Recovery Time Objective), and recovery failures.

    Full Backup Cycle

    Full Backup Frequency is set to Periodic Backup Select the backup cycle. Select at least one day per week for data backup.

    Full Backup Start Time

    Full Backup Frequency is set to Periodic Backup. Select the backup start time. For example,01:00. We recommend setting it to off-peak hours.

    Note

    If the specified backup time arrives,but the previous full backup task is still in progress,the system will automatically skip the current backup.

    Incremental Backup

    Select whether to enable incremental backup,When this parameter is enabled,Make sure the target database has enabledBinlog.

    • ApsaraDB RDS for MariaDB:To view or enableBinlog. For more information, see MariaDBBackup Settings.

    • Self-managed MariaDB: Run SHOW VARIABLES LIKE 'log_bin'; to check the Binlog status. When the value of log_bin is ON, it indicates that Binlog is enabled.

    Note

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

    Maximum Number of Full Backup Parallel Threads

    Specify the maximum number of full backup parallel threads. You can adjust the backup speed by setting this parameter. For example, reduce the number of backup threads to minimize the impact on the database.

    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 backing up MySQL databases.

  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. After the Precheck dialog box shows that the precheck is passed, click Start Task.

    Note
    • After the backup schedulestatuschanges toRunning,it indicates that the backup schedule has been configured.

    • If the backup schedule encounters an exception or error, we recommend that you troubleshoot and fix the issue in a timely manner. For more information, see How to fix an abnormal DBS backup schedule. If the issue persists after following the suggestions in the documentation, please consult the DBS customer support group (DingTalk group ID: 35585947).

Restore data

  1. Log on to the Data Management (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. On the Backup Schedules page, find the backup schedule that you want to use and click Manage in the Actions column.

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

  5. On the Configure Restore Point page, configure the restore point and the target database for restoration, and click Next.

    Category

    Configuration

    Description

    N/A

    Task Name

    DBSa task name will be automatically generated,We recommend configuring a name with business significance(No uniqueness requirement), for easy identification later.

    Set Time Restored To

    Restorable time range

    The system displays the restorable time range,that is, from the first to the most recent completed full backup set time point.

    Selected restore time point

    Select the time point to restore to,The time you set must be withinRestorable time range.

    Note

    If incremental log backup is enabled,DBSyou can restore to any point in time after the backup;If incremental log backup is not enabled,you can only restore to the time point of full backup sets.

    Restore target database

    Database Location

    In this example, the backup set is restored to a pre-createdRDS Instance. Make sure the target database service is running. DBS also supports restoring to the following database instance locations:

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

    • ECS-Hosted Database

    • Express Connect DB/VPN Gateway/Intelligent Gateway

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

    Instance Region

    Select the region of the target instance for restoration.

    RDS Instance ID

    Select the target RDS instance ID for restoration.

    Database Account

    Enter the account of the target database instance, which must have write permissions.

    Password

    Enter the password for the database account.

    Cross-border Data Compliance Commitment

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

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

    Configuration

    Description

    Conflict Handling

    The default Conflict Handling is set toRename on Conflict. For example, when table job_info encounters a table with the same name during restoration, the system renames the new table to job_info_dbs_<restore_task_ID>_<timestamp>.

    Restore Objects

    select the databases or tables to restore from the Source Database Objects box and move them to the Selected Database Objects box.

    Note

    Some databases support single-table or single-database restore granularity, which reduces the amount of data to restore and shortens the RTO (Recovery Time Objective). For specific supported restore granularity. For more information, see Supported database types and features.

  7. After the Precheck dialog box shows Precheck Passed, click Start Task

    You can view the Restore Tasks tab on the left side of the page to view the database restoration progress.

    Note

    The restoration time depends on the backup plan specifications and database size. Higher specifications result in faster restoration. For more information. For more information, see Performance tests on logical backup and physical backup.

Related operations

  • If you need to change the backup source or backup object information, or modify the backup strategy of the backup schedule (such as backup time and backup set retention policy), see Manage a backup schedule.

  • For information about potential fees that may be incurred by the backup schedule, see Billing FAQ.

  • If you temporarily do not need to use backup, you can pause the backup schedule to save backup costs. For more information, see Pause or start a backup plan.