Copy data and Move files across the Cloud Storage and local file system is crucial when you are working with a cloud platform, AzCopy is a tool which you can use to move your files in and out to the Microsoft Azure Cloud Storage. Previously, I posted an article about how to use Microsoft Storage Explorer which is another great tool to access the cloud storage.
The latest version of AzCopy Can be downloaded from here. Nothing to worry about the installation as it is quite simple and generic installation similar to the other software.
[tw_gallery type=”gallery,slider” height=”200″]
Once you installed the AzCopy on your system executable files will be saved under C:\Program Files (x86)\Microsoft SDKs\Azure\AzCopy location

Move Local Files To Azure Cloud Storage
You can easily copy files which are located in your local system to the Azure Cloud Storage using AzCopy. I have created an Azure Blob container and I’m going to upload/copy few files located in my local system.

To copy the files, change the directory to the AzCopy executable location and use the below command
azcopy.exe [local_path_to_the_files] /Dest:[blob_url] /Destkey:[access_key_of_the_storage_account]

To obtain the Blob Container URL just follow the below steps
Just select the container and click on the small dots (…) , select container properties

You can easily copy the container url

To get the access key of the Storage Account, select the Storage account and select the Access Keys then simply copy the key

Copy Files Between Two Storage Accounts (Two Containers)
Copying files across two storage account can be accomplished by below command, use recursive flag “/s” at the end to copy all the files
azcopy.exe /Source:[source_container_url] /Dest:[destination_container_url] /Sourcekey:[source_storage_account_key] /Destkey:[destination_storage_account_key] /s

Check the Second blob container after the execution of this command
Download Files From Azure Storage using AzCopy
You can also download the files from Azure Cloud storage to your local system, just follow the below command, again use the recursive flag to copy all the files
azcopy.exe /Source:[source_container_url] /Dest:[local_file_path] /Sourcekey:[source_storage_account_access_key] /s

Files will be copied successfully as below

I hope this helps you to work with Azure Storage.




Leave a Reply