Update periodic backup storage redundancy for Azure Cosmos DB

APPLIES TO: NoSQL MongoDB Cassandra Gremlin Table

By default, Azure Cosmos DB stores periodic mode backup data in geo-redundant blob storage that is replicated to a paired region. You can override the default backup storage redundancy. This article explains how to update the backup storage redundancy using Azure CLI and PowerShell. It also shows how to configure an Azure policy on your accounts to enforce the required storage redundancy.

Prerequisites

Update storage redundancy

Use the following steps to update backup storage redundancy.

  1. Sign in to the Azure portal and navigate to your Azure Cosmos DB account.

  2. Open the Backup & Restore pane, update the backup storage redundancy and select Submit. It takes few minutes for the operation to complete.

    Screenshot of the update backup storage redundancy page from the Azure portal.

Add an Azure Policy for backup storage redundancy

Azure Policy helps you to enforce organizational standards and to assess compliance at-scale. For more information, see what is Azure Policy?.

The following sample shows how to add an Azure policy for Azure Cosmos DB accounts to validate (using audit) that they have their backup redundancy configured to Local.

"parameters": {},
"policyRule": {
  "if": {
    "allOf": [
      {
        "field": "Microsoft.DocumentDB/databaseAccounts/backupPolicy.periodicModeProperties.backupStorageRedundancy",
        "match": "Local"
      }
    ]
  },
  "then": {
    "effect": "audit"
  }
}

Next steps