After you enable the log backup feature for your RDS instance, the binary log files of your RDS instance are uploaded to backup storage in real time. The binary log files in the backup storage are called log backup files. You can use log backup files to restore the data of your RDS instance to a specific point in time within the backup retention period that you specified. This topic describes how to manage and view the log backup files of an ApsaraDB RDS for MySQL instance.
Billing rules
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 on backup storage is provided. If the total size of data backup files and log backup files exceeds the free quota, you are charged additional fees for the excess backup storage that you use. For more information, see Backup storage fees.
Enable or disable the log backup feature
- 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 left-side navigation pane, click Backup and Restoration.
On the Backup and Restoration page that appears, click the Backup Strategy tab.
In the Basic Backup section, click Edit to enable or disable the log backup feature.
Log Backup Settings (Log Backup regular Edition)
Parameter
Description
Log Backup
Specifies whether to enable the log backup feature. After the feature is enabled, you can restore the data of your RDS instance to a point in time. This feature is enabled by default.
Log Backup Retention Period (Days)
The valid value ranges from 7 to 730. Default value: 7.
The log backup retention period must be less than or equal to the data backup retention period.
NoteIf your RDS instance runs MySQL 5.7 on RDS Basic Edition, the value is fixed as 7.
Configure the PITR feature (enhancement of the log backup feature)
The PITR feature is supported for RDS instances that reside in specific regions. For more information about the differences between the PITR and log backup features, the description of the PITR feature, and the RDS instances for which the PITR feature can be enabled, see Configure the PITR feature.
ImportantTo implement PITR, the system retains additional backup sets based on the value of the Time Range of Specific Points in Time for Restoration parameter.
For example, if you set the Time Range of Specific Points in Time for Restoration parameter to 7, the system retains the backup sets for 7 to 9 days. The system retains an additional full backup for more than seven days and all consecutive log backups generated from the seventh day to the day in which the last full backup is generated. You are charged for the storage of one full backup and additional log backups that are generated within one week at most.
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 the log backup feature, the system automatically deletes existing log backup files within 1 to 3 minutes. Deleted log backup files cannot be restored. Proceed with caution.
View log backup files
- 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 left-side navigation pane, click Backup and Restoration.
On the page that appears, click
and then Log Backup.Backup and RestorationIf your RDS instance runs RDS High-availability Edition or RDS Enterprise Edition, log backup files are generated by your primary RDS instance and its secondary RDS instances. You can check the instance ID of each log backup file to identify the log backup files that are generated by your primary RDS instance and the log backup files that are generated by the secondary RDS instances.
View the total size of log backup files
- 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 Basic Information page of the RDS instance, view the total size of log backup files in the Usage Statistics section.
NoteLog backup files are stored in the backup storage and do not consume the storage capacity of your RDS instance. The backup storage is inaccessible.
After you update the minor engine version of your RDS instance, the value of the Backup Usage parameter on the Basic Information page of the RDS instance may be displayed as 0. After the next scheduled backup is complete, this error is automatically fixed.
Delete log backup files
For more information, see Delete backup files or reduce the size of backup files.
Download log backup files
For more information, see Download backup files.
Restore data to a specific point in time
For more information, see Restore full data and Restore individual databases and tables of an ApsaraDB RDS for MySQL instance.
FAQ
Category | Description |
Data restoration | Can I use log backup files to restore data? After the log backup feature is enabled, you can restore data to a specific point in time within the backup retention period that you specified. The point in time can be accurate to seconds. For more information, see Restore full data and Restore individual databases and tables of an ApsaraDB RDS for MySQL instance. |
Backup fee | Am I charged for the log backup feature? 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 on backup storage is provided. If the total size of data backup files and log backup files exceeds the free quota, you are charged additional fees for the excess backup storage that you use. For more information, see Backup storage fees. |
Backup file check |
|
Disabling of the feature and reduction of log backups |
|
Related operations
You can call the DescribeBackupPolicy operation to view the backup settings of an instance. For more information, see DescribeBackupPolicy.
You can call the ModifyBackupPolicy operation to modify the backup settings of an instance. For more information, see ModifyBackupPolicy.