The Rentention Policy algorithm is fairly simple:
- Always keeps the most current backup
- Sort each backup into the corresponding timeframe
- For each timeframe do
- Always keep the oldest backup in the time frame
- For each backup in the timeframe do
- If the time difference to the last kept backup in the timeframe is smaller than the specified intervall, delete it.
So if you have a rule 1W:1D
and run backups hourly, it will keep the backup that was just created and then delete the following (second) backup from the hour before, if it is less then 86400 seconds (=1 day) away from the third backup.
Yes, every timeframe is rolling, for the reason you mentioned (different countries define “week” differently) and since the user can theoretically specify unusual timeframes like 4D
.
As to why Caldorians backups were delete:
May 2nd: According to the logs, there were no changed or deleted files as JonMikeIV suspected, so there simply was no backup created
Apr 30th: This one is a bit mysterious tbh … If it got deleted by the retention policy, then it must have been less then 86400 seconds (1D
) away from the backup on the Apr 29th. @Caldorian Do you happen to have the logs for the Apr 29th backup as well?