An Azure backup service that provides built-in management at scale.
Hello Benedikt Pittl,
Thank you for reaching out to the Microsoft Q&A forum.
When investigated its isn’t a bug in the service – it’s your policy doing exactly what you told it to do. Here’s a quick breakdown of how your JSON is evaluated:
- You only ever run backups once a week (your schedule’s “P1W” interval), so backups only ever land on Sundays.
- On every execution the engine walks through your three taggingCriteria in priority order:
- “monthly” (priority 15) if it’s the 4th Sunday
- “weekly” (priority 20) if it’s any Sunday
- “Default” (priority 99) if nothing else matches
- Whichever tag you land on then selects the matching retention rule:
- monthly → 2 years
- weekly → 1 year
- Default → 1 year
Because yesterday was in fact the 4th Sunday of the month, the “monthly” tag (and its 2 year retention) was applied. If you check a calendar you’ll see that is exactly the behavior you configured.
If you’d rather:
• Only ever get 1 year on Sundays except the 4th → no change needed, this is what just happened • Change which Sunday of the month gets the 2-year retention → edit the “weeksOfTheMonth” in your monthly criteria to First/Second/Last, etc. • Run backups on other days so your “Default” 1-year apply more often → add daily/other intervals to your schedule
Reference docs:
• Backup policy JSON schema (schedules + taggingCriteria):
https://docs.microsoft.com/azure/backup/blob-backup-overview#configure-a-backup-policy
• How schedule-based retention rules and priorities work:
Let me know if you actually saw a 2 year retention on a non-4th Sunday or if you need help tweaking the schedule/criteria.