3

Whenever I try to copy Archive blobs to a different storage account and changing its tier in destination. I am getting the following error:

Copy source blob has been modified. ErrorCode: CannotVerifyCopySource

I have tried copying Hot/Cool blobs to Hot/Cool/Archive. I am facing the issue only while copying Archive to Hot/Cool/Archive. Also, there is no issue while copying within same storage account.

I am using Azure python SDK:

blob_url = source_block_blob_service.make_blob_url(copy_from_container, blob_name, sas_token = sas)

dest_blob_service.copy_blob(copy_to_container, blob_name, blob_url, requires_sync = True, standard_blob_tier = 'Hot')

2 Answers 2

1

The reason you're getting this error is because copying an archived blob is only supported in the same storage account and you're trying it across different storage account.

From the REST API documentation page:

Copying Archived Blob (version 2018-11-09 and newer)

An archived blob can be copied to a new blob within the same storage account. This will still leave the initially archived blob as is. When copying an archived blob as source the request must contain the header x-ms-access-tier indicating the tier of the destination blob. The data will be eventually copied to the destination blob.

Sign up to request clarification or add additional context in comments.

Comments

0

While a blob is in the archive access tier, it's considered offline and can't be read or modified.

https://learn.microsoft.com/en-us/azure/storage/blobs/storage-blob-rehydration

To read the blob, you either need to rehydrate it first. Or, as described in the link above, you can also use the CopyBlob operation. I am not sure if the python SDK copy_blob() operation uses that API behind the scenes - maybe not if it did not work that way for you.

1 Comment

This has changed with the latest release of Storage REST API. Now you can change the access tier of the blob as part of copy operation. Please see this for more details: learn.microsoft.com/en-us/rest/api/storageservices/copy-blob

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.