Currently, when you set a cleanup policy, you can configure only the recovery_window parameter, which is used to determine whether backup data is expired.
recovery_window parameter
This parameter specifies the time window within which backup data can be restored and serves as the basis for determining whether backup data is expired. The value of recovery_window must have a time unit.
recovery_window determines whether backup data is expired as follows: all backup data earlier than the latest backup that meets the condition Current time - Backup point in time >= recovery_window is considered expired.
For example, recovery_window='7d' indicates that data backed up within the last 7 days can be restored, and backup data unrelated to the restoration of this 7-day period is considered expired.
The following example shows which backup data is considered expired after recovery_window is set. Assume that the current backup data is as shown in the following figure.

In an automatic cleanup scenario, the system cleans up expired data based on full backup sets. In the preceding example:
First batch of backup data: full backup
backup_set 1on January 1.Second batch of backup data: full backup
backup_set 3on January 7.Third batch of backup data: full backup
backup_set 5on January 14.
Assume that the current time is January 15, and the earliest restore point is January 8. Then, backup data from January 8 to January 15 can be restored. Data restore is based on full backups. The restore of data generated from January 8 to January 14 before the full backup on January 14 depends on the first full backup before the restore point, backup_set 3. Therefore, the system retains backup_set 3. Backup data generated before January 7 is considered expired. That is, backup_set 1 is an expired backup. When automatic cleanup is enabled, expired backup data is cleaned up.