Backup Retention not working correctly

Retention refers to retaining certain backup versions (and deleting others), not creating versions, which is Schedule or manual. Is there anything on the list that violates the minimum age-based interval of 1 minute going back 180m, or any of the others? I can see how it looks like 3h - 24h range is thinned to 1h spacing.

New retention policy deletes old backups in a smart way is the announcement, which might be a bit dated.

Command line help:

  --retention-policy (String): Reduce number of versions by deleting old
    intermediate backups
    Use this option to reduce the number of versions that are kept with
    increasing version age by deleting most of the old backups. The expected
    format is a comma separated list of colon separated time frame and
    interval pairs. For example the value "7D:0s,3M:1D,10Y:2M" means "For 7
    day keep all backups, for 3 months keep one backup every day, for 10
    years one backup every 2nd month and delete every backup older than
    this.". This option also supports using the specifier "U" to indicate an
    unlimited time interval.

GUI help:

image

GUI smart and custom backup retention aren’t covered #83 is a request to revise the user manual section.

EDIT:

You can see the retention policy being applied at end of backup in an Information-level log-file. For example:

2021-10-06 09:45:56 -04 - [Information-Duplicati.Library.Main.Operation.DeleteHandler:RetentionPolicy-StartCheck]: Start checking if backups can be removed
2021-10-06 09:45:56 -04 - [Information-Duplicati.Library.Main.Operation.DeleteHandler:RetentionPolicy-FramesAndIntervals]: Time frames and intervals pairs: 1.00:00:00 / Keep all, 7.00:00:00 / 1.00:00:00, 28.00:00:00 / 7.00:00:00, 365.00:00:00 / 31.00:00:00
2021-10-06 09:45:56 -04 - [Information-Duplicati.Library.Main.Operation.DeleteHandler:RetentionPolicy-BackupList]: Backups to consider: 10/6/2021 8:40:04 AM, 10/6/2021 7:40:16 AM, 10/6/2021 6:57:12 AM, 10/5/2021 9:40:00 PM, 10/5/2021 8:40:04 PM, 10/5/2021 7:40:27 PM, 10/5/2021 6:40:07 PM, 10/5/2021 5:40:06 PM, 10/5/2021 4:40:14 PM, 10/5/2021 3:40:03 PM, 10/5/2021 2:40:05 PM, 10/5/2021 1:40:09 PM, 10/5/2021 12:40:20 PM, 10/5/2021 11:40:02 AM, 10/5/2021 10:40:00 AM, 10/5/2021 9:40:13 AM, 10/4/2021 10:40:03 AM, 10/3/2021 10:40:00 AM, 10/2/2021 10:40:00 AM, 10/1/2021 9:40:02 AM, 9/30/2021 9:40:02 AM, 9/29/2021 9:40:00 AM, 9/27/2021 8:40:00 AM, 9/26/2021 9:22:14 PM, 9/19/2021 8:40:00 PM, 9/12/2021 5:40:02 PM, 9/8/2021 9:41:05 AM, 8/7/2021 8:40:00 AM, 8/5/2021 1:40:04 PM, 7/4/2021 6:33:36 PM, 7/1/2021 9:40:03 AM, 6/24/2021 7:40:55 PM, 6/20/2021 9:33:01 AM, 6/20/2021 8:02:19 AM, 6/20/2021 6:58:27 AM, 5/25/2021 11:40:02 AM, 5/22/2021 1:58:23 PM, 5/22/2021 1:16:35 PM, 4/19/2021 12:40:01 PM, 4/2/2021 9:40:02 PM, 3/14/2021 2:40:01 PM, 2/6/2021 10:40:04 AM, 1/1/2021 10:40:04 AM, 11/26/2020 7:44:53 AM, 10/17/2020 8:40:00 PM, 10/14/2020 6:40:02 AM
2021-10-06 09:45:56 -04 - [Information-Duplicati.Library.Main.Operation.DeleteHandler:RetentionPolicy-BackupsToDelete]: Backups outside of all time frames and thus getting deleted:
2021-10-06 09:45:56 -04 - [Information-Duplicati.Library.Main.Operation.DeleteHandler:RetentionPolicy-AllBackupsToDelete]: All backups to delete: 10/5/2021 9:40:13 AM, 9/29/2021 9:40:00 AM
2021-10-06 09:45:56 -04 - [Information-Duplicati.Library.Main.Operation.DeleteHandler-DeleteRemoteFileset]: Deleting 2 remote fileset(s) …

For a quicker peek (in reverse-chronological order), you can see About → Show log → Live → Information.

1 Like