locked
copy blobs between CloudBlobContainers ? RRS feed

  • Question

  • How do you copy the blob items between two different   CloudBlobContainers ?I would like to do a ListBlobs() on one container, and then write each blob to a different container. I tried changing the URI :

    CloudBlob destBlob = containerProd.GetBlobReference(newURI);
    					destBlob.CopyFromBlob(blob, null);

    But I get  a error : The copy source account and destination account must be the same."

    Thanks, Peter

    Wednesday, March 7, 2012 11:30 PM

Answers

  • Currently you can only copy blobs from one blob container to another in same storage account. Copying across storage account through "Copy" function is not yet available. For copying across storage accounts, you would need to download the blobs from source storage account and then upload them in the target storage account.

    Hope this helps.

    Thanks

    Gaurav Mantri

    Cerebrata Software

    http://www.cerebrata.com

    • Proposed as answer by navcode Thursday, March 8, 2012 8:12 AM
    • Marked as answer by peter clift Thursday, March 8, 2012 4:50 PM
    Thursday, March 8, 2012 4:49 AM