Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Move azure storage account to different region [closed]

We mistakenly set up an azure storage account in the wrong location West Europe. However we need it to be in North Europe.

Is there a way to transfer a whole storage account. We don't really need the old data in the container.

But if we just delete the account and recreate in new location it will generate a new access keys, which we don't want.

Is there anyway to either manually set the access keys on a new storage account or move the storage account between regions.

Either solution works for us, moving it or deleting it and recreating with same access keys, but we can't have the new storage account with different access keys. We don't care whether or not the data comes across.

I can't see a way of setting access keys in web portal, maybe this is possible programmatially but I've searched and can't see anyone else with samples of this.

like image 496
DermFrench Avatar asked Oct 15 '14 13:10

DermFrench


People also ask

Can I move Azure storage account to another region?

To move a storage account, create a copy of your storage account in another region. Then, move your data to that account by using AzCopy, or another tool of your choice.

Can you move Azure resources between regions?

Azure resources can be moved to a new resource group or subscription, or across regions.

Can the Azure storage account automatically replicate data to another region?

Azure provides several storage solutions that make use of cross-region replication to ensure data availability. For example, Azure geo-redundant storage (GRS) replicates data to a secondary region automatically. This approach ensures that data is durable even if the primary region isn't recoverable.


1 Answers

This might get closed due to it being an Azure infrastructure, vs. programming, question (and would fit better on ServerFault), though it could be argued that, since you need keys to access storage from your code (or via Azure SDKs), it's "close" to programming-related.

That said: You can't just move a storage account. You'll need to delete and re-create, which will give you new keys. You cannot provide your own keys, so you cannot copy keys from your old storage account to your new storage account.

Regarding the API (and portal, and SDK's, and PowerShell cmdlets, all built upon the API): The API only allows you to trigger a re-generation of either primary or secondary key. There's no way to pass in your own key.

like image 130
David Makogon Avatar answered Oct 12 '22 22:10

David Makogon