All Products
Search
Document Center

ApsaraDB RDS:Use the high-frequency snapshot backup feature

Last Updated:Feb 18, 2025

ApsaraDB RDS for MySQL provides the high-frequency snapshot backup feature to significantly enhance data security. If data loss or damage occurs on your ApsaraDB RDS for MySQL instance, you can use this feature to quickly restore data to a time range.

Prerequisites

  • The RDS instance meets the following requirements:

    • Major engine version: MySQL 8.0 or MySQL 5.7

    • RDS edition: RDS High-availability Edition or RDS Cluster Edition

    • Storage type: Enterprise SSD (ESSD) or general ESSD

  • If this is the first time you use the backup feature of ApsaraDB RDS, make sure that the AliyunServiceRoleForDBS service-linked role (SLR) is created by using your Alibaba Cloud account. For more information, see How do I create a service-linked role for Data Disaster Recovery?

Billing rules

ApsaraDB RDS for MySQL provides a free quota on the storage of each RDS instance to store backup files. If the total size of the backup files of your RDS instance does not exceed the free quota, no fees are charged. If the total size of the backup files of your RDS instance exceeds the free quota, you are charged for the excess backup storage that you use. For more information, see Backup storage fees.

Feature description

Note
  • If you do not enable the high-frequency snapshot backup feature, you can set the snapshot backup frequency to a maximum of once a day.

  • If you enable the high-frequency snapshot backup feature, you can specify a backup frequency that ranges from every 15 minutes to every 12 hours based on your business requirements.

  • If you enable both the high-frequency snapshot backup and cross-region backup features, all backup files that are generated by the high-frequency snapshot backup feature are retained in the destination region. However, the backup files that are generated by the high-frequency snapshot backup feature are retained on the RDS instance based on the retention policies. The following table describes the retention policies.

The snapshot retention policy changes based on the snapshot backup frequency.

Snapshot backup frequency

Snapshot retention policy

Backup within minutes

If you set the snapshot backup frequency to a value at the minute granularity, all snapshots that are completed within 1 hour are retained. For snapshots that are generated 1 hour ago, the system deletes the snapshots except for the first snapshot after the hour. For snapshots that are generated 24 hours ago, the system deletes the snapshots except for the first snapshot after 00:00 every day.

For example, if you set the snapshot backup frequency to every 15 minutes, four snapshots are generated within 1 hour and all snapshots are retained. For snapshots that are generated within the range of 1 to 24 hours, the first snapshot that is completed in each hour is retained, and a total of 23 snapshots are retained within the range. For snapshots that are generated within the range of 24 hours to 7 days, the first snapshot that is completed on each day is retained, and a total of 6 snapshots are retained within the range. In this example, if you set the snapshot backup frequency to every 15 minutes, a total of 33 snapshots are retained within a week.

Backup within hours

If you set the snapshot backup frequency to a value at the hour granularity, all snapshots that are completed within 24 hours are retained. For snapshots that are retained for more than 24 hours, the system keeps the first snapshot after 00:00 every day.

For example, if you set the snapshot backup frequency to every 6 hours, four snapshots are generated within 24 hours and all snapshots are retained. For snapshots that are generated within the range of 24 hours to 7 days, the first snapshot that is completed on each day is retained, and a total of 6 snapshots are retained within the range. In this example, if you set the snapshot backup frequency to every 6 hours, a total of 10 snapshots are retained within a week.

Note

For more information about snapshot retention policies, see Manage the snapshots that are generated by the high-frequency snapshot backup feature.

Enable the high-frequency snapshot backup feature

In the left-side navigation pane of the instance details page, click Backup and Restoration. On the Backup Strategy tab of the page that appears, click Edit in the Basic Backup section to specify a snapshot frequency. 快照频率

Note
  • Before you can use this feature, you must enable the single-digit second backup feature. If the single-digit second backup feature is disabled, the system automatically enables the single-digit second backup feature when you enable the high-frequency snapshot backup feature.

  • For more information about other parameters, see Use the automatic backup feature.

References