Move an Azure Storage account to another region

Configurare noua (How To)

Situatie

Prerequisites
  • Ensure that the services and features that your account uses are supported in the target region.
  • For preview features, ensure that your subscription is allow listed for the target region.
Prepare

To get started, export, and then modify a Resource Manager template.

Backup

Export a template

This template contains settings that describe your storage account. To export a template by using Azure portal:

  • Sign in to the Azure portal.
  • Select All resources and then select your storage account.
  • Select > Automation > Export template.
  • Choose Download in the Export template blade.
  • Locate the .zip file that you downloaded from the portal, and unzip that file to a folder of your choice. This zip file contains the .json files that comprise the template and scripts to deploy the template.

Solutie

Pasi de urmat

Modify the template by changing the storage account name and region.To deploy the template by using Azure portal:

  • In the Azure portal, select Create a resource.
  • In Search the Marketplace, type template deployment, and then press ENTER.
  • Select Template deployment
  • Azure Resource Manager templates library
  • Select Create.
  • Select Build your own template in the editor.
  • Select Load file, and then follow the instructions to load the template.json file that you downloaded in the last section.
  • In the template.json file, name the target storage account by setting the default value of the storage account name. This example sets the default value of the storage account name to mytargetaccount.
  • JSON:     “$schema”: “https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#”,
    “contentVersion”: “1.0.0.0”,
    “parameters”: {
    “storageAccounts_mysourceaccount_name”: {
    “defaultValue”: “mytargetaccount”,
    “type”: “String”
    }
    },

Edit the location property in the template.json file to the target region. This example sets the target region to centralus.

JSON:  “resources”: [{
“type”: “Microsoft.Storage/storageAccounts”,
“apiVersion”: “2019-04-01”,
“name”: “[parameters(‘storageAccounts_mysourceaccount_name’)]”,
“location”: “centralus”
}]

To obtain region location codes, see Azure Locations. The code for a region is the region name with no spaces, Central US = centralus.

Deploy the template to create a new storage account in the target region.

  • Save the template.json file.
  • Enter or select the property values:
    • Subscription: Select an Azure subscription.
    • Resource group: Select Create new and give the resource group a name.
    • Location: Select an Azure location.
  • Click the I agree to the terms and conditions stated above checkbox, and then click the Select Purchase button.

Tip solutie

Permanent

Voteaza

(6 din 12 persoane apreciaza acest articol)

Despre Autor

Leave A Comment?