|
| 1 | +--- |
| 2 | +title: Migrate a classic storage account |
| 3 | +titleSuffix: Azure Storage |
| 4 | +description: Learn how to migrate your classic storage accounts to the Azure Resource Manager deployment model. All classic accounts must be migrated by August 1, 2024. |
| 5 | +services: storage |
| 6 | +author: tamram |
| 7 | + |
| 8 | +ms.service: storage |
| 9 | +ms.topic: how-to |
| 10 | +ms.date: 01/20/2023 |
| 11 | +ms.author: tamram |
| 12 | +ms.subservice: common |
| 13 | +ms.custom: devx-track-azurecli, devx-track-azurepowershell |
| 14 | +--- |
| 15 | + |
| 16 | +# Migrate a classic storage account to Azure Resource Manager |
| 17 | + |
| 18 | +Microsoft will retire classic storage accounts on August 1, 2024. To preserve the data in any classic storage accounts, you must migrate them to the Azure Resource Manager deployment model by that date. After you migrate your account, all of the benefits of the Azure Resource Manager deployment model will be available for that account. For more information about the deployment models, see [Resource Manager and classic deployment](../../azure-resource-manager/management/deployment-models.md). |
| 19 | + |
| 20 | +This article describes how to migrate your classic storage accounts to the Azure Resource Manager deployment model. |
| 21 | + |
| 22 | +## Migrate a classic storage account |
| 23 | + |
| 24 | +# [Portal](#tab/azure-portal) |
| 25 | + |
| 26 | +To migrate a classic storage account to the Azure Resource Manager deployment model with the Azure portal: |
| 27 | + |
| 28 | +1. Sign in to the [Azure portal](https://portal.azure.com). |
| 29 | +1. Navigate to your classic storage account. |
| 30 | +1. In the **Settings** section, click **Migrate to ARM**. |
| 31 | +1. Click on **Validate** to determine migration feasibility. |
| 32 | + |
| 33 | + :::image type="content" source="./media/storage-account-migrate-classic/validate-storage-account.png" alt-text="Screenshot showing how to migrate your classic storage account to Azure Resource Manager."::: |
| 34 | + |
| 35 | +1. After a successful validation, click on **Prepare** to begin the migration. |
| 36 | +1. Type **yes** to confirm, then select **Commit** to complete the migration. |
| 37 | + |
| 38 | +# [PowerShell](#tab/azure-powershell) |
| 39 | + |
| 40 | +To migrate a classic storage account to the Azure Resource Manager deployment model with PowerShell, first validate that the account is ready for migration by running the following command. Remember to replace the placeholder values in brackets with your own values: |
| 41 | + |
| 42 | +```azurepowershell |
| 43 | +$storageAccountName = "<storage-account>" |
| 44 | +Move-AzureStorageAccount -Validate -StorageAccountName $storageAccountName |
| 45 | +``` |
| 46 | + |
| 47 | +Next, prepare the account for migration: |
| 48 | + |
| 49 | +```azurepowershell |
| 50 | +Move-AzureStorageAccount -Prepare -StorageAccountName $storageAccountName |
| 51 | +``` |
| 52 | + |
| 53 | +Check the configuration for the prepared storage account with either Azure PowerShell or the Azure portal. If you're not ready for migration, use the following command to revert your account to its previous state: |
| 54 | + |
| 55 | +```azurepowershell |
| 56 | +Move-AzureStorageAccount -Abort -StorageAccountName $storageAccountName |
| 57 | +``` |
| 58 | + |
| 59 | +Finally, when you are satisfied with the prepared configuration, move forward with the migration and commit the resources with the following command: |
| 60 | + |
| 61 | +```azurepowershell |
| 62 | +Move-AzureStorageAccount -Commit -StorageAccountName $storageAccountName |
| 63 | +``` |
| 64 | + |
| 65 | +# [Azure CLI](#tab/azure-cli) |
| 66 | + |
| 67 | +To migrate a classic storage account to the Azure Resource Manager deployment model with the Azure CLI, first prepare the account for migration by running the following command. Remember to replace the placeholder values in brackets with your own values: |
| 68 | + |
| 69 | +```azurecli |
| 70 | +azure storage account prepare-migration <storage-account> |
| 71 | +``` |
| 72 | + |
| 73 | +Check the configuration for the prepared storage account with either Azure CLI or the Azure portal. If you're not ready for migration, use the following command to revert your account to its previous state: |
| 74 | + |
| 75 | +```azurecli |
| 76 | +azure storage account abort-migration <storage-account> |
| 77 | +``` |
| 78 | + |
| 79 | +Finally, when you are satisfied with the prepared configuration, move forward with the migration and commit the resources with the following command: |
| 80 | + |
| 81 | +```azurecli |
| 82 | +azure storage account commit-migration <storage-account> |
| 83 | +``` |
| 84 | + |
| 85 | +--- |
| 86 | + |
| 87 | +## See also |
| 88 | + |
| 89 | +- [Create a storage account](storage-account-create.md) |
| 90 | +- [Move an Azure Storage account to another region](storage-account-move.md) |
| 91 | +- [Upgrade to a general-purpose v2 storage account](storage-account-upgrade.md) |
| 92 | +- [Get storage account configuration information](storage-account-get-info.md) |
0 commit comments