1
votes

I am trying to copy a blob that is archived to an online tier. For that I am using the 8.4.0 API version (from August 2019), and I have also tried using the CLI.

However I am getting always this error: "This operation is no permitted on an archived blob."

In this page is clear that azure allows to copy an archived blob to an online tier.

Anyone knows how this can be done in java?

I am using the only function I know to copy a blob in java: destinationBlob.startCopy(sourceBlob);

Thanks.

1

1 Answers

0
votes

Based this official doc indicated :

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.

Only API version after 2018-11-09 will support copying archived blobs. As you mentioned , you are using Azure Storage Java SDK V8 which has been moved to and stopped updating on 2018-9-24. I assume that the reason that you got this error.

Anyway , you can follow the official doc and using REST API to copy archived files .