Inconsistent weekly retentions

I’m trying to make sense of the retention labels. Can someone explain why the backup of Jan. 4th has no weekly-3 label?

There is no better snapshots retention logic explanation than this post:

1 Like

The problem here is that the logic fails: there’s one week left completely without a weekly tag.

  • 12/27/2025 snapshot falls on week 52
  • 1/11/2026 snapshot falls on week 2
  • 1/13/2026 snapshot falls on week 3

So, where is the weekly tag for week 1? 1/4/2026 snapshot falls on that week, but didn’t get a weekly tag assigned. I noticed the same inconsistency with my own backups.

We do not know really what the logic is here:) In the linked thread somebody tried to reverse engineer it as kopia docs are missing such details unfortunately.

@8191 What time zone you are on? Are you using kopia server? If yes is it in the same timezone?

1 Like

@kapitainsky I’m in CET (UTC+1). I’m using kopia server and it’s in the same timezone.

When looking at the code I noticed that there are two concepts to how calculate week offsets: Monday starting weeks and Sunday starting weeks. Unfortunately I could not find out how either system is applied - based on timezone or based on locale settings?

@ingul-buz In the meanwhile I’ve filled up week 1 with even more snapshots - unfortunately without effect:

As you might have noticed, I’m currently in the process of migrating for another backup tool to kopia. I assume my problem simply vanishes in a few days once kopia created more than 3 weeks of backups. :smile:

Yes, the week starting on different days in different countries could have something to do with it. But it’s curious that this is the only time I have ever seen this happen. Week numbering at the turn of the year might also have something to do with it. Maybe it’s a combination of different things that clash somewhere just now. But logical it is not.

And yes, fortunately it’s a problem that will eventually vanish as time goes by, if you don’t happen to need that specific snaphot meanwhile. :sweat_smile:

I’ve been using kopia for some time now and never seen such situation. I assume that it is some edge case when used logic fails a bit.

I wonder whether it has anything to do with the fact that first full week of 2026 only starts on the 5th and ends on the 11th of January. Maybe kopia only counts full weeks within given year?

Unless somebody spends time and studies source code we can only speculate.