I don't understand retention policies

I find the retention policies in Kopia to be a bit confusing and lacking adequate documentation.

Let’s take Time Machine as an example:
Time Machine saves hourly backups for the past 24 hours, daily backups for the past month, and weekly backups for everything older than a month until the volume runs out of space. At that point, Time Machine deletes the oldest weekly backup.

How would you achieve the same using Kopia?

Well, kopia works the same way, with the exception that kopia doesn’t automatically removes snapshots, when the volume becomes full. It’s up to the user to set gauge that and maybe adjust the retention settings or to provide the storage needed.

Excluding that, exactly how would you achieve what I described in the settings?

The last items combined with the separate times confuses me.

If I set it to save 24 hourly snapshots, but it is set to only the latest 10, I get only 10 snapshots?

Which setting takes priority?

Look at this thread:

I’m still not clear on how you decide what to set ‘latest’ to

In his example, he sets it to backup every 30 mins, so he sets both latest and hourly to 24.

If he only set backups for every hour, would he just set latest to zero?

No.

All policies are applied to your backup set and only backups not caught by any are removed. so e.g. for 4 hourly and 2 last backups:

12:00 - last-1, hourly-1
12:30 - last-2
13:00 - hourly - 2
13:20
14:00 - hourly-3
14:30
15:00 - hourly-4
15:30
16:00

I got that, but I still don’t understand the purpose of latest or how to decide what to set it to.

Let’s say I want:
24 hourly backups (= 1 day)
7 daily backups (= 1 week)
4 weekly backups (= 1 month)
12 monthly backups (= 1 year)
And 10 yearly backups (=1 decade)

I set the frequency/schedule to every hour.
Then what, do I set latest to zero? One?
What happens if I unplug my laptop for a day?

I think it’s pretty clear that the entire retention policy aspect needs a redeisgn or at least better documentation WITH examples.

set latest to 0 then. The same with any other policy. If you do not want keep monthly set it to 0 too etc.

Here’s the thing though. If you have your computer connected on Monday and make 24 backups, then unplug it on Tuesday and make zero, when you plug it back in on Wednesday it’s going to immediately delete those 24 backups right?

So it doesn’t save the last x hourly backups, it saves the last x hourly backups for 24 hours, if that makes any sense.

So if you wanted to avoid that behavior you’d want lastly to be ≥ the largest number you have set in hours/days/weeks/years, right? In my example, 24, since 24 is the largest number.

No.

As it some of them will be marked as daily, weekly, monthly etc.

So it would save only 1 (because it gets marked as daily etc), and delete the other 23, if I’m understanding correctly.

I think most people want/expect the last x backups for each category which is not how Kopia currently behaves.

If they want that then latest needs to be ≥ the largest number in the other settings as I said above, correct?

Latest is the latest. It is just yet another category. I think the best way is to try. Set all much higher than you need. Later you can change and see in UI what will be kept and what deleted