This topic describes the policies that are used to manage the snapshots that are generated by the high-frequency snapshot backup feature.
Description
Snapshots are retained based on the backup frequency that you specify. For more information, see Use the high-frequency snapshot backup feature for an ApsaraDB RDS for MySQL instance.
Snapshot backup frequency | Snapshot retention policy |
Minutes | If you set the snapshot backup frequency to a value at the minute granularity, all snapshots that are completed within 1 hour are retained. For snapshots that are generated 1 hour ago, ApsaraDB RDS deletes the snapshots except for the first snapshot after the hour. For snapshots that are generated 24 hours ago, ApsaraDB RDS deletes the snapshots except for the first snapshot after 00:00 every day. For example, if you set the snapshot backup frequency to 15 minutes, four snapshots are generated within 1 hour and all snapshots are retained. For snapshots that are generated within the range of 1 to 24 hours, the first snapshot that is completed in each hour is retained, and a total of 23 snapshots are retained within the range. For snapshots that are generated within the range of 24 hours to 7 days, the first snapshot that is completed on each day is retained, and a total of 6 snapshots are retained within the range. In this example, if you set the snapshot backup frequency to 15 minutes, a total of 33 snapshots are retained within a week. |
Hours | If you set the snapshot backup frequency to a value at the hour granularity, all snapshots that are completed within 24 hours are retained. For snapshots that are retained for more than 24 hours, ApsaraDB RDS keeps only the first snapshot after 00:00 every day. For example, if you set the snapshot backup frequency to 6 hours, four snapshots are generated within 24 hours and all snapshots are retained. For snapshots that are generated within the range of 24 hours to 7 days, the first snapshot that is completed on each day is retained, and a total of 6 snapshots are retained within the range. In this example, if you set the snapshot backup frequency to 6 hours, a total of 10 snapshots are retained within a week. |
Advantages
Low RTO
The high-frequency snapshot backup feature generates a large number of snapshots. This reduces the amount of logs that are required to restore data and significantly reduces the recovery time objective (RTO).
Cost-effectiveness
You can flexibly configure rules to retain snapshots. This reduces the number of snapshots that must be retained for a long period of time and significantly reduces costs.
Technical metric
The number of snapshots that are created within the same period of time vary based on the backup frequency that you specify. As a result, the RTO for data restoration correspondingly varies. The following figure shows the trends in the total number of snapshots and the RTO over time when the backup frequency remains unchanged.
If snapshots are densely created for your RDS instance in a short period of time, you can use a small number of logs to restore the data from the closest point in time at which snapshots are created. This significantly reduces the RTO.
The increase in the number of generated snapshots gradually slows down, and the number of backups that need to be stored for a long period of time decreases, which can significantly reduce costs.