Search code examples
azureazure-blob-storageazure-storageazure-storage-account

How to copy a particular version of a azure blob between storage accounts?


I need to copy a particular version of the azure blob from the source storage account to a destination storage account. Is there any approach to do that?

I just saw a command like this. But it downloads the version to local storage. But I need to copy the version directly to another storage account.

Azcopy copy https://sarahnotes.blob.core.windows.net/quicknotes/music.txt "C:users/saleandownloads/azurestorage" –list-of-versions="versions.txt"

When I tried to replace the destination with an azure blob storage path, it says that it must be a local folder.

Either source is not a blob or destination is not a local folder


Solution

  • Thank you for the confirmation that the issue was resolved @Sashin Sahasra

    Thanks Gaurav Mantri ,Posting your suggestion in comments as an answer,

    You should append version id to the source if the destination is not local like below :

    azcopy copy “<SourceblobURI><version_id=<blobversionId>?<SAS_token>” “<destinationblobURI>?<SAS_token>”