Database Backup Service (DBS) supports features like single-table restore, remote backups, and long-term archiving for MariaDB databases. This topic describes how to perform a logical backup of an ApsaraDB RDS for MariaDB instance.
Create a backup schedule
For more information, see Create a backup schedule.
-
When you purchase a backup schedule, set Data Source Type to MariaDB and Backup Method to Logical Backup.
-
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 instance 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 target backup schedule 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 configuration parameters
Category
Parameter
Description
N/A
Backup 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
Instance region
Select the region where the source database instance is located.
NoteThis 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).
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 backups. The following options are supported:
-
DBS Built-in Storage (Recommended): You do not need to create your own storage. DBS automatically stores data in its built-in storage. You are charged based on the amount of data stored in DBS. For information about billing, see Billing items (DMS).
-
OSS For User: You must create a bucket in Object Storage Service (OSS) in advance. For more information, see Create buckets.
Note-
In this example, DBS Built-in Storage is selected. If you select User-owned OSS, you must also configure the OSS Bucket Name parameter. Only the OSS Standard storage class is supported.
-
For large data volumes, we recommend purchasing a subscription-based DBS storage plan to reduce costs. These plans are more cost-effective than the pay-as-you-go option.
Storage method
Select a storage method. The following options are supported:
-
Encrypted (Recommended): Data is encrypted and stored based on the industry-standard AES-256 algorithm.
OSS supports server-side encryption. When you upload an object, OSS encrypts it before storing it. When you download the object, OSS automatically decrypts it. For more information, see Server-side encryption.
-
Non-encrypted: Encryption is not enabled.
-
-
On the Edit Backup Objects page, move the databases and tables that you want to back up to the Selected box, and then click Next.
Note-
Logical backup: You can select specific databases and tables for a full backup. The selection granularity (multiple databases, a single database, or a single table) varies by database type. If supported, incremental backup applies to all databases and tables by default.
-
You can click Select All in the lower-left corner of the page to back up the entire database. The supported backup objects and backup granularity vary based on the database type. For more information, see Supported database types and features.
-
Databases created after you configure the backup schedule 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.
-
-
On the Configure Backup Time page, configure parameters such as the backup time, and then click Next.
Parameter
Description
Full backup frequency
Select Periodic Backup or Single Backup based on your business requirements.
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, the system must replay a large number of binary log files during restoration, which increases the risk of errors, extends the recovery time objective (RTO), and may cause the restore to fail.
Full backup period
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 start time for the backup, such as 01:00. We recommend that you set this parameter to a time during off-peak hours.
NoteIf a previous 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. If you enable this feature, make sure that binary logging is enabled for the source database.
-
ApsaraDB RDS for MariaDB: To view the status of or enable binary logging, see MariaDB backup settings.
-
For a self-managed MariaDB instance, execute
SHOW VARIABLES LIKE 'log_bin';to check the Binlog status. If the value oflog_binisON,Binlogis enabled. If the value isOFF,Binlogis disabled.
NoteThis parameter is displayed only if you set Full Backup Frequency to Periodic Backup.
Maximum number of parallel threads for full backup
The maximum number of parallel threads for a full backup. You can adjust this parameter to control the backup speed and its impact on your 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 available only when you back up a MariaDB 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.
Note-
The backup schedule is configured after its Status changes to Running.
-
If an exception or an error occurs in the backup schedule, we recommend that you troubleshoot and fix the issue promptly. For more information, see How to fix an abnormal DBS backup schedule. If the issue persists after you try the suggested solutions, contact us via the 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 Restore Time Point page, configure the restore point and the destination database, and then click Next.
Category
Parameter
Description
N/A
Task Name
DBS automatically generates a name for the task. We recommend specifying a descriptive name for easier identification. The name does not need to be unique.
Set Time Restored To
Restorable time range
The system displays the time range within which you can restore data. This range spans from the time of the first completed full backup set to that of the most recent one.
Selected restore time point
Select the point in time to restore to. The time must be within the Restorable Time Range.
NoteIf incremental backup is enabled, you can restore to any point in time. If it is disabled, you can restore only to the time of a specific full backup. For more information, see Enable or disable incremental log backup.
Restore destination database
Database location
In this example, the backup set is restored to a pre-created RDS Instance. Make sure that the destination 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 where the destination instance is located.
RDS instance ID
Select the ID of the destination RDS instance.
Database Account
Enter the account for the destination instance. This account must have write permissions.
Password
Enter the password that corresponds to 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 then click Precheck.
Parameter
Description
Conflict resolution
By default, Conflict Resolution is set to Rename Object with the Same Name. For example, if a table named
job_infois restored and a table with the same name exists, the system renames the restored table tojob_info_dbs_<RestoreTaskID>_<Timestamp>.Restore objects
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.
NoteSome databases allow you to restore individual tables or databases. This granular restoration reduces the amount of data transferred and shortens the recovery time objective (RTO). For more information about the supported restore granularity, see Supported database types and features.
-
In the Precheck dialog box, after the Precheck Passed message appears, click Start Task.
You can monitor the restoration progress on the Restore Tasks tab.
NoteThe restoration time depends on the backup schedule's specifications and the database size. Higher specifications lead to faster restorations. For more information, see Logical backup and physical backup performance tests.
Related operations
-
To change the backup source or backup objects, or to modify the backup policy of a backup schedule, such as the backup time or retention policy, see Manage a backup schedule.
-
For information about potential charges related to backup schedules, see Billing FAQ.
-
You can pause the backup schedule to save costs when backups are temporarily not needed. For more information, see Pause or restart a backup schedule.