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.
After moving a storage account to new subscription, container is not moved
After moving a storage account to new subscription, container is not moved
3 answers
Sort by: Most helpful
-
Swetha Singh 10 Reputation points Microsoft Employee
2024-02-16T09:35:18.7933333+00:00 -
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:
- Install the Azure Storage Blob SDK.
- Create a client object for the storage account that contains the old container.
- Create a client object for the storage account that contains the new container.
- Get a list of the blobs in the old container.
- For each blob in the old container:
- Copy the blob to the new container.
- Delete the old container.
Here are the steps to copy the data using the Azure Storage Explorer:
- Open the Azure Storage Explorer.
- Connect to the storage account that contains the old container.
- Expand the "Containers" folder.
- Right-click on the old container.
- Select "Copy".
- In the "Copy container" dialog box:
- Select the storage account that contains the new container.
- Click "Copy".
- 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
and upvote
button if you find this helpful.
-
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.