Skip to content

Commit 9b631d8

Browse files
committed
Merge branch 'master' of https://github.com/MicrosoftDocs/azure-docs-pr into nethubpage-patch
2 parents e8fba8a + ec1f5ec commit 9b631d8

21 files changed

+315
-125
lines changed

articles/azure-app-configuration/quickstart-javascript.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,4 +135,4 @@ In this quickstart, you created a new App Configuration store and learned how to
135135
For additional code samples, visit:
136136

137137
> [!div class="nextstepaction"]
138-
> [Azure App Configuration client library samples](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/appconfiguration/azure-appconfiguration/samples)
138+
> [Azure App Configuration client library samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appconfiguration/app-configuration/samples/v1/javascript)

articles/cosmos-db/TOC.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1506,7 +1506,11 @@
15061506
- name: Migrate to continuous backup
15071507
href: migrate-continuous-backup.md
15081508
- name: Manage periodic backup
1509-
href: configure-periodic-backup-restore.md
1509+
items:
1510+
- name: Configure periodic backup
1511+
href: configure-periodic-backup-restore.md
1512+
- name: Update backup storage redundancy
1513+
href: update-backup-storage-redundancy.md
15101514
- name: Security
15111515
items:
15121516
- name: Configure IP firewall

articles/cosmos-db/configure-periodic-backup-restore.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: This article describes how to configure Azure Cosmos DB accounts wi
44
author: kanshiG
55
ms.service: cosmos-db
66
ms.topic: how-to
7-
ms.date: 08/30/2021
7+
ms.date: 11/16/2021
88
ms.author: govindk
99
ms.reviewer: sngun
1010

@@ -32,17 +32,17 @@ Azure Cosmos DB automatically takes backups of your data at regular intervals. T
3232
3333
## <a id="backup-storage-redundancy"></a>Backup storage redundancy
3434

35-
By default, Azure Cosmos DB stores periodic mode backup data in geo-redundant [blob storage](../storage/common/storage-redundancy.md) that is replicated to a [paired region](../best-practices-availability-paired-regions.md).
35+
By default, Azure Cosmos DB stores periodic mode backup data in geo-redundant [blob storage](../storage/common/storage-redundancy.md) that is replicated to a [paired region](../best-practices-availability-paired-regions.md). You can update this default value using Azure PowerShell or CLI and define an Azure policy to enforce a specific storage redundancy option. To learn more, see [update backup storage redundancy](update-backup-storage-redundancy.md) article.
3636

3737
To ensure that your backup data stays within the same region where your Azure Cosmos DB account is provisioned, you can change the default geo-redundant backup storage and configure either locally redundant or zone-redundant storage. Storage redundancy mechanisms store multiple copies of your backups so that it is protected from planned and unplanned events, including transient hardware failure, network or power outages, or massive natural disasters.
3838

39-
Backup data in Azure Cosmos DB is replicated three times in the primary region. You can configure storage redundancy for periodic backup mode at the time of account creation or update it for an existing account. You can use the following three data redundancy options in periodic backup mode:
39+
You can configure storage redundancy for periodic backup mode at the time of account creation or update it for an existing account. You can use the following three data redundancy options in periodic backup mode:
4040

4141
* **Geo-redundant backup storage:** This option copies your data asynchronously across the paired region.
4242

43-
* **Zone-redundant backup storage:** This option copies your data asynchronously across three Azure availability zones in the primary region.
43+
* **Zone-redundant backup storage:** This option copies your data synchronously across three Azure availability zones in the primary region. For more information, see [Zone-redundant storage.](../storage/common/storage-redundancy.md#redundancy-in-the-primary-region)
4444

45-
* **Locally-redundant backup storage:** This option copies your data asynchronously three times within a single physical location in the primary region.
45+
* **Locally-redundant backup storage:** This option copies your data synchronously three times within a single physical location in the primary region. For more information, see [locally-redundant storage.](../storage/common/storage-redundancy.md#redundancy-in-the-primary-region)
4646

4747
> [!NOTE]
4848
> Zone-redundant storage is currently available only in [specific regions](high-availability.md#availability-zone-support). Depending on the region you select for a new account or the region you have for an existing account; the zone-redundant option will not be available.
@@ -68,10 +68,10 @@ Use the following steps to change the default backup options for an existing Azu
6868

6969
* **Copies of data retained** - By default, two backup copies of your data are offered at free of charge. There is an extra charge if you need more than two copies. See the Consumed Storage section in the [Pricing page](https://azure.microsoft.com/pricing/details/cosmos-db/) to know the exact price for extra copies.
7070

71-
* **Backup storage redundancy** - Choose the required storage redundancy option, see the [Backup storage redundancy](#backup-storage-redundancy) section for available options. By default, your existing periodic backup mode accounts have geo-redundant storage. You can choose other storage such as locally redundant to ensure the backup is not replicated to another region. The changes made to an existing account are applied to only future backups. After the backup storage redundancy of an existing account is updated, it may take up to twice the backup interval time for the changes to take effect and **you will lose access to restore the older backups immediately.**
71+
* **Backup storage redundancy** - Choose the required storage redundancy option, see the [Backup storage redundancy](#backup-storage-redundancy) section for available options. By default, your existing periodic backup mode accounts have geo-redundant storage if the region where the account is being provisioned supports it. Otherwise, the account fallback to the highest redundancy option available. You can choose other storage such as locally redundant to ensure the backup is not replicated to another region. The changes made to an existing account are applied to only future backups. After the backup storage redundancy of an existing account is updated, it may take up to twice the backup interval time for the changes to take effect and **you will lose access to restore the older backups immediately.**
7272

7373
> [!NOTE]
74-
> You must have the Azure [Cosmos DB Account Reader Role](../role-based-access-control/built-in-roles.md#cosmos-db-account-reader-role) role assigned at the subscription level to configure backup storage redundancy.
74+
> You must have the Azure [Cosmos DB Operator role](../role-based-access-control/built-in-roles.md#cosmos-db-operator) role assigned at the subscription level to configure backup storage redundancy.
7575
7676
:::image type="content" source="./media/configure-periodic-backup-restore/configure-backup-options-existing-accounts.png" alt-text="Configure backup interval, retention, and storage redundancy for an existing Azure Cosmos account." border="true":::
7777

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
---
2+
title: Update backup storage redundancy for Azure Cosmos DB periodic backup accounts
3+
description: Learn how to update the backup storage redundancy using Azure CLI, and PowerShell. You can also configure an Azure policy on your accounts to enforce the required storage redundancy.
4+
author: kanshiG
5+
ms.service: cosmos-db
6+
ms.topic: how-to
7+
ms.date: 11/16/2021
8+
ms.author: govindk
9+
ms.reviewer: sngun
10+
11+
---
12+
13+
# Update backup storage redundancy for Azure Cosmos DB periodic backup accounts
14+
[!INCLUDE[appliesto-all-apis](includes/appliesto-all-apis.md)]
15+
16+
By default, Azure Cosmos DB stores periodic mode backup data in geo-redundant [blob storage](../storage/common/storage-redundancy.md) that is replicated to a [paired region](../best-practices-availability-paired-regions.md). 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.
17+
18+
## Update using CLI
19+
20+
Use the following steps to update the backup storage redundancy on an existing account using Azure CLI:
21+
22+
1. Install the latest version if Azure CLI or a version higher than or equal to 2.30.0. If you have the "cosmosdb-preview" extension installed, make sure to remove it.
23+
24+
1. Use the following command to get the backup redundancy options available in the regions where your account exists:
25+
26+
```azurecli-interactive
27+
az cosmosdb locations show --location <region_Name>
28+
```
29+
30+
```bash
31+
{
32+
"id": "subscriptionId/<Subscription_ID>/providers/Microsoft.DocumentDB/locations/eastus/",
33+
"name": "East US",
34+
"properties": {
35+
"backupStorageRedundancies": [
36+
"Geo",
37+
"Zone",
38+
"Local"
39+
],
40+
"isResidencyRestricted": false,
41+
"supportsAvailabilityZone": true
42+
},
43+
"type": "Microsoft.DocumentDB/locations"
44+
}
45+
```
46+
47+
The previous command shows a list of backup redundancies available in the specific region. Supported values are displayed in the `backupStorageRedundancies` property. For example some regions such as "East US" support three redundancy options "Geo", "Zone", and "Local" whereas some regions like "UAE North" support only "Geo" and "Local" redundancy options. Before updating, choose the backup storage redundancy option that is supported in all the regions where your account exists.
48+
49+
1. Run the following command with the chosen backup redundancy option to update the backup redundancy on an existing account:
50+
51+
```azurecli-interactive
52+
az cosmosdb update -n <account_Name> -g <resource_Group> --backup-redundancy "Geo"
53+
```
54+
55+
1. Run the following command to create a new account with the chosen backup redundancy option:
56+
57+
```azurecli-interactive
58+
az cosmosdb create -n <account_Name> -g <resource_Group> --backup-redundancy "Geo" --locations regionName=westus
59+
```
60+
61+
## Update using PowerShell
62+
63+
1. Install the latest version of Azure PowerShell or a version higher than or equal to 1.4.0
64+
65+
```powershell-interactive
66+
Install-Module -Name Az.CosmosDB -RequiredVersion 1.4.0
67+
```
68+
69+
1. Use the following command to get the backup redundancy options available in the regions where your account exists:
70+
71+
```powershell-interactive
72+
$location = Get-AzCosmosDBLocation -Location <region_Name>
73+
$location.Properties.BackupStorageRedundancies
74+
```
75+
76+
The previous command shows a list of backup redundancies available in the specific region. Supported values are displayed in the `backupStorageRedundancies` property. For example some regions such as "East US" support three redundancy options "Geo", "Zone", and "Local" whereas some regions like "UAE North" support only "Geo" and "Local" redundancy options. Before updating, choose the backup storage redundancy option that is supported in all the regions where your account exists.
77+
78+
1. Run the following command with the chosen backup redundancy option to update the backup redundancy on an existing account:
79+
80+
```powershell-interactive
81+
Update-AzCosmosDBAccount `
82+
-Name <account_Name> `
83+
-ResourceGroupName <resource_Group> `
84+
-BackupStorageRedundancy "Geo"
85+
```
86+
87+
1. Run the following command to create a new account with the chosen backup redundancy option:
88+
89+
```powershell-interactive
90+
New-AzCosmosDBAccount `
91+
-Name <account_Name> `
92+
-ResourceGroupName <resource_Group> `
93+
-Location <region_Name> `
94+
-BackupPolicyType Periodic`
95+
-BackupStorageRedundancy "Geo"
96+
97+
```
98+
99+
## Add a policy for the backup storage redundancy
100+
101+
Azure Policy helps you to enforce organizational standards and to assess compliance at-scale. The following sample shows how to add an Azure policy for the database accounts to have a backup redundancy of type "Zone".
102+
103+
```json
104+
"parameters": {},
105+
"policyRule": {
106+
"if": {
107+
"allOf": [
108+
{
109+
"field": "Microsoft.DocumentDB/databaseAccounts/backupPolicy.periodicModeProperties.backupStorageRedundancy",
110+
"match": "Zone"
111+
}
112+
]
113+
},
114+
"then": {
115+
"effect": "audit"
116+
}
117+
}
118+
```
119+
120+
## Next steps
121+
122+
* Provision an Azure Cosmos DB account with [periodic backup mode'(configure-periodic-backup-restore.md).
123+
* Provision an account with continuous backup using [Azure portal](provision-account-continuous-backup.md#provision-portal), [PowerShell](provision-account-continuous-backup.md#provision-powershell), [CLI](provision-account-continuous-backup.md#provision-cli), or [Azure Resource Manager](provision-account-continuous-backup.md#provision-arm-template).
124+
* Restore continuous backup account using [Azure portal](restore-account-continuous-backup.md#restore-account-portal), [PowerShell](restore-account-continuous-backup.md#restore-account-powershell), [CLI](restore-account-continuous-backup.md#restore-account-cli), or [Azure Resource Manager](restore-account-continuous-backup.md#restore-arm-template).
176 KB
Loading
134 KB
Loading
101 KB
Loading
Binary file not shown.

0 commit comments

Comments
 (0)