Skip to main content
With periodic backup, Azure Cosmos DB keeps two backup copies of each account free of charge. Longer retention, or a shorter interval for the same retention, keeps more copies, and each extra copy is billed as backup storage. nOps finds accounts on periodic backup that pay for backup storage and shows that charge as the most you can save.

Why it matters

Backup retention is often raised once and never revisited, and on large accounts the extra copies can cost as much as the data.

How nOps finds it

nOps reads the last 14 days of Cosmos DB billing. An account is flagged when it paid for backup storage on at least 7 of those days, was billed recently, and had no continuous-backup charges (so it uses periodic backup). The saving is the backup storage cost from the last 7 days, scaled to a month. This is an upper bound: billing does not show your interval or retention. Services mostly paid with credits and savings under $5 a month are left out.

Before you start

Know the backup retention your owners or compliance rules require.

How to implement

  1. Check the retention you actually need with the account owner.
  2. In the Azure portal, open the Cosmos DB account and go to Backup & Restore.
  3. Set the backup retention to twice the backup interval (for example, a 24-hour interval with 48 hours of retention), or lengthen the interval while keeping the retention you need. Consider locally or zone-redundant backup storage if geo-redundant copies are not required.
  4. Or use the Azure CLI: az cosmosdb update --resource-group RESOURCE_GROUP --name ACCOUNT --backup-interval 1440 --backup-retention 48.
  5. Update Terraform, Bicep or ARM templates (the backup block) so a later deployment does not change it back.

Risks and considerations

  • Shorter retention means you can restore from fewer points in time.
  • Continuous backup is billed differently and is not covered by this recommendation.
  • To roll back, raise the retention again; it applies to backups taken from then on.

FAQs

Billing shows the backup storage charge but not your interval or retention. Going back to two copies removes the whole charge; a smaller change saves part of it.