At present, when you set a cleanup strategy, you can specify only the recovery_window parameter, which is used to determine whether backup data is expired.
recovery_window parameter
This parameter specifies the time window for restoring backup data and determines whether backup data has expired. The value of recovery_window must have a time unit. For example, if you set recovery_window to 7d, the data within the last 7 days must be restorable and the data backed up earlier is considered expired.
All data backed up earlier than the latest backup data that meets the following condition is considered expired: Current time - Backup point in time >= Value of recovery_window.
For example, the setting recovery_window='7d' indicates that the data backed up within the last 7 days must be restorable, and the backup data beyond this restore window is considered expired.
The following example shows how to determine whether backup data has expired after you specify recovery_window, as shown in the following figure.

When automatic data cleanup is enabled, the system cleans up expired data on the basis of one full backup and multiple incremental backups, as shown in the preceding figure.
First batch of backup data: full backup file
backup_set 1on January 1 + incremental backup filebackup_set 2on January 4Second batch of backup data: full backup file
backup_set 3on January 7 + incremental backup filebackup_set 4on January 11Third batch of backup data: full backup file
backup_set 5on January 14
Assume that the current time is January 15, and the earliest restore point is January 8. Then, the backup data from January 8 to January 15 can be restored. Data is restored based on full backup files. Data restore performed before the full backup of data generated from January 8 to January 14 depends on the first full backup file before the restore point: backup_set 3. Therefore, the system retains backup_set 3. Backup data generated before January 7 is considered expired. To be specific, the first batch of backup data backup_set 1 and backup_set 2 have expired. When automatic data cleanup is enabled, the expired backup data will be cleaned.