All Products
Search
Document Center

ApsaraDB RDS:RDS MySQL log backups

Last Updated:Sep 20, 2025

After you enable the log backup feature, local logs are uploaded to backup storage space in real time to create log backups. You can use log backups to restore data to any point in time within the retention period. This topic describes how to manage and view log backups for ApsaraDB RDS for MySQL.

Billing

This feature is free of charge. However, log backup files consume backup storage, and you are charged for the storage space that they use. A free quota is provided for backup storage. If the total size of data backups and log backups exceeds this quota, you are charged for the excess usage as described in the Backup Guide.

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

  3. On the Backup and Restoration page, click the Backup Strategy tab.

  4. In the Basic Backup section, you can click Edit to enable or disable log backups.

    Log backup settings (Standard)

    Parameter

    Description

    Log Backup

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

    Log Backup Retention Period

    • Valid values: 7 to 730 days. Default value: 7 days.

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

    Note

    The value is fixed at 7 days for RDS instances that run MySQL 5.7 on the Basic Edition.

    Point-in-time recovery settings (Enhanced)

    Currently, only RDS MySQL instances in some regions support this setting. For more information about the point-in-time recovery feature, its requirements, and how it differs from log backup, see Set a point-in-time recovery policy.

    Important

    To enable point-in-time recovery, the instance retains certain backup sets beyond the specified Log Backup Retention Period.

    For example, if you set the Log Backup Retention Period to 7 days, your backup data is retained for 7 to 9 days. Specifically, the system retains the most recent full backup that is older than seven days and all subsequent log backups. However, you are charged for only one full backup and up to one extra week of log backups.

    Parameter

    Description

    Restoration to Specific Point in Time

    Specifies whether to enable the PITR feature. After the feature is enabled, you can restore the data of your RDS instance to any point in time. The feature is an enhancement of the log backup feature. By default, Time Range of Specific Points in Time for Restoration is turned on for new RDS instances.

    Time Range of Specific Points in Time for Restoration

    The number of days during which you can restore data of your RDS instance to any point in time. If the value of this parameter is modified, the retention period of log backups is also modified.

    • Valid values: 7 to 730. Default value: 7.

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

    Note

    If your RDS instance runs MySQL 5.7 on RDS Basic Edition, the value is fixed as 7.

    Important

    After you disable log backups, the system automatically deletes all existing log backup sets within 1 to 3 minutes. Deleted log backup sets cannot be recovered. Proceed with caution.

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

  3. On the Backup and Restoration page, click the Base Backups > Log Backup.

    For High-availability Edition and Enterprise Edition instances, both the primary and secondary nodes have log backups. In the backup list, they are identified by File Location Instance ID.

View the size of log 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. On the instance's Basic Information page, you can view the log backup size in the Instance Resources section.

    image

    Note
    • Log backups are stored in the backup storage space and do not occupy the storage space of the instance. The backup storage space is not publicly accessible.

    • After a minor version update of an RDS for MySQL Basic Edition instance, the Backup Usage on the Basic Information page may show 0. The value is automatically restored after the next scheduled backup is complete.

Delete log backups

For more information, see Delete or reduce backups.

Download log backups

For more information, see Download backups.

Restore data to a point in time

If you enable log backup, you can restore data to a specific point in time. For more information about restoration methods, see Restore full data or Restore databases and tables.

FAQ about log backups

Category

Details

Restore data

Q: Can log backups be used to restore data?

A: After the log backup feature is enabled, you can restore data to any point in time within the backup retention period. The point in time can be accurate to the second. For more information, see Restore full data or Restore databases and tables.

Backup billing

Q: Are log backups free of charge?

No, you are not charged for the feature. However, log backup files consume backup storage, and you are charged for the backup storage that is consumed. A free quota is provided for backup storage. When the total size of data backups and log backups exceeds the free quota, you are charged for the excess storage. For more information, see Backup Guidelines.

View backups

  • Q: Why is the log backup page empty?

    A: The log backup page may be empty for two reasons:

    • The log backup feature is disabled. To enable it, see Enable or disable the log backup feature.

    • The instance was just created, or log backups were just enabled. The local logs have not yet been uploaded to the backup storage space.

  • Q: Why can't I see the latest logs on the log backup page?

    A: The log backup page displays only log files that have been completely written. Local log files that are currently being written have not yet been uploaded to the backup storage space.

  • Q: My log backup retention period is set to 7 days. Can I retrieve logs that are older than 7 days?

    A: No. Backups that are older than the specified retention period are automatically deleted. Set a reasonable retention period.

Disable/Reduce backups

  • Q: How do I delete log backups after disabling the feature?

    A: After you disable log backups, the system automatically deletes all existing log backup sets within 1 to 3 minutes. Deleted log backup sets cannot be recovered. Proceed with caution.

  • Q: Why did the size of my log backups suddenly increase?

    If you frequently add, modify, or delete data, the size of log backup files increases. To delete log backup files, see Delete or reduce backups.

  • Q: I don't need log backups. I only want to keep the local log files of the database. What should I do?

    A: You can disable log backup and then set the local log retention period as needed. To set the local log retention period, see Set Local Log Policy.

  • Q: After I disable log backups, why can I still find log files when I run the SHOW BINARY LOGS; command?

    The files that you query by executing this statement are binary log files rather than log backup files. If you want to delete the binary log files, see Delete binary log files.

  • Q: Why isn't storage space released after I disable log backups?

    A: Log backups do not consume the storage space of your instance, but local logs do.

References

Related operations