Database Backup Service (DBS) provides features for MariaDB databases, such as single-table recovery, remote backup, and long-term archiving. This topic describes how to use DBS to back up an ApsaraDB RDS for MariaDB instance.
Create a backup schedule
For more information, see Create a backup schedule.
When you purchase a backup schedule, select MariaDB for Data Source Type and logical backup for Backup Method.
To learn about the backup and restoration granularity that DBS provides for MariaDB databases, see Supported database types and features.
Configure a backup schedule
This topic uses an ApsaraDB RDS for MariaDB backup schedule as an example.
Log on to the Data Management Service (DMS) 5.0 console.
-
In the top navigation bar, choose .
NoteIf you use the DMS console in simple mode, move the pointer over the
icon in the upper-left corner of the DMS console and choose . Find 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.

Table 1. Database settings
Section
Parameter
Description
N/A
Schedule name
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
RDS Instance
实例地区
选择源数据库实例的地域。
Note该参数仅在选择RDS Instance、PolarDB、ECS-Hosted Database、No public network IP: Port's self-built database (accessed through the database gateway)时显示。
RDS instance ID
Select the ID of the source RDS instance.
Database account
The username of the account that is used to connect to the database that you want to back up. The account must have permissions to back up the database. For more information, see Account permissions.
NoteFor 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.
Data cross-border compliance commitment
Read and select the compliance commitment.
Backup Destination Information
Backup storage type
The storage type for your backup data. Valid values:
DBS built-in storage (Recommended): You do not need to create a storage space. DBS automatically stores your data in its built-in storage. You are charged based on the amount of data stored. For more information about billing, see Billable items (DMS).
OSS For User: You must first create a bucket in the Object Storage Service (OSS) console. For more information, see Create a bucket.
NoteThis example uses DBS built-in storage. If you select user OSS, you must also configure the Object Storage OSS Bucket Name parameter. Only the OSS Standard storage class is supported.
If you have a large amount of data to store, we recommend that you purchase a subscription DBS storage package to offset the cost of DBS built-in storage. DBS storage packages are more cost-effective than the pay-as-you-go billing method.
Storage encryption
Select a storage encryption method. Valid values:
Encrypted (Recommended): Encrypts stored data by using the industry-standard AES-256 algorithm.
OSS provides a server-side encryption feature. When you upload an object, OSS encrypts the object it receives and then stores the encrypted object. When you download the object, OSS automatically decrypts it and returns the original object to you. For more information, see Server-side encryption.
Non-encrypted: Disables encryption for stored data.
On the Edit Backup Objects page, move the databases or tables that you want to back up from the source database objects list to the Selected list, and then click Next.
Notelogical backup: You can select specific databases and tables for a full backup. Depending on the database type, you can select entire databases or individual tables. Some database types also support incremental backup. Incremental backups include all incremental data and do not distinguish between databases or tables.
You can click Select All to back up the entire database. The supported backup objects and granularity vary by database type. For more information, see Supported database types and features.
By default, a backup schedule does not back up databases created after the schedule is configured. To back up a new database, you must add it to the backup configuration. For more information, see Modify backup objects.
physical backup: You can only back up the entire database instance.
On the Configure Backup Time page, configure the backup timing and other settings, and then click Next.
Parameter
Description
Full backup frequency
Select Periodic Backup or Single Backup.
NoteIf you need to restore incremental data, we recommend selecting Periodic Backup and performing at least one full backup per week. Otherwise, restoring the database may require replaying a large number of binlogs, which can increase the Recovery Time Objective (RTO) and risk of failure.
Full backup recurrence
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.
Full backup start time
This parameter is required if you set Full backup frequency to Periodic Backup. Select a start time for the backup, for example, 01:00. We recommend scheduling backups during off-peak hours.
NoteIf a previous full backup is still in progress at the scheduled start time, the current backup task is skipped.
Incremental backup
选择是否开启增量备份,开启该参数时,请确保目标数据库已开启Binlog。
RDS MariaDB:如需查看或开启Binlog,请参见MariaDB备份设置。
自建MariaDB:执行
SHOW VARIABLES LIKE 'log_bin';查看Binlog开启状态。log_bin的值为ON时表示Binlog已开启,如果为OFF表示Binlog为关闭状态。
Note该参数仅在全量备份频率参数为Periodic Backup时显示。
Maximum concurrent 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, reducing the number of threads can lessen the impact on your 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.
NoteThis parameter is displayed only when backing 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, after the precheck passes, click Start Task.
NoteWhen the Status of the backup schedule changes to Running, the configuration is complete.
If an error occurs, troubleshoot and fix the issue promptly. For more information, see How to fix an abnormal DBS backup schedule. If the issue persists, contact support by joining the DBS user support group on DingTalk (Group ID: 35585947).
Restore data
Log on to the Data Management Service (DMS) 5.0 console.
-
In the top navigation bar, choose .
NoteIf you use the DMS console in simple mode, move the pointer over the
icon in the upper-left corner of the DMS console and choose . On the Backup Schedules page, find the backup schedule that you want to use and click Manage in the Actions column.
On the Configure Task page, click Restore Database in the upper-right corner.
On the Configure recovery point page, configure the recovery point and destination database, and then click Next.

Section
Parameter
Description
N/A
Task Name
DBS automatically generates a task name. We recommend using a descriptive name for easy identification. It does not need to be unique.
Set Time Restored To
Time range available for restore
This is the available time range for data restoration, spanning from the earliest to the most recent full backup set.
Selected recovery point
Select a point in time for the restoration. The selected time must be within the Time range available for restore.
NoteIf incremental log backup is enabled, you can restore data to any point in time after the backup was created. If incremental backup is disabled, you can only restore to the time of a full backup set. For more information, see Enable or disable incremental log backup.
Restore destination database
Database location
This example restores a backup to a pre-existing RDS instance. Make sure the destination database is running. DBS also supports restoring to the following database 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 where the destination instance is located.
RDS instance ID
Select the ID of the destination RDS instance.
Database Account
Enter an account with write permissions for the destination instance.
Password
Enter the password for the database account.
Data cross-border compliance commitment
Read and agree to the compliance commitment by selecting the check box.
On the Configure Objects to Restore page, configure the following settings and click Precheck.
Parameter
Description
Conflict handling
By default, Conflict handling is set to Rename Object with the Same Name. For example, if a table named
job_infoalready exists in the destination, the restored table is renamed tojob_info_dbs_<RestoreTaskID>_<Timestamp>.Objects to restore
Select the databases or tables to restore from the Source Database Objects list and move them to the Selected Database Objects section.
NoteSome databases support restoration at the table or database level, which reduces the amount of data to restore and shortens the Recovery Time Objective (RTO). For details on supported restoration granularities, see Supported database types and features.
In the Precheck dialog box, after the Precheck Passed message appears, click Start Task.
You can view the progress of the database restoration on the Restore Tasks tab.
NoteThe restoration time depends on the backup schedule's specifications and the database size. Higher specifications result in a faster restoration. For more information, see Logical backup and physical backup performance tests.
Related operations
To change the backup source or backup objects, or to modify backup policies such as the backup time and retention policy, see Manage a backup schedule.
To learn about potential costs associated with your backup schedule, see Billing FAQ.
If you do not need to use a backup schedule temporarily, you can pause it to save costs. For more information, see Pause or restart a backup schedule.