How to use AzCopy to copy files from one storage account to another Azure Storage account in Microsoft Azure

How to use AzCopy to copy files from one storage account to another Azure Storage account in Microsoft Azure

Table of contents

No heading

No headings in the article.

In this post, I will be walking you through how to copy multiple files from one storage account in Azure to another. The source storage account in this example is named reggiestorage37 and the destination is reggiestorage36 meaning I am copying files from the container named reggiecontainer in reggiestorage37 to another container named reggiecontainer1 in reggiestorage36.

1st step is to open the cloud shell in the Azure portal and verify if it is authenticated in this example I am using the bash shell.

in the above diagram click on 1 to open the cloud shell, then check 2 to make sure it is a bash shell as the commands I will be using will be in bash as in Linux-like.

in the above diagram, I used the command azcopy login status to check if my cloud shell has been authenticated.

in the above diagram I clicked on 1 and then 2 to copy the tenant-id.

here I did the azcopy login --tenant-id (then pasted the tenant id I copied previously) as shown in the diagram though I grayed it out due to security reasons and then copied the 2 into the web as shown below.

in the above diagram, I pasted the temporary code generated into the web and click the next button.

then here I selected my email for the Azure portal where I want to access the cloud shell from.

I just follow the prompts by clicking continue

then here as shown in the above diagram I closed the browser.

as you can see from the diagram above it said login succeeded.

then in this step, I clicked on container properties to get the source URL for the copy.

I copied the URL here as shown in the diagram above.

here I used the storage explorer to get the necessary permissions as shown in the diagram above and then I clicked create.

here I copied the SAS token for the source URL for reggiecontainer as shown in the diagram above.

The above diagram is for the destination URL of the container reggiecontainer1.

I copied the URL here as shown in the diagram above.

here I copied the SAS token for the destination URL.

as shown in the diagram above I then used azcopy copy 'source URL(SAS token)' 'destination URL(SAS token)' --recursive to copy all the files in the container reggiecontainer to reggiecontainer1.

here are some of the files in reggiecontainer on the Azure portal.

here are some of the files in reggiecontainer on the Azure storage explorer

here is proof that the files in reggiecontainer are in reggiecontainer1 on the Azure portal.

here is proof that the files in reggiecontainer are in reggiecontainer1 on the Azure storage explorer.

I hope this post was helpful, if you find it please like, comment and

share.