Use AzCopy To Copy Files In Azure Cloud Storage

Use AzCopy To Copy Files In Azure Cloud Storage

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″] [/tw_gallery]

Once you installed the AzCopy on your system executable files will be saved under C:\Program Files (x86)\Microsoft SDKs\Azure\AzCopy location

Use AzCopy To Move Files To Azure Cloud Storage : Executable File 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.

Use AzCopy To Move Files To Azure Cloud Storage : Blob container created

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]
Use AzCopy To Move Files To Azure Cloud Storage : Copy Local Files to Cloud

To obtain the Blob Container URL just follow the below steps

Just select the container and click on the small dots (…) , select container properties

Use AzCopy To Move Files To Azure Cloud Storage : Get the url

You can easily copy the container url

Use AzCopy To Move Files To Azure Cloud Storage : Copy the URL

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

Use AzCopy To Move Files To Azure Cloud Storage : Copy 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
Use AzCopy To Move Files To Azure Cloud Storage : Copy files between two storage accounts

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
Use AzCopy To Move Files To Azure Cloud Storage : Copy files to local system

Files will be copied successfully as below

Use AzCopy To Move Files To Azure Cloud Storage : Here are the files

I hope this helps you to work with Azure Storage.

Click to rate this post!
[Total: 5 Average: 4.8]

7 responses

  1. Sri Avatar
    Sri

    This article is good, but doesnt say how to move file, all it speaks is only about copying files, there is always a difference between copy and move

    1. Aruna Lakmal Avatar

      Hmmmmm….. I agree with your comments Sri. I will see whether I can update the article. Thanks for the comment! 😊

  2. Damien Nutt Avatar
    Damien Nutt

    still no instructions on how to move? thanks

    1. Aruna Lakmal Avatar

      Sorry Damien, what was that?

  3. Dave Avatar
    Dave

    You should change the wording of your article. I already know how to copy a file, I came here to see how to move a file, which means copy it from source to destination and remove it from source. I dont mean this to be as rude as it sounds but you say in one of your headings “Move Local Files to Azure Storage” and then you show the command to copy the file. In industry terminology move and copy are two different things

    1. Aruna Lakmal Avatar

      Hi Dave

      You are correct! I humbly accept the fact that you are highlighting here. I will change the title!

  4. Seniorita.Alia Avatar
    Seniorita.Alia

    Azcopy was my best, and because of CLI headache and some other reasons like Azcopy consumes all our bandwidth while transferring from windows server to Azure blob, we switched to Gs Richcopy 360 which has very helpful features like it can control the transferring speed, it has a nice and easy GUI, also it is so fast

Leave a Reply

Your email address will not be published. Required fields are marked *