Custom backup retention

Hi everybody,

I put this custom backup retention : 1M:1D,4W:1W,36M:2M, hopping that I would have 1 backup for the last 30 days, then 1 backup for each of the last 4 weeks and then 1 backup every 2 months in the 3 past years.

It doesn’t work. Does anyone has an idea why ?

kind regards

Hi, at first glance, that should work as expected.
Can you specify where it is not working as intended?

I think you have a conflict here. 1 backup each day for the past 30 days, but 1 backup each week for the past 4 weeks? 4 weeks is 28 days, so the timeframe is less than the previously specified range. Duplicati may be ignoring this due to it being invalid.

I believe you are supposed to only increase the timeframe for each of the specifications.
Maybe you mean something like this?

Keep daily backups for the past 30 days.
Beyond that, keep weekly backups for the past 4 months (?).
Beyond that, keep every other monthly backup for the past 3 years.

If so you would use: “1M:1D,4M:1W,3Y:2M”

1 Like

I haven’t tested but I think the code will sort timeframes regardless of how you enter them in the specification, however I’d agree that the timeframes are unusual from a logical point of view, one 28 days and one 1 month. Perhaps we can get some clarification on the intention for those two, and what the actual testing results were.

Logging can also show what the retention code is doing. Information level gets some, and Profiling gets more.

About --> Show log --> Live
–log-file with –log-file-log-level


Thanks for answering. I thought I would have daily backup during the last month and then weekly backups the month before. In fact I realise that the periods are not following each other. I guess I should use 1M:1D,2M:1W,36M:2M. I try this. Thanks again

1 Like