This topic describes how to retain the backup files of an ApsaraDB RDS for MySQL instance for a long period of time. The long-term retention of backup files helps you protect your data assets.
Background information
When you use ApsaraDB RDS, you may encounter the following issues:- Your data is unexpectedly deleted. However, you have backed up only the data that was generated over the most recent seven days. As a result, you cannot restore the data that was generated seven days ago.
- Your RDS instance is released by mistake or due to overdue payments. However, it has been a long period of time since your RDS instance was released. As a result, you cannot recover your data or backup files.
- You want to release your RDS instance but retain its backup files for future use.
Increase the backup retention period
You can increase the backup retention period. This allows you to restore earlier data.- Log on to the ApsaraDB RDS console and go to the Backup and Restoration page of your RDS instance. On the Backup Settings tab, click Edit.
- Increase the data backup retention period.
- Specify the number of days for which you want to retain data backup files. For example, you can increase the number from the default value 7 to 30.
- If your RDS instance is equipped with local SSDs, you can select Long-term Retention. After you select Long-term Retention, you do not need to specify the data backup retention period. All data backup files are retained until your RDS instance is released.
- Increase the log backup retention period.
Retain data backup files after instance release
In most cases, after your RDS instance expires or becomes overdue, ApsaraDB RDS retains your RDS instance and its backup files based on the retention period that you specify. After the retention period elapses, ApsaraDB RDS releases your RDS instance and deletes its backup files. For more information, see Unlock or rebuild an expired or overdue ApsaraDB RDS instance.If you set the Data Backup Retention Policy After Release parameter to Latest or All, ApsaraDB RDS retains your RDS instance and its most recent or all data backup files regardless of whether your RDS instance is automatically or manually released.
- Log on to the ApsaraDB RDS console and go to the Backup and Restoration page of your RDS instance. On the Backup Settings tab, click Edit.
- Select Data Backup Retention Policy After Release.
Note
- This policy is used to permanently retain data backup files. You are not charged for the storage of the retained data backup files.
- This policy is supported for both pay-as-you-go RDS instances and subscription RDS instances.
- After your RDS instance is released, you can go to the Backup for Deleted Instances page to download the data backup files of your RDS instance. Then, you can use the data backup files to restore your RDS instance.
Download a backup file
You can download a backup file of your RDS instance to your computer or to your Elastic Compute Service (ECS) instance. The backup file can be stored on your computer or ECS instance for a long period of time. For more information, see What is ECS? and Procedure.