0
votes

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

1
Are you using any SDK to perform the copy operation? Please edit your question and include that, the code you have written so far and the issues you are running into.Gaurav Mantri
I haven't use any SDK. I need to know whether there is any approach to do it. It can be either SDK or CLI. Thank you!Sashin Sahasra
Can you try by appending version id to the source? Something like https://sarahnotes.blob.core.windows.net/quicknotes/music.txt?versionid=<your blob version id>?Gaurav Mantri
I have already appended SAS token to it. sarahnotes.blob.core.windows.net/quicknotes/music.txt?[SAS token]. Is there any way to append both SAS token and version id to it?Sashin Sahasra
You should be able to do it.Gaurav Mantri

1 Answers

1
votes

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>”