Before starting on How to move files hosted on the azure container using Azcopy command line I highly recommend you to read below articles to know more information about Azure Storage types, features, how to create it, storage replication types, azure storage explorer and How to monitor your azure storage

  • Azure Storage information
  • What is Azcopy
  • Prerequisites
  • Azcopy command details
  • Check File using Azure Storage Explorer

IF you need to check all of my azure posts ➡ Latest Microsoft Azure Articles and Posts

Azure Storage information

What is Azcopy

Based on Microsoft description it is the command line used to copy the azure files and blobs to or from the storage account and the current version is Azcopy V10 for more information check this ➡ Post and this command line we can execute Using PowerShell or  Azure Storage Azcopy App and know more about the Azcopy command check this ➡ post.

Prerequisites

  • Download and install Azcopy V10 from this ➡ link  
  • set the Azcopy path and environment variables in Windows: After installation, the program will be installed into this path (C:\Program Files (x86)\Microsoft SDKs\Azure\AzCopy) take this path as copy and open (Control Panel\System and Security\System) than I the left side select Advanced system settings >> Advanced >> Environment Variables >> Click on Path >> Edit >> add the Azcopy path. For more information about how to set the environment variables in Windows check this ➡ post

Azcopy command details

Now after the installation we can open the PowerShell and connect to our azure portal using “Az Login” then we can write our Azcopy command line or you can open the Microsoft Azure Storage AzCopy application and write the Azcopy command and this command required some values in my example I need to take a copy from image hosted on folder “elmasry_azure_doc” and I need to copy it to folder “elmasryazuredoc2” and both folders under the same container

  • /dest: the destination of the folder you need to move your file if this folder under this same container of the source folder so the path will be the same only change the folder name at the end of the path otherwise try to take the URL path of the destination container and add on it the folder name you need to move the file to it
  • /pattern: the file name in my example azure-services.png and the file should be added between double quotation azure-services.png.
  • / Sourcekey: Azure storage account provide us two keys we can use any one of them to access the storage and it is providing also more secure way called SAS (Shared access signature) Just open the storage account in the left side select access key and take a copy from key1 or Key2
  • /Destkey: If the destination under the same storage account so the key will be the same key of the source key
azcopy /source:https://test.blob.core.windows.net/elmasryblobcontainers1/elmasry_azure_doc
/dest:https://test.blob.core.windows.net/elmasryblobcontainers1/elmasryazuredoc2 
/pattern:"azure-services.png"
/Sourcekey:"AXoxP+ss3Zielsdl5lKmvTpixo3ERHDWZor2CBl7sHdtEqTr6dmKVAJEcymGQmd5OXcWe0rd3rx3k8dGaDUNg=="
/Destkey:"AXoxP+ss3Zielsdl5lKmvTpixo3ERHDWZor2CBl7sHdtEqTr6dmKVAJEcymGQmd5OXcWe0rd3rx3k8dGaDUNg=="
Copy File Using Azcopy from Microsoft PowerShell
Copy File Using Azcopy from Microsoft Azure Storage AzCopy APP

Check File using Azure Storage Explorer

Now after the copy process if you need to check and validate the process you select an option from below:

  • Azure Storage: Open Azure Storage and open your container and check the destination folder
  • Storage Explorer preview: Open Azure portal and write on the search (Storage Explorer) using this service you can explorer all of your storage information
  • Microsoft Azure Storage explorer APP: Microsoft tool you can download it from ➡ here and install it on your PC then do login to your Azure account using your (Azure Email, Azure Storage access Key, Azure Storage SAS Shared access signature) and from it, you can check your files also “very helpful tool

Most of the Azure App you can download it from here ➡ SDKs and command-line tools

Keep Following Me

One thought on “Copy Files to or from Azure Storage using Azcopy

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.