In some situations, data from a Storage Account must be moved to a different Storage Account and we can use several options to accomplish this task, such as Azure Explorer, PowerShell and AZCopy utility.
In this Tutorial, we are going to use AZCopy which can be downloaded from here. Before going to the command prompt to use AZCopy we must gather two pieces of information of the source and destination Storage account.
We can always download the file and upload to the new Storage Account, however, that is not every efficient, the best way is to leverage the Azure backbone to copy the data from source to target.
In this Tutorial, we are going to copy a VHD file between Storage Accounts in different subscriptions, this process is important when you have several regions and you need to replicate your images across.
Both pieces information can be found at the same place, open the desired Storage Account and save the Storage Account Name and Key1.
The next step is to open command prompt (by default the AZCopy is installed on C:\Program Files (x86)\Microsoft SDKs\Azure\AZCopy, and execute the following command to copy a VHD file between Storage Accounts, keep in mind that the process will take some time to complete.
.\AzCopy.exe /Source:https://StorageAccountSource.blob.core.windows.net/vhds /Dest:https://StorageAccountDestination.blob.core.windows.net/vhds /SourceKey:”keyXXX” /DestKey:”DestinationKeyXX” /SyncCopy /s