amazon s3 - How to Transfer files from Azure to AWS using C#? -


i have 200 gb of files in microsoft azure. want transfer aws s3.

is possible transfer files azure aws without downloading each file on local machine?

this code sample may file transfer, cannot avoid download of files machine executing code:

using system; using amazon.s3; using amazon.s3.transfer; using microsoft.windowsazure.storage; using microsoft.windowsazure.storage.auth; using microsoft.windowsazure.storage.blob;  namespace sample {     class uploadfilefromazuretos3     {         static string existingbucketname = "[bucket name]";         static string keyname = "[your object key]";          static void main(string[] args)         {             transferutility filetransferutility = new transferutility(new amazons3client(amazon.regionendpoint.useast1));              cloudstorageaccount storageaccount = cloudstorageaccount.parse("defaultendpointsprotocol=https;accountname=[storage account name];accountkey=[storage account primary key]");             cloudblobclient blobclient = storageaccount.createcloudblobclient();              cloudblobcontainer container = blobclient.getcontainerreference("[your container]");              cloudblockblob blockblob = container.getblockblobreference("[file name]");              using (var filetoupload = new memorystream())             {                 blockblob.downloadtostream(filetoupload);                 filetransferutility.upload(filetoupload, existingbucketname, keyname);             }         }     } } 

if need transfer files once, may use blob storage backup service redgate: https://cloudservices.red-gate.com/home/features#storagebackup (you have 10 day trial).


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -