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
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.
In the navigation pane on the left, click Backup and Restoration.
On the Backup and Restoration page, click the Backup Strategy tab.
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.
NoteThe 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.
ImportantTo 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.
NoteIf your RDS instance runs MySQL 5.7 on RDS Basic Edition, the value is fixed as 7.
ImportantAfter 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
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.
In the navigation pane on the left, click Backup and Restoration.
On the Backup and Restoration page, click the
.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
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.
On the instance's Basic Information page, you can view the log backup size in the Instance Resources section.
NoteLog 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 |
|
Disable/Reduce backups |
|
References
To modify the data backup and log backup policies for an RDS MySQL instance, see Set automatic backup policy.
For more information about the differences between local logs and log backups, and the generation rules for local logs, see Manage local logs (Binlog).
Related operations
To view the current backup settings for an instance using an API, see DescribeBackupPolicy - View instance backup settings.
To modify the data backup or log backup policy for an instance using the API, see ModifyBackupPolicy - Modify the backup policy for an instance.