locked
Azcopy folder from VHD RRS feed

  • Question

  • Can you use Azcopy to copy a specific folder from an VM's VHD (ie c:\Documents) to a local disk? Or can you only download the entire VHD?

    Wednesday, March 4, 2015 7:33 PM

Answers

  • Hi,

    You cannot copy a subset of folders/files from within an unmounted vhd (i.e. just by specifying the name of the vhd as you have) to local disk. As you observed, this method only allows you to get the entire VHD.

    If the VHD is mounted as a data disk in an Azure VM and you are running azcopy in that VM, you can of course do this just as you would with any other mounted disk.

    Thanks,

    Wednesday, March 4, 2015 10:23 PM

All replies

  • Hi,

    Yes, you can copy specific folder(Single Blob) using AzCopy.

    Please refer: http://azure.microsoft.com/en-us/documentation/articles/storage-use-azcopy/

    Regards,

    Manu Rekhar

    Wednesday, March 4, 2015 7:58 PM
  • Thanks, This is the syntax I am using, but I can't get it to copy a single folder from the VHD

    AzCopy /Source:https://myaccount.blob.core.windows.net/vhds/datadisk1.vhd /Dest:C:\myfolder /SourceKey:key /S /XO /Y

    I looked over this documentation, but I couldn't figure it out. Do I have to use /Pattern: to copy the folder from the VHD. Since I have multiple VHDs in the container.



    • Edited by IFILECloud Wednesday, March 4, 2015 9:35 PM
    Wednesday, March 4, 2015 9:05 PM
  • Hi,

    You cannot copy a subset of folders/files from within an unmounted vhd (i.e. just by specifying the name of the vhd as you have) to local disk. As you observed, this method only allows you to get the entire VHD.

    If the VHD is mounted as a data disk in an Azure VM and you are running azcopy in that VM, you can of course do this just as you would with any other mounted disk.

    Thanks,

    Wednesday, March 4, 2015 10:23 PM
  • thanks, that answers my question. I was looking to be able to copy a folder to or from a mounted VHD of a VM that is shutdown. Like a backup or to sync data between to VMs.
    Wednesday, March 4, 2015 10:49 PM