Storage data on the cloud not merely with pure text data, blob were design for any kinds of unstructured format object(s), such as image(s), video/audio, documents…etc.
Blob has been applied to various area, including file server of a website, share folder for distributed application access, container of log files. This article will show you how to share blob files between blob to blob.
The first simple way, using GUI toolkit that provide by Microsoft Azure Storage Explorer. You could download here and connect to your storage account via connection string or azure account. More detail please refer to the link.
While connected to storage account, choose source blob file(s) under the container and click Download button to export to local computer. Repeat it file by file or folder by folder.
Next connected to destination storage account, choose destination blob in the container then click Upload button to import from local computer. Repeat it file by file or folder by folder.
It’s seems pretty simple, but you might aware that it was not pretty efficient and the speed of download/upload were not up to expectations.
Since version of 1.8 azure explorer introduce Azcopy indeed improve the download/upload performance.
So we would like to write utility for help us sharing blob files between blob to blob on the fly (means we won’t dumping all files into local’s), this might give us more flexible and power up the totals streaming:)
Let’s install client library: Microsoft.Azure.Storage.Blob via NuGet.
This library help us setup azure connection to azure storage and create method:
Friendly remind, the above example initial source and destination blob client for the function just for the demonstration, you just only initial once in the class.
The final step, we just need to give a collection of source file path you want to copy to and invoke example code in main method:
Reference