Azure:无法将存档 blob 从一个存储帐户复制到另一个存储帐户?
Azure: Unable to copy Archive blobs from one storage account to another?
每当我尝试将存档 blob 复制到不同的存储帐户并更改其目标层时。我收到以下错误:
Copy source blob has been modified. ErrorCode: CannotVerifyCopySource
我试过将 Hot/Cool blob 复制到 Hot/Cool/Archive。我仅在将 Archive 复制到 Hot/Cool/Archive 时遇到此问题。此外,在同一存储帐户内复制时也没有问题。
我正在使用 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')
While a blob is in the archive access tier, it's considered offline and can't be read or modified.
https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-rehydration
要读取 blob,您需要先将其再水化。或者,如上文link所述,也可以使用CopyBlob操作。我不确定 python SDK copy_blob() 操作是否在幕后使用 API - 如果它不适合您,可能不会。
你收到此错误的原因是因为复制存档的 blob 仅在同一存储帐户中受支持,而你正在跨不同的存储帐户进行尝试。
来自 REST API
文档页面:
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.
每当我尝试将存档 blob 复制到不同的存储帐户并更改其目标层时。我收到以下错误:
Copy source blob has been modified. ErrorCode: CannotVerifyCopySource
我试过将 Hot/Cool blob 复制到 Hot/Cool/Archive。我仅在将 Archive 复制到 Hot/Cool/Archive 时遇到此问题。此外,在同一存储帐户内复制时也没有问题。
我正在使用 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')
While a blob is in the archive access tier, it's considered offline and can't be read or modified.
https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-rehydration
要读取 blob,您需要先将其再水化。或者,如上文link所述,也可以使用CopyBlob操作。我不确定 python SDK copy_blob() 操作是否在幕后使用 API - 如果它不适合您,可能不会。
你收到此错误的原因是因为复制存档的 blob 仅在同一存储帐户中受支持,而你正在跨不同的存储帐户进行尝试。
来自 REST API
文档页面:
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.