Azure Storage: use AzCopy.exe to copy a folder from blob storage to another storage account

naspinski picture naspinski · Jul 21, 2016 · Viewed 7.1k times · Source

Using AzCopy.exe, I am able to copy over an entire container successfully. However, I cannot figure out how to copy over a blob where the name includes a folder structure. I have tried the following:

.\AzCopy.exe /Source:https://sourceaccount.blob.core.windows.net/container /Dest:https://destaccount.blob.core.windows.net/container /SourceKey:sourceKey== /DestKey:destKey== /S /Pattern:CorruptZips/2013/6

While also changing the /Pattern: to things like:

  • /Pattern:CorruptZips/2013/6/*
  • /Pattern:CorruptZips/2013/6/.
  • /Pattern:CorruptZips/2013/6/

And everything just says that there are zero records copied. Can this be done or is it just for container/file copying? Thank you.

Answer

Peter Pan picture Peter Pan · Jul 25, 2016

@naspinski, there is the other tool named Azure Data Factory which can help copying a folder from a blob storage account to another one. Please refer to the article Move data to and from Azure Blob using Azure Data Factory to know it and follow the steps below to do.

  1. Create a Data Factory on Azure portal.
  2. Click the Copy Data button as below to move to the powercopytool interface, and follow the tips to copy the folder step by step.

enter image description here

enter image description here