Loading Posts...

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.

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]

Aruna Fernando

"Sharing knowledge doesn't put your job at risk - iron sharpen iron" I heard this and it's true.

Get Updates Directly To Your Inbox!

   

Show 7 comments

Leave a Comment

Loading Posts...