There are some scenarios where you want to sync Blob Storage on Azure with Blob Storage on Azure Stack. This easily be done using the AzCopy tool. AzCopy is a command-line utility designed to copy data to and from Microsoft Azure blob and table storage using simple commands with optimal performance. You can copy data from one object to another within your storage account, or between storage accounts in Azure as well as in Azure Stack.
You can get AzCopy on Windows and AzCopy on Linux. You should get at least AzCopy version 7.1.0. In my example I use the version 8.0.0 preview version, which also works fine. Make also sure that you have deployed a supported version of Azure Stack. Check out my blog about updating Azure Stack to get more information.
After the installation you will find the AzCopy.exe in the “C:\Program Files (x86)\Microsoft SDKs\Azure\AzCopy”
How to Sync and copy files from Azure to Azure Stack
You can use AzCopy with Azure Stack as you would do in Microsoft Azure. To copy and Sync files you can use the following command. Be aware that synchronous data transfer between Azure storage and Azure Stack is not supported. There for you will need to specify the the /SyncCopy or –sync-copy parameter.
AzCopy /Source:https://azcopywithazs.blob.core.windows.net/thomasmaurer /Dest:https://azcopywithazs.blob.azurestack.thomasmaurer.ch/thomasmaurer /SourceKey:key1 /DestKey:key2 /S /SyncCopy
--source https://azcopywithazs.blob.core.windows.net/thomasmaurer/ \
--destination https://azcopywithazs.blob.azurestack.thomasmaurer.ch/thomasmaurer/ \
--source-key key1 \
--dest-key key2 \
--include "tm.txt" \
Of course this works in both directions and also between two different Azure Stack storage accounts.
You can find more about AzCopy on Azure Stack on the documentation page. If you have any questions feel free to comment on the blog post. There are other great storage tools which work great with the Microsoft Hybrid Cloud environment like Visual Studio or Azure Storage Explorer. These scenarios show perfectly how Microsoft built their hybrid cloud environment. Basically you can use the same tools, processes and knowhow in the Public Cloud as well as in your datacenter.