All Products
Search
Document Center

ApsaraDB RDS:Back up MariaDB data

更新時間:Sep 27, 2024

ApsaraDB RDS for MariaDB instance supports both automatic and manual backups. You can set a backup policy to adjust the backup cycle for RDS data and log backups to automatically or manually back up the RDS instance.

Prerequisites

The AliyunServiceRoleForDBS service-linked role is created by using your Alibaba Cloud account when you use the backup feature of ApsaraDB RDS for the first time. For more information, see How do I create a service-linked role for DBS?

Usage notes

  • Backup files occupy backup storage. Each RDS instance is allocated a free quota on backup storage. If the amount of backup storage that you use exceeds the free quota, you are charged for the excess backup storage. We recommend that you specify a backup cycle based on your business requirements to maximize the usage of the free quota. For more information about the free quota on backup storage, see View the free quota for backup storage of an ApsaraDB RDS for MariaDB instance.

  • We recommend that you familiarize yourself with the billing methods and billable items of backup storage. For more information, see Billable items, billing methods, and pricing.

  • For more information about the billing rules of the backup storage usage, see ApsaraDB RDS pricing.

  • Do not execute DDL statements during a backup operation. If DDL statements are executed during a backup operation, the relevant tables are locked and the backup operation fails.

  • We recommend that you back up your RDS instance during off-peak hours.

  • If your RDS instance has a large amount of data, a backup may require a long period of time to complete.

  • Backup files are retained for a specified period of time. Before the specified retention period elapses, we recommend that you download the backup files to your computer.

Backup description

Data backup

Log backup

Snapshot backup is supported. Physical backup and logical backup are not supported.

  • Log files occupy the storage capacity of the RDS instance.

  • If the size of a log file exceeds 500 MB or the period of time during which log data is being written to a log file exceeds 6 hours, a new log file is generated. The original log file is asynchronously uploaded.

  • You can use the Upload Binlogs feature to upload log files to an Object Storage Service (OSS) bucket. This does not affect the data restoration of the RDS instance, and log files no longer occupy the storage capacity of the RDS instance.

Note

The OSS bucket in which the log files are stored is inaccessible.

Automatic backups

ApsaraDB RDS automatically backs up your RDS instance based on the backup policy that you specify.

  1. Log on to the ApsaraDB RDS console and go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the instance ID.

  2. In the left-side navigation pane, click Backup and Restoration.

  3. On the Backup and Restoration page, click the Backup Strategy tab. On the tab that appears, click Edit in the Data Backup Settings section.

  4. In the Backup Settings dialog box, specify a backup policy and click Save. The following table describes the parameters.

    Parameter

    Description

    Data Backup Retention (Days)

    The number of days for which you want to retain data backup files.

    • Valid values: 7 to 730.

    • Default value: 7.

    Backup Cycle

    The cycle based on when you want to perform a backup. You can select one or more days of the week.

    Note

    For data security purposes, we recommend that you select at least two days of the week.

    Backup Time

    The period in hours during which you want to perform a backup.

    Log Backup

    Specifies whether to enable or disable the log backup feature.

    Important

    If you disable this feature, all log backup files are deleted and you cannot restore the data of the RDS instance to a specified point in time.

    Log Retention Period (Days)

    The number of days for which you want to retain log backup files.

    • Valid values: 7 to 730.

    • Default value: 7.

    The log retention period must be less than or equal to the data backup retention period.

Manual backups

  1. Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.

  2. Click the Back Up Instance button in the upper right corner of the page to open the dialog box, and click Ok.

After the backup is complete, you can restore the backup to another instance on the Backup and Restoration > Base Backups > Data Backup or Log backup page.

FAQ

  1. Can I disable the data backup feature for my RDS instance?

    No, you cannot disable the data backup feature for your RDS instance. The data backup retention period must be within the range of 7 days to 730 days.

  2. Can I disable the log backup feature for my RDS instance?

    Yes, you can disable the log backup feature for your RDS instance in the Backup Settings dialog box.

Related operations

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.