> ## Documentation Index
> Fetch the complete documentation index at: https://help.nops.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Reduce Cosmos DB Periodic Backup Copies to the Free Two

> Cut Cosmos DB periodic backup retention back to the two backup copies Azure keeps for free.

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.

| | |
| - | - |
| **Cloud** | Microsoft Azure |
| **Category** | Database |
| **Service** | Azure Cosmos DB |
| **Action** | Modify |
| **Effort** | Low |
| **Restart needed** | No |
| **Can be rolled back** | Yes |
| **Analysis window** | Last 7 days |
| **Source** | nOps |

## 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

> [accordion] Why is the saving an upper bound?
>
> 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.

## Related

* [Remove Unneeded Regions from Cosmos DB Accounts](https://help.nops.io/inform/supported-recommendations/remove-unneeded-regions-from-cosmos-db-accounts)
* [Enable Autoscale on Azure Cosmos DB Container](https://help.nops.io/inform/supported-recommendations/enable-autoscale-on-azure-cosmos-db-container)
* [Supported recommendations](https://help.nops.io/inform/supported-recommendations.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.