All Products
Search
Document Center

ApsaraDB RDS:Configure a point-in-time recovery policy

Last Updated:Jun 08, 2026

Enable point-in-time recovery (PITR) for your RDS MySQL instance by turning on the Point-in-time Recovery switch and setting the log backup retention period. The system retains backup sets based on full and log backup dependencies, guaranteeing recovery within the configured time range.

How it works

Conventional backups retain sets by cycle. Even with successful backups, the actual recovery window is often shorter than the log retention period and fluctuates with the full backup interval. Backup delays or failures shrink the window further.

PITR manages backup retention by recovery point objectives. It guarantees the configured recovery window by keeping a valid full backup before the window start and a continuous log backup chain covering the entire period.

image

PITR vs. legacy log backups

PITR and legacy log backups share the same log generation and backup mechanisms but differ in expiration and retention policies. The following example assumes full backups three times per week (Monday, Wednesday, Friday) with the Log Backup Retention Period (Days) is set to 7 days:

Item

Before upgrade

After upgrade

Recovery window (best case)

Up to 7 days

Note

The recovery window is typically less than 7 days. A 7-day window occurs only briefly after a backup set expires but before the cleanup scheduler deletes it.

Fixed at 7 days

Recovery window (typical case)

Typically 4 to 5 days

Note

The typical recovery window depends on the interval between full backups. The window periodically shrinks to Retention Period - Full Backup Interval.

Fixed at 7 days

Recovery window (worst case)

Less than 3 days

Note

If consecutive full backups fail (database deadlocks, data anomalies), the recovery window may shrink to 3 days or less. In extreme cases, restoration becomes impossible.

Fixed at 7 days

Backup cost

Backup data is retained for 7 days, incurring storage costs.

Backup data is retained for 7 to 9 days, incurring storage costs.

Important

the system retains the latest full backup from more than 7 days ago and the continuous chain of log backups from that full backup to the 7-day mark. However, you are billed for only one extra full backup and up to one additional week of log backups.

Prerequisites

Your RDS MySQL instance must meet these requirements:

Note

Check the Basic Information page of your instance.

Usage notes

After you enable PITR, all unexpired and new backup sets are retained based on the Log Backup Retention Period (Days) you configure.

Limitations

  • The advanced backup policy (sparse backup) page does not support these settings and only offers the legacy log backup feature. Differences between backup policy pages.

  • For serverless instances, PITR is unavailable between an instance stop and restart, or between a restart and the first full backup completion.

Billing

Backup billing is unchanged. To guarantee PITR, the instance retains extra backup sets beyond the specified Log Backup Retention Period (Days). These count toward your total Backup size. Backups within the free quota incur no charges; excess usage is billed. Backup fees.

Procedure

Note
  • For instances created on or after January 11, 2024, follow these steps to configure the PITR policy. After you enable PITR, both new and existing unexpired backup sets are retained to meet the specified log backup retention period.

  • For instances created before January 11, 2024, upgrade from the legacy log backup feature to enhanced PITR on the Backup Strategy page. This upgrade is irreversible. Upgrade to point-in-time recovery.

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

  3. On the Backup and Restoration page, click the Backup Strategy tab, and then click Edit in the Basic Backup Settings section.

  4. Configure the following parameters and click OK.

    Parameter

    Description

    Log Backup

    Backs up transaction logs for PITR. Enabled by default.

    Point-in-time recovery

    Enables recovery to a specific point in time.

    Log Backup Retention Period (Days)

    Sets the log backup retention period.

    • Range: 7 to 730 days. Default: 7 days.

    • Must not exceed the full backup retention period.

    Note

    For RDS Basic Edition instances running MySQL 5.7, this value is fixed at 7 days.

    Important

    To ensure PITR, extra backup sets are retained beyond the specified log backup retention period.

    Example: With the Log Backup Retention Period (Days) set to 7 days, the system retains backup data for 7 to 9 days — the latest full backup from before the 7-day mark plus continuous log backups to cover the gap. You are billed for only one extra full backup and up to one additional week of log backups.

Disable point-in-time recovery

On the Backup Strategy tab, click Edit in the Basic Backup Settings section, then disable the Point-in-time Recovery switch.

Important

Disabling point-in-time recovery also disables log backups, making PITR impossible. Proceed with caution.

Related operations