All Products
Search
Document Center

ApsaraDB RDS:Set a point-in-time protection policy

Last Updated:Dec 15, 2025

ApsaraDB RDS for MySQL supports point-in-time protection. On the backup policy page, you can turn on the Point-in-time Recovery switch and configure the log backup retention period. The system retains backup sets based on the association between full backups and log backups. This ensures that you can perform a point-in-time recovery (PITR) within the specified time range.

How it works

Traditional backup logic retains backup sets based on the backup cycle. Even when the backup process and backup set retention are functioning correctly, the point-in-time recovery window is often shorter than the log retention period. This window varies based on the interval between full backups and the backup set retention period. Additionally, if issues such as backup delays or failures occur, the recovery window is more difficult to guarantee.

The point-in-time protection feature organizes backup sets based on recovery requirements. It ensures that a valid full backup and a continuous log backup chain are retained to cover the user-specified recovery window. This guarantees that you can recover data to any point in time within that window.

image

Differences between point-in-time protection and log backup

Point-in-time protection uses the same log generation and backup mechanism as the original log backup feature. The main difference lies in the improved backup set expiration and retention policies. For example, consider a scenario where three full backups are performed weekly (on Monday, Wednesday, and Friday) and the Log Backup Retention Period is set to 7 days:

Item

Before upgrade (Log backups are retained for 7 days)

After upgrade (Point-in-time recovery is guaranteed for 7 days)

Maximum recoverable days

Up to 7 days

Note

Even in a best-case scenario, the recovery period is typically less than 7 days. A 7-day recovery period is only temporarily available after a backup set expires and before it is removed by a scheduled cleanup.

Guaranteed 7 days

Recoverable days under normal conditions

Typically 4 to 5 days

Note

The data recovery window depends on the interval between full backups. This window periodically shrinks to retention period - full backup interval.

Guaranteed 7 days

Number of recoverable days in extreme cases

Less than 3 days

Note

If consecutive full backups fail due to issues such as database deadlocks or if occasional data anomalies occur, the recovery window may be reduced to 3 days or less. In extreme cases, data rollback may become impossible.

Guaranteed 7 days

Recovery cost

The system retains backup data for 7 days, and you are charged for 7 days of backup set retention.

The system retains backup data for 7 to 9 days. You are charged for the storage of these backup sets.

Important

the system also retains the latest full backup that is older than seven days, plus all continuous log backups from that full backup to the seven-day mark. However, you are billed for only one full backup and a maximum of one additional week of log backups.

Prerequisites

Your ApsaraDB RDS for MySQL instance must meet the following requirements:

Note

You can view this information on the Basic Information page of the instance.

Notes

After you turn on the Point-in-time Recovery switch, all existing unexpired backup sets and all new backup sets are retained based on the specified Log Backup Retention Period.

Limits

  • The point-in-time protection settings are available only on the regular backup policy page. The advanced backup policy page for sparse backups does not support this feature. You can continue to use the original log backup feature. For more information, see Differences between backup policy pages.

  • For a Serverless instance, you cannot restore data to a point in time during the period from shutdown to startup or from startup until the first full backup is completed.

Billing

The backup billing logic remains unchanged. However, to provide the guaranteed point-in-time recovery capability, the instance retains some backup sets beyond the Log Backup Retention Period that you set. These backup sets are included in the Total Backup Size. If the total backup size does not exceed the free quota, backups are not charged. The portion that exceeds the free quota is billed based on actual usage. For more information about billing, see Backup guide.

Procedure

Note
  • For instances created on or after January 11, 2024, you can follow the steps in this topic to set a point-in-time protection policy. After you turn on the Point-in-time Recovery switch, new backup sets and existing unexpired backup sets are retained to meet the conditions of your specified log backup retention period.

  • For existing instances created before January 11, 2024, you can upgrade the original log backup feature to the point-in-time protection feature in the dialog box that appears on the Backup Policy page. This upgrade cannot be rolled back. For more information about how to upgrade, see Upgrade to point-in-time protection.

  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. In the navigation pane on the left, click Backup and Restoration.

  3. On the Backup and Restoration page, click the Backup Strategy tab. In the Basic Backup section, click Edit.

  4. Set the following parameters and click OK.

    Important

    If you cannot find the Point-in-time Recovery switch on this page, join the Data Disaster Recovery Customer Service group (DingTalk group ID: 35585947) for assistance or to request access.

    Parameters

    Note

    Log Backup

    Enables point-in-time restore. This feature is enabled by default.

    Point-in-time Restore

    Enables point-in-time recovery (PITR) for your data.

    Log Backup Retention(Days)

    Set the log backup retention period.

    • The valid range is 7 to 730 days. The default value is 7 days.

    • The value must be less than or equal to the full backup retention period.

    Note

    For the 5.7 Basic series, the retention period is fixed at 7 days.

Turn off point-in-time recovery

On the Backup Policy tab, click Edit in the Basic Backup section. In the dialog box that appears, turn off the Point-in-time Recovery switch.

Important

Disabling the Point-in-time Recovery feature also disables the log backup capability, which makes point-in-time recovery unavailable. Proceed with caution.

image

Related operations

  • You can use data backups and log backups to restore data to an existing instance, a new instance, or a local database. For more information, see Data restoration solutions.

  • You can download existing data or log backups to a local machine for data archiving. You can also download backups and upload them to OSS. For more information, see Download backups.