You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/api-management/api-management-howto-disaster-recovery-backup-restore.md
+21-35Lines changed: 21 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,16 +3,11 @@ title: Implement disaster recovery using backup and restore in API Management
3
3
titleSuffix: Azure API Management
4
4
description: Learn how to use backup and restore to perform disaster recovery in Azure API Management.
5
5
services: api-management
6
-
documentationcenter: ''
7
6
author: mikebudzynski
8
-
manager: erikre
9
-
editor: ''
10
7
11
8
ms.service: api-management
12
-
ms.workload: mobile
13
-
ms.tgt_pltfrm: na
14
9
ms.topic: article
15
-
ms.date: 12/05/2020
10
+
ms.date: 08/20/2021
16
11
ms.author: apimpm
17
12
ms.custom: devx-track-azurepowershell
18
13
---
@@ -53,40 +48,34 @@ All of the tasks that you do on resources using the Azure Resource Manager must
53
48
### Create an Azure Active Directory application
54
49
55
50
1. Sign in to the [Azure portal](https://portal.azure.com).
56
-
2. Using the subscription that contains your API Management service instance, navigate to the **App registrations** tab in **Azure Active Directory** (Azure Active Directory > Manage/App registrations).
57
-
51
+
1. Using the subscription that contains your API Management service instance, navigate to the [Azure portal - App registrations](https://portal.azure.com/#blade/Microsoft_AAD_RegisteredApps/ApplicationsListBlade) to register an app in Active Directory.
58
52
> [!NOTE]
59
53
> If the Azure Active Directory default directory isn't visible to your account, contact the administrator of the Azure subscription to grant the required permissions to your account.
54
+
1. Select **+ New registration**.
55
+
1. On the **Register an application** page, set the values as follows:
56
+
57
+
* Set **Name** to a meaningful name.
58
+
* Set **Supported account types** to **Accounts in this organizational directory only**.
59
+
* In **Redirect URI** enter a placeholder URL such as `https://resources`. It's a required field, but the value isn't used later.
60
+
* Select **Register**.
60
61
61
-
3. Click **New application registration**.
62
-
63
-
The **Create** window appears on the right. That's where you enter the AAD app relevant information.
64
-
65
-
4. Enter a name for the application.
66
-
5. For the application type, select **Native**.
67
-
6. Enter a placeholder URL such as `http://resources` for the **Redirect URI**, as it's a required field, but the value isn't used later. Click the check box to save the application.
68
-
7. Click **Create**.
62
+
### Add permissions
69
63
70
-
### Add an application
71
-
72
-
1. Once the application is created, click **API permissions**.
73
-
2. Click **+ Add a permission**.
74
-
4. Press **Select Microsoft APIs**.
75
-
5. Choose **Azure Service Management**.
76
-
6. Press **Select**.
64
+
1. Once the application is created, select **API permissions** > **+ Add a permission**.
65
+
1. Select **Microsoft APIs**.
66
+
1. Select **Azure Service Management**.
77
67
78
68
:::image type="content" source="./media/api-management-howto-disaster-recovery-backup-restore/add-app-permission.png" alt-text="Screenshot that shows how to add app permissions.":::
79
69
80
-
7. Click **Delegated Permissions** beside the newly added application, check the box for **Access Azure Service Management (preview)**.
70
+
1. Click **Delegated Permissions** beside the newly added application, and check the box for **Access Azure Service Management as organization users (preview)**.
81
71
82
72
:::image type="content" source="./media/api-management-howto-disaster-recovery-backup-restore/delegated-app-permission.png" alt-text="Screenshot that shows adding delegated app permissions.":::
83
73
84
-
8. Press **Select**.
85
-
9. Click **Add Permissions**.
74
+
1. Select **Add permissions**.
86
75
87
-
### Configuring your app
76
+
### Configure your app
88
77
89
-
Before calling the APIs that generate the backup and restore it, you need to get a token. The following example uses the [Microsoft.IdentityModel.Clients.ActiveDirectory](https://www.nuget.org/packages/Microsoft.IdentityModel.Clients.ActiveDirectory) NuGet package to retrieve the token.
78
+
Before calling the APIs that generate the backup and restore, you need to get a token. The following example uses the [Microsoft.IdentityModel.Clients.ActiveDirectory](https://www.nuget.org/packages/Microsoft.IdentityModel.Clients.ActiveDirectory) NuGet package to retrieve the token.
@@ -133,6 +122,9 @@ Replace `{tenant id}`, `{application id}`, and `{redirect uri}` using the follow
133
122
134
123
The REST APIs are [Api Management Service - Backup](/rest/api/apimanagement/2020-12-01/api-management-service/backup) and [Api Management Service - Restore](/rest/api/apimanagement/2020-12-01/api-management-service/restore).
135
124
125
+
> [!NOTE]
126
+
> Backup and restore operations can also be performed with PowerShell [_Backup-AzApiManagement_](/powershell/module/az.apimanagement/backup-azapimanagement) and [_Restore-AzApiManagement_](/powershell/module/az.apimanagement/restore-azapimanagement) commands respectively.
127
+
136
128
Before calling the "backup and restore" operations described in the following sections, set the authorization request header for your REST call.
137
129
138
130
```csharp
@@ -152,7 +144,7 @@ where:
152
144
-`subscriptionId` - ID of the subscription that holds the API Management service you're trying to back up
153
145
-`resourceGroupName` - name of the resource group of your Azure API Management service
154
146
-`serviceName` - the name of the API Management service you're making a backup of specified at the time of its creation
155
-
-`api-version` - replace with `2020-12-01`
147
+
-`api-version` - replace with a supported REST API version such as `2020-12-01`
156
148
157
149
In the body of the request, specify the target Azure storage account name, access key, blob container name, and backup name:
158
150
@@ -204,14 +196,8 @@ Restore is a long running operation that may take up to 30 or more minutes to co
204
196
>
205
197
> **Changes** made to the service configuration (for example, APIs, policies, developer portal appearance) while restore operation is in progress **could be overwritten**.
206
198
207
-
<!-- Dummy comment added to suppress markdown lint warning -->
208
-
209
-
> [!NOTE]
210
-
> Backup and restore operations can also be performed with PowerShell [_Backup-AzApiManagement_](/powershell/module/az.apimanagement/backup-azapimanagement) and [_Restore-AzApiManagement_](/powershell/module/az.apimanagement/restore-azapimanagement) commands respectively.
211
-
212
199
## Constraints when making backup or restore request
213
200
214
-
-**Container** specified in the request body **must exist**.
215
201
- While backup is in progress, **avoid management changes in the service** such as SKU upgrade or downgrade, change in domain name, and more.
216
202
- Restore of a **backup is guaranteed only for 30 days** since the moment of its creation.
217
203
-**Changes** made to the service configuration (for example, APIs, policies, and developer portal appearance) while backup operation is in process **might be excluded from the backup and will be lost**.
title: How to migrate Azure API Management across regions
2
+
title: How to migrate Azure API Management between regions
3
3
description: Learn how to migrate an API Management instance from one region to another.
4
4
services: api-management
5
-
documentationcenter: ''
6
5
author: miaojiang
7
-
manager: erikre
8
-
editor: ''
9
6
10
7
ms.service: api-management
11
-
ms.workload: mobile
12
-
ms.tgt_pltfrm: na
13
-
ms.topic: article
14
-
ms.date: 08/26/2019
8
+
ms.topic: how-to
9
+
ms.date: 08/20/2021
15
10
ms.author: apimpm
16
-
11
+
ms.custom: subject-moving-resources
12
+
#cusomerintent: As an Azure service administrator, I want to move my service resources to another Azure region.
17
13
---
18
-
# How to migrate Azure API Management across regions
19
-
To migrate API Management instances from one Azure region to another, you can use the [backup and restore](api-management-howto-disaster-recovery-backup-restore.md) feature. You should choose the same API Management pricing tier in the source and target regions.
14
+
15
+
# How to move Azure API Management across regions
16
+
17
+
This article describes how to move an API Management instance to a different Azure region. You might move your instance to another region for many reasons. For example:
18
+
19
+
* Locate your instance closer to your API consumers
20
+
* Deploy features available in specific regions only
21
+
* Meet internal policy and governance requirements
22
+
23
+
To move API Management instances from one Azure region to another, use the service's [backup and restore](api-management-howto-disaster-recovery-backup-restore.md) operations. You can use a different API Management instance name or the existing name.
20
24
21
25
> [!NOTE]
22
-
> Backup and restore won't work while migrating between different cloud types. For that, you'll need to export the resource [as a template](../azure-resource-manager/management/manage-resource-groups-portal.md#export-resource-groups-to-templates). Then, adapt the exported template for the target Azure region and re-create the resource.
26
+
> API Management also supports [multi-region deployment](api-management-howto-deploy-multi-region.md), which distributes a single Azure API management service across multiple Azure regions. Multi-region deployment helps reduce request latency perceived by geographically distributed API consumers and improves service availability if one region goes offline.
23
27
24
-
## Option 1: Use a different API Management instance name
1. In the target region, create a new API Management instance with the same pricing tier as the source API Management instance. The new instance should have a different name.
27
-
1. Backup existing API Management instance to a storage account.
28
-
1. Restore the backup created in Step 2 to the new API Management instance created in the new region in Step 1.
29
-
1. If you have a custom domain pointing to the source region API Management instance, update the custom domain CNAME to point to the new API Management instance.
30
+
## Considerations
30
31
32
+
* Choose the same API Management pricing tier in the source and target regions.
33
+
* Backup and restore won't work when migrating between different cloud types. For that scenario, export the resource [as a template](../azure-resource-manager/management/manage-resource-groups-portal.md#export-resource-groups-to-templates). Then, adapt the exported template for the target Azure region and re-create the resource.
31
34
32
-
## Option 2: Use the same API Management instance name
35
+
## Prerequisites
33
36
34
-
> [!NOTE]
35
-
> This option will result in downtime during the migration.
37
+
* Review requirements and limitations of the API Management [backup and restore](api-management-howto-disaster-recovery-backup-restore.md) operations.
38
+
* See [What is not backed up](api-management-howto-disaster-recovery-backup-restore.md#what-is-not-backed-up). Record settings and data that you will need to recreate manually after moving the instance.
39
+
* Create a [storage account](../storage/common/storage-account-create.md?tabs=azure-portal) in the source region. You will use this account to back up the source instance.
40
+
41
+
## Prepare and move
42
+
43
+
### Option 1: Use a different API Management instance name
36
44
37
-
1. Back up the API Management instance in the source region to a storage account.
38
-
1. Delete the API Management in the source region.
45
+
1. In the target region, create a new API Management instance with the same pricing tier as the source API Management instance. Use a different name for the new instance.
46
+
1.[Back up](api-management-howto-disaster-recovery-backup-restore.md#-back-up-an-api-management-service) the existing API Management instance to the storage account.
47
+
1.[Restore](api-management-howto-disaster-recovery-backup-restore.md#-restore-an-api-management-service) the source instance's backup to the new API Management instance.
48
+
1. If you have a custom domain pointing to the source region API Management instance, update the custom domain CNAME to point to the new API Management instance.
49
+
50
+
### Option 2: Use the same API Management instance name
51
+
52
+
> [!WARNING]
53
+
> This option deletes the original API Management instance and results in downtime during the migration. Ensure that you have a valid backup before deleting the source instance.
54
+
55
+
1.[Back up](api-management-howto-disaster-recovery-backup-restore.md#-back-up-an-api-management-service) the existing API Management instance to the storage account.
56
+
1. Delete the API Management instance in the source region.
39
57
1. Create a new API Management instance in the target region with the same name as the one in the source region.
40
-
1. Restore the backup created in Step 1 to the new API Management instance in the target region.
58
+
1.[Restore](api-management-howto-disaster-recovery-backup-restore.md#-restore-an-api-management-service) the source instance's backup to the new API Management instance in the target region.
59
+
60
+
## Verify
61
+
62
+
1. Ensure that the restore operation completes successfully before accessing your API Management instance in the target region.
63
+
1. Configure settings that are not automatically moved during the restore operation. Examples: virtual network configuration, managed identities, developer portal content, and custom domain and custom CA certificates.
64
+
1. Access your API Management endpoints in the target region. For example, test your APIs, or access the developer portal.
65
+
66
+
## Clean up source resources
67
+
68
+
If you moved the API Management instance using Option 1, after you successfully restore and configure the target instance, you may delete the source instance.
41
69
70
+
## Next steps
42
71
43
-
## <aname="next-steps"> </a>Next steps
44
72
* For more information about the backup and restore feature, see [how to implement disaster recovery](api-management-howto-disaster-recovery-backup-restore.md).
45
-
* For information on migration Azure resources, see [Azure cross-region migration guidance](https://github.com/Azure/Azure-Migration-Guidance).
73
+
* For information on migrating Azure resources, see [Azure cross-region migration guidance](https://github.com/Azure/Azure-Migration-Guidance).
46
74
*[Optimize and save on your cloud spending](../cost-management-billing/costs/quick-acm-cost-analysis.md?WT.mc_id=costmanagementcontent_docsacmhorizontal_-inproduct-learn).
0 commit comments