Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Transferring all data from one subscription to another

Tags:

azure

How do I transfer my all of my cloud services, databases, virtual machines and blob storage to another subscription that I newly subscribed to? Is there a simpler way?

like image 384
iefpw Avatar asked Sep 05 '12 04:09

iefpw


People also ask

How do I transfer storage from one subscription to another?

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 I move resources between subscriptions?

Go to the Resource groups blade in the Azure portal and then navigate to the particular resource group. Step 2 — Click on Move button and then select Move to another subscription option. Step 3 — Next in the resources to move screen, review the resources that are to be moved over which are all automatically selected.

Can we move resources from one subscription to another in Azure?

You can use the Azure portal, Azure PowerShell, Azure CLI, or the REST API to move resources. Both the source group and the target group are locked during the move operation.

How do I transfer data from one storage account to another in Azure?

Copy all containers, directories, and blobs to another storage account by using the azcopy copy command. This example encloses path arguments with single quotes (''). Use single quotes in all command shells except for the Windows Command Shell (cmd.exe).


2 Answers

UPDATE: 6-JUN-2016 - THIS ANSWER IS FAIRLY OLD. ONE MUST REACH OUT TO AZURE SUPPORT FOR TRANSFERRING DATA FROM ONE SUBSCRIPTION TO OTHER. ALSO AZURE PORTAL NOW SUPPORTS MOVING SERVICES FROM ONE SUBSCRIPTION TO ANOTHER


There're a few (actually a lot :)) things here. You could try contacting Windows Azure Support and have them move it but I wouldn't hold my breath for that. Only other option left would be to manually transfer all the assets. However please keep in mind that this would mean your services will be down for certain amount of time.

  1. Cloud Services - Since a cloud service is essentially a placeholder for your applications, you would need to delete them 1st from the 1st subscription (source) and then recreate them in the 2nd subscription (target). Once you have created them in the target subscription, you can republish/redeploy your applications.

  2. Databases - Do take a look at Copy Database functionality (http://msdn.microsoft.com/en-us/library/windowsazure/ff951624.aspx) and Import/Export SQL Azure Databases (http://msdn.microsoft.com/en-us/library/windowsazure/hh335292.aspx) available in Windows Azure. I have tried it to create copies

  3. Virtual Machines - Essentially Virtual Machines are backed by blob storage i.e. all the VHDs for your VMs are stored as page blobs in blob storage. Do take a look at this blog post for moving VMs from one subscription to another: http://gauravmantri.com/2012/07/04/how-to-move-windows-azure-virtual-machines-from-one-subscription-to-another/

  4. Blob Storage - With the latest release, copy blob functionality is a server side asynchronous operation. What that means is that you could copy blobs from one storage account to another without downloading them on your computer first. The idea is to list blob containers and blobs in source and then iterate over them and repeatedly call copy blob functionality to copy the blobs. The blog post above has a sample console application which copies a blob from one storage account to another which you can use as reference. The only catch here is that the target storage account must be created on or after 7th June 2012. You may find following links useful as well: http://blog.elastacloud.com/2012/07/04/copying-azure-blobs-from-one-subscription-to-another-with-api-1-7-1/ and http://blogs.msdn.com/b/windowsazurestorage/archive/2012/06/12/introducing-asynchronous-cross-account-copy-blob.aspx

Hope this helps.

like image 132
Gaurav Mantri Avatar answered Sep 19 '22 17:09

Gaurav Mantri


I have just contact Azure Support about this. Their answer:

[Azure Support] will be able to migrate the Windows Azure data (hosted services, storage accounts), VM instances, service bus, Web Sites from source to destination subscription... Please note that the Preview feature services are not supported for migration, however we can do it on a trial an error basis.

So it seems this can be done via support now. The big caveat is that it's (currently, at least) an all-or-nothing move. So you can't move everything except for one service, or one storage account, etc. You have to move everything.

Note that moving a SQL Azure server is trivially done through the management portal.

Update: I have completed a subscription transfer as mentioned above. The actual transfer was a fairly painless process that only took a few hours. Getting all the various services split out into separate subscriptions was quite painful. So the moral of the story is to be careful about what services you put into a subscription. If at all possible put each "product" (website, SaaS offering, whatever) into a separate subscription.

like image 34
Brian Reischl Avatar answered Sep 20 '22 17:09

Brian Reischl