After moving a storage account to new subscription, container is not moved

Takamol 0 Reputation points
2023-05-16T09:51:21.11+00:00

After moving a storage account to new subscription, container is not moved

Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
3,301 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Swetha Singh 10 Reputation points Microsoft Employee
    2024-02-16T09:35:18.7933333+00:00

    Recently, we performed a move operation of Storage Account from one subscription to another and discovered that the container and data as well got moved.

    2 people found this answer helpful.

  2. Vedant Desai 656 Reputation points
    2023-05-16T09:56:04.6166667+00:00

    That's because Azure doesn't currently support moving containers between subscriptions. You'll need to create a new container in the new subscription and copy the data from the old container to the new one.

    To copy the data, you can use the Azure Storage Blob SDK or the Azure Storage Explorer.

    Here are the steps to copy the data using the Azure Storage Blob SDK:

    1. Install the Azure Storage Blob SDK.
    2. Create a client object for the storage account that contains the old container.
    3. Create a client object for the storage account that contains the new container.
    4. Get a list of the blobs in the old container.
    5. For each blob in the old container:
    • Copy the blob to the new container.
    1. Delete the old container.

    Here are the steps to copy the data using the Azure Storage Explorer:

    1. Open the Azure Storage Explorer.
    2. Connect to the storage account that contains the old container.
    3. Expand the "Containers" folder.
    4. Right-click on the old container.
    5. Select "Copy".
    6. In the "Copy container" dialog box:
    • Select the storage account that contains the new container.
    • Click "Copy".
    1. The Azure Storage Explorer will copy the data from the old container to the new container.

    Once you have copied the data, you can delete the old container.

    Please don't forget to click on 130616-image.png

    and upvote 130671-image.png

    button if you find this helpful.

    0 comments No comments

  3. Sumarigo-MSFT 47,371 Reputation points Microsoft Employee
    2023-05-19T09:21:17.1+00:00

    @Takamol Welcome to Microsoft Q&A Forum, Thank you for posting your query here!

    When you move a storage account to a new subscription, the storage account and its data are moved to the new subscription. However, the containers within the storage account are not moved. You will need to manually copy the containers to the new subscription. You can use Azure Storage Explorer or AzCopy to copy the containers. For more information, see Move resources to a new resource group or subscription.

    For more information's refer to this article: Move an Azure Storage account to another region

    Please let us know if you have any further queries. I’m happy to assist you further.


    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.