21. July 2014 12:55
I had to copy my VM blob from one account to another. I wanted a way that wouldn’t require me to download the vhd locally, just to then have to turn around and upload it again. Instead, I wanted to be able to have the copy done within the Azure cloud itself. Fortunately, I found free software to do just that. It’s called AZCopy. Here’s the link you need:
You don’t have to install anything. Just run it from the command prompt. Here’s the syntax of the command I used:
1: AzCopy https://<sourceaccount>.blob.core.windows.net/<sourcecontainer>/ https://<destaccount>.blob.core.windows.net/<destcontainer>/ /sourcekey:<key> /destkey:<key> /S
I’m not sure when you have to use https and when you don’t. My paths in Azure didn’t show https, but when I tried to copy to my destination, I kept getting the error below.
Error parsing destination location "http://dest.blob.core.windows.net/vhds/": The underlying connection was closed: An unexpected error occurred on a receive.
Once I changed it to https, it worked great. Here’s the output of my results.
C:\_utilities>azcopy http://source.blob.core.windows.net/vhds/ https://dest.blob.core.windows.net/vhds/ /sourcekey:srckey /destkey:dstkey /S
Transferring files /
Total files transferred: 1
Transfer successfully: 1
Transfer failed: 0
127GB copied in just a few minutes! Perfect.