After you enable log backup, binary logs are uploaded to backup storage in real time to create log backups, which let you restore data to any point in time within the backup retention period. This topic describes how to manage and view log backups for ApsaraDB RDS for MySQL.
Billing
Enabling log backup is free. However, log backups consume backup storage, and you are charged for the storage space that they use. Backup storage comes with a free quota. When the total size of data backups and log backups exceeds the free quota, you are charged backup fees.
Enable or disable log backup
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, click the Backup Strategy tab.
-
In the Basic Backup section, click Edit to enable or disable log backup.
Standard log backup
Parameter
Description
Log Backup
Enables point-in-time recovery. This feature is enabled by default.
Log Backup Retention Period (Days)
-
Valid values: 7 to 730 days. Default: 7 days.
-
The value must be less than or equal to the data backup retention period.
NoteFor ApsaraDB RDS for MySQL 5.7 instances on the Basic Edition, the value is fixed at 7 days.
Enhanced point-in-time recovery
This setting is available only for ApsaraDB RDS for MySQL instances in select regions. For information about the differences between PITR and log backup, how PITR works, and the instance requirements, see Configure a point-in-time recovery policy.
ImportantTo support PITR, the instance retains some backup sets beyond the configured Log Backup Retention Period (Days).
For example, if you set the Log Backup Retention Period (Days) to 7 days, the backup data is retained for 7 to 9 days. Specifically, the system retains the most recent full backup that is older than 7 days, and all subsequent log backups from that full backup through the end of the 7-day period. You are charged for only one full backup and up to one extra week of log backups.
Parameter
Description
Log Backup
Enables the backup of transaction logs, which is required for point-in-time recovery. This feature is enabled by default.
Point-in-time recovery
Enables data recovery to a specific point in time (PITR).
Log Backup Retention Period (Days)
Specifies the retention period for log backups.
-
Valid values: 7 to 730 days. Default value: 7 days.
-
The value must be less than or equal to the full backup retention period.
NoteFor RDS Basic Edition instances that run MySQL 5.7, the value is fixed at 7 days.
ImportantAfter you disable log backup, the system automatically deletes the existing log backup sets within 1 to 3 minutes. The 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 left-side navigation pane, click Backup and Restoration.
-
On the Backup and Restoration page, click .
For High-availability Edition instances, both the primary and secondary nodes generate log backups. In the backup list, they are distinguished by File Location Instance ID.
View log backup size
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 instance, you can view the log backup size in the Instance Resources section.
Note-
Log backups are stored in backup storage and do not consume the storage space of your instance. Backup storage is not publicly accessible.
-
After a minor version upgrade for an ApsaraDB RDS for MySQL instance of the Basic Edition, the Basic Information on the Backup Usage page may display as 0. The value is automatically restored after the next scheduled backup is complete.
-
Delete log backups
Download log backups
See Download backups.
Point-in-time recovery
Enabling log backup allows you to restore data to a specific point in time. For instructions, see Restore full data or Restore databases and tables.
FAQ
|
Category |
Details |
|
Restore data |
Q: Can log backups be used to restore data? A: Yes. After you enable log backup, you can restore data to any point in time (to the second) within the backup retention period. For more information, see Restore full data or Restore databases and tables. |
|
Backup costs |
Q: Are log backups free? A: Enabling log backup is free. However, log backups consume backup storage, and you are charged for the storage space that they use. Backup storage comes with a free quota. When the total size of data backups and log backups exceeds the free quota, you are charged backup fees. |
|
View backups |
|
|
Disable or reduce backups |
|
Related documents
-
To modify the data and log backup policies for an ApsaraDB RDS for MySQL instance, see Configure an automatic backup policy.
-
To understand the differences between binary logs and log backups and the generation rules for binary logs, see Manage binary log files.
API reference
-
DescribeBackupPolicy — View the backup settings of an instance.
-
ModifyBackupPolicy — Modify the data or log backup policy of an instance.