Skip to content

Commit d2ad863

Browse files
Merge pull request #209626 from maud-lv/ml-aac-backup
Add note about geo-replication
2 parents 92fbd41 + 21cff4c commit d2ad863

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

articles/azure-app-configuration/howto-backup-config-store.md

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ms.service: azure-app-configuration
88
ms.devlang: csharp
99
ms.custom: devx-track-dotnet, devx-track-azurecli
1010
ms.topic: how-to
11-
ms.date: 04/27/2020
11+
ms.date: 08/24/2022
1212
ms.author: avgupta
1313

1414

@@ -17,13 +17,16 @@ ms.author: avgupta
1717

1818
# Back up App Configuration stores automatically
1919

20-
In this article, you'll learn how to set up an automatic backup of key-values from a primary Azure App Configuration store to a secondary store. The automatic backup uses the integration of Azure Event Grid with App Configuration.
20+
In this article, you'll learn how to set up an automatic backup of key-values from a primary Azure App Configuration store to a secondary store. The automatic backup uses the integration of Azure Event Grid with App Configuration.
2121

22-
After you set up the automatic backup, App Configuration will publish events to Azure Event Grid for any changes made to key-values in a configuration store. Event Grid supports a variety of Azure services from which users can subscribe to the events emitted whenever key-values are created, updated, or deleted.
22+
After you set up the automatic backup, App Configuration will publish events to Azure Event Grid for any changes made to key-values in a configuration store. Event Grid supports various Azure services from which users can subscribe to the events emitted whenever key-values are created, updated, or deleted.
23+
24+
> [!IMPORTANT]
25+
> Azure App Configuration added [geo-replication](./concept-geo-replication.md) support recently. You can enable replicas of your data across multiple locations for enhanced resiliency to regional outages. You can also leverage App Configuration provider libraries in your applications for [automatic failover](./howto-geo-replication.md#use-replicas). The geo-replication feature is currently under preview. It will be the recommended solution for high availability when the feature is generally available.
2326
2427
## Overview
2528

26-
In this article, you'll use Azure Queue storage to receive events from Event Grid and use a timer-trigger of Azure Functions to process events in the queue in batches.
29+
In this article, you'll use Azure Queue storage to receive events from Event Grid and use a timer-trigger of Azure Functions to process events in the queue in batches.
2730

2831
When a function is triggered, based on the events, it will fetch the latest values of the keys that have changed from the primary App Configuration store and update the secondary store accordingly. This setup helps combine multiple changes that occur in a short period in one backup operation, which avoids excessive requests made to your App Configuration stores.
2932

@@ -37,7 +40,7 @@ In this tutorial, you'll create a secondary store in the `centralus` region and
3740

3841
[!INCLUDE [quickstarts-free-trial-note](../../includes/quickstarts-free-trial-note.md)].
3942

40-
## Prerequisites
43+
## Prerequisites
4144

4245
- [Visual Studio 2019](https://visualstudio.microsoft.com/vs) with the Azure development workload.
4346

@@ -121,6 +124,7 @@ az eventgrid event-subscription create \
121124
### Set up with ready-to-use functions
122125

123126
In this article, you'll work with C# functions that have the following properties:
127+
124128
- Runtime stack .NET Core 3.1
125129
- Azure Functions runtime version 3.x
126130
- Function triggered by timer every 10 minutes
@@ -134,6 +138,7 @@ To make it easier for you to start backing up your data, we've [tested and publi
134138
### Build your own function
135139

136140
If the sample code provided earlier doesn't meet your requirements, you can also create your own function. Your function must be able to perform the following tasks in order to complete the backup:
141+
137142
- Periodically read contents of your queue to see if it contains any notifications from Event Grid. Refer to the [Storage Queue SDK](../storage/queues/storage-quickstart-queues-dotnet.md) for implementation details.
138143
- If your queue contains [event notifications from Event Grid](./concept-app-configuration-event.md#event-schema), extract all the unique `<key, label>` information from event messages. The combination of key and label is the unique identifier for key-value changes in the primary store.
139144
- Read all settings from the primary store. Update only those settings in the secondary store that have a corresponding event in the queue. Delete all settings from the secondary store that were present in the queue but not in the primary store. You can use the [App Configuration SDK](https://github.com/Azure/AppConfiguration#sdks) to access your configuration stores programmatically.
@@ -142,15 +147,14 @@ If the sample code provided earlier doesn't meet your requirements, you can also
142147

143148
To learn more about creating a function, see: [Create a function in Azure that is triggered by a timer](../azure-functions/functions-create-scheduled-function.md) and [Develop Azure Functions using Visual Studio](../azure-functions/functions-develop-vs.md).
144149

145-
146150
> [!IMPORTANT]
147151
> Use your best judgement to choose the timer schedule based on how often you make changes to your primary configuration store. Running the function too often might end up throttling requests for your store.
148152
>
149153
150-
151154
## Create function app settings
152155

153156
If you're using a function that we've provided, you need the following app settings in your function app:
157+
154158
- `PrimaryStoreEndpoint`: Endpoint for the primary App Configuration store. An example is `https://{primary_appconfig_name}.azconfig.io`.
155159
- `SecondaryStoreEndpoint`: Endpoint for the secondary App Configuration store. An example is `https://{secondary_appconfig_name}.azconfig.io`.
156160
- `StorageQueueUri`: Queue URI. An example is `https://{unique_storage_name}.queue.core.windows.net/{queue_name}`.
@@ -165,7 +169,6 @@ storageQueueUri="https://$storageName.queue.core.windows.net/$queueName"
165169
az functionapp config appsettings set --name $functionAppName --resource-group $resourceGroupName --settings StorageQueueUri=$storageQueueUri PrimaryStoreEndpoint=$primaryStoreEndpoint SecondaryStoreEndpoint=$secondaryStoreEndpoint
166170
```
167171

168-
169172
## Grant access to the managed identity of the function app
170173

171174
Use the following command or the [Azure portal](../app-service/overview-managed-identity.md#add-a-system-assigned-identity) to add a system-assigned managed identity for your function app.
@@ -178,6 +181,7 @@ az functionapp identity assign --name $functionAppName --resource-group $resourc
178181
> To perform the required resource creation and role management, your account needs `Owner` permissions at the appropriate scope (your subscription or resource group). If you need assistance with role assignment, learn [how to assign Azure roles using the Azure portal](../role-based-access-control/role-assignments-portal.md).
179182
180183
Use the following commands or the [Azure portal](./howto-integrate-azure-managed-service-identity.md#grant-access-to-app-configuration) to grant the managed identity of your function app access to your App Configuration stores. Use these roles:
184+
181185
- Assign the `App Configuration Data Reader` role in the primary App Configuration store.
182186
- Assign the `App Configuration Data Owner` role in the secondary App Configuration store.
183187

@@ -246,11 +250,11 @@ If you don't see the new setting in your secondary store:
246250
- It's possible that Event Grid couldn't send the event notification to the queue in time. Check if your queue still contains the event notification from your primary store. If it does, trigger the backup function again.
247251
- Check [Azure Functions logs](../azure-functions/functions-create-scheduled-function.md#test-the-function) for any errors or warnings.
248252
- Use the [Azure portal](../azure-functions/functions-how-to-use-azure-function-app-settings.md#get-started-in-the-azure-portal) to ensure that the Azure function app contains correct values for the application settings that Azure Functions is trying to read.
249-
- You can also set up monitoring and alerting for Azure Functions by using [Azure Application Insights](../azure-functions/functions-monitoring.md?tabs=cmd).
250-
253+
- You can also set up monitoring and alerting for Azure Functions by using [Azure Application Insights](../azure-functions/functions-monitoring.md?tabs=cmd).
251254

252255
## Clean up resources
253-
If you plan to continue working with this App Configuration and event subscription, don't clean up the resources created in this article. If you don't plan to continue, use the following command to delete the resources created in this article.
256+
257+
If you plan to continue working with this App Configuration and event subscription, you might want to leave these resources in place. If you don't plan to continue, use the [az group delete](/cli/azure/group#az-group-delete) command, which deletes the resource group and the resources in it.
254258

255259
```azurecli-interactive
256260
az group delete --name $resourceGroupName
@@ -260,4 +264,5 @@ az group delete --name $resourceGroupName
260264

261265
Now that you know how to set up automatic backup of your key-values, learn more about how you can increase the geo-resiliency of your application:
262266

263-
- [Resiliency and disaster recovery](concept-disaster-recovery.md)
267+
> [!div class="nextstepaction"]
268+
> [Resiliency and disaster recovery](concept-disaster-recovery.md)

0 commit comments

Comments
 (0)