0
votes

What is the best way to copy blobs of one container to another container using java api? I know that I can list container and then perform copy for every blob which is listed, but when I'd like to copy entire container from ARCHIVE tier to HOT tier this could take up to 15 hours. So what would be the best options to copy containers between tiers (archive -> hot|cold) while also having in mind the reliability and fault tolerance?

Note: I don't want to rehydrate the container, I just want to leave it where it is and only create copy of it for processing. I've found azure-storage-blob-batch where it's possible to change the tier of all blobs, but there's no copy.

I'm missing some concept of copy container to another container in azure java SDK with posibilities of progress monitoring.

Thanks

1
The basic method is to use the rest api to send the request to the server. Or you can find the java method based on rest api from this link.Bowman Zhu

1 Answers

1
votes

I think the way is to use azure rest api. you can have a look of this doc:

https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob-from-url

All operations performed on Azure are essentially request sent by the client and processed by the server.

You can write put requests using java according to the above document, which can achieve your idea.

Of course, operations like copyblob should be able to find the API from below link, you can look at the following documentation: (Find the ones related to blobclient)

https://azuresdkdocs.blob.core.windows.net/$web/java/azure-storage-blob/12.0.0/index.html