如何跨区域迁移 Azure API 管理How to migrate Azure API Management across regions

若要将 API 管理实例从一个 Azure 区域迁移到另一个 Azure 区域,可以使用备份和还原功能。To migrate API Management instances from one Azure region to another, you can use the backup and restore feature. 应该在源和目标区域选择相同的 API 管理定价层。You should choose the same API Management pricing tier in the source and target regions.

备注

在不同的云类型之间迁移时,备份和还原无效。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 区域的已导出模板并重新创建资源。Then, adapt the exported template for the target Azure region and re-create the resource.

选项 1:使用另一个 API 管理实例名称Option 1: Use a different API Management instance name

  1. 在目标区域创建新的 API 管理实例,所用定价层与源 API 管理实例相同。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.
  2. 将现有的 API 管理实例备份到存储帐户。Backup existing API Management instance to a storage account.
  3. 将在步骤 2 中创建的备份还原到在步骤 1 的新区域中创建的新 API 管理实例。Restore the backup created in Step 2 to the new API Management instance created in the new region in Step 1.
  4. 如果有一个指向源区域 API 管理实例的自定义域,请更改自定义域 CNAME,使之指向新的 API 管理实例。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.

选项 2:使用同一个 API 管理实例名称Option 2: Use the same API Management instance name

备注

此选项会导致迁移过程中出现停机。This option will result in downtime during the migration.

  1. 将源区域中的 API 管理实例备份到存储帐户。Back up the API Management instance in the source region to a storage account.
  2. 删除源区域中的 API 管理。Delete the API Management in the source region.
  3. 在目标区域创建新的 API 管理实例,所用名称与源区域相同。Create a new API Management instance in the target region with the same name as the one in the source region.
  4. 将在步骤 1 中创建的备份还原到目标区域中的新 API 管理实例。Restore the backup created in Step 1 to the new API Management instance in the target region.

后续步骤 Next steps