ApsaraDB RDS for MariaDB protects your data through automatic and manual backups. Automatic backups run on a schedule you define; manual backups capture a point-in-time snapshot on demand.
Prerequisites
Before you begin, make sure you have:
An ApsaraDB RDS for MariaDB instance
The AliyunServiceRoleForDBS service-linked role (created automatically the first time you use the backup feature). For more information, see How do I create a service-linked role for Data Disaster Recovery?
Backup storage and billing
Backup files consume backup storage. Each instance includes a free storage quota; usage beyond that quota is billed.
To view your instance's free quota, see View the free quota for backup storage of an ApsaraDB RDS for MariaDB instance.
For pricing details, see Billable items, billing methods, and pricing.
Set a backup cycle that fits your business needs to stay within the free quota.
Usage notes
Do not run DDL statements during a backup. DDL statements lock the affected tables and cause the backup to fail.
Schedule backups during off-peak hours to minimize performance impact.
Large instances may take longer to back up.
Download backup files before their retention period expires.
How backups work
Data backup
ApsaraDB RDS for MariaDB uses snapshot backup exclusively. Physical backup and logical backup are not supported.
Each backup captures a full snapshot of your instance. Data backup retention ranges from 7 to 730 days (default: 7 days).
Log backup
Log files are written to the instance's storage capacity. A new log file is created when the current file exceeds 500 MB or has been written to for more than 6 hours; the previous file is then uploaded asynchronously.
To free up instance storage, use the Upload Binlogs feature to push log files to an Object Storage Service (OSS) bucket. Once uploaded, log files no longer consume instance storage capacity.
The OSS bucket that stores log files is not accessible to users.
Disabling log backup deletes all existing log backup files and removes the ability to restore the instance to a specific point in time.
Configure automatic backup
ApsaraDB RDS automatically backs up your instance based on the backup policy you configure.
Log on to the ApsaraDB RDS console. In the top navigation bar, select the region where the instance resides. Find the instance and click its ID.
In the left-side navigation pane, click Backup and Restoration.
On the Backup and Restoration page, click the Backup Strategy tab. In the Data Backup Settings section, click Edit.
In the Backup Settings dialog box, configure the parameters and click Save.
| Parameter | Description |
|---|---|
| Data Backup Retention (Days) | Number of days to retain data backup files. Valid values: 7–730. Default: 7. |
| Backup Cycle | Days of the week on which backups run. Select at least two days for better data protection. |
| Backup Time | Time window during which the backup runs. Schedule this during off-peak hours. |
| Log Backup | Enables or disables log backup. Disabling this feature deletes all log backup files and removes point-in-time restore capability. |
| Log Retention Period (Days) | Number of days to retain log backup files. Valid values: 7–730. Default: 7. Cannot exceed the data backup retention period. |
Trigger a manual backup
Log on to the ApsaraDB RDS console. In the top navigation bar, select the region where the instance resides. Find the instance and click its ID.
In the upper-right corner of the instance page, click Backup Instance. In the Backup Instance dialog box, click OK.
After the backup completes, go to Backup and Restoration > Base Backups. On the Data Backup or Log Backup tab, you can restore the backup to another RDS instance.
FAQ
Can I disable data backup?
No. Data backup cannot be disabled. The retention period must be between 7 and 730 days.
Can I disable log backup?
Yes. Disable log backup in the Backup Settings dialog box. Disabling log backup deletes all existing log backup files and removes point-in-time restore capability.
API reference
| Operation | Description |
|---|---|
| CreateBackup | Creates a backup task for an instance. |
| DescribeBackups | Queries the backup files of an instance. |
| DescribeBackupPolicy | Queries the backup settings of an instance. |
| ModifyBackupPolicy | Modifies the backup settings of an instance. |
| DescribeBackupTasks | Queries the backup tasks of an instance. |
| DescribeBinlogFiles | Queries the log files of an instance. |