Migrate existing media library files in an Azure Web App to Azure Storage

Michael Eustace asked on October 16, 2017 16:48

I am working with a Kentico EMS 9.0.46 instance hosted in an Azure Web App.

To help increase performance, we are considering moving the media files out of the web app and into an Azure Storage container, which we will then serve via the Azure CDN.

We have experience setting this up with brand new instances of Kentico (using the Kentico docs here and here), but my question is what is the migration path for moving existing media files from the website directory into Azure Storage?

We could start by adding the app settings keys CMSAzureAccountName, CMSAzureSharedKey, CMSAzurePublicContainer (to true) and CMSAzureCDNEndpoint, followed by extending the CMSModuleLoader partial class (as per above documentation link). I'm guessing this would take care of adding subsequently uploaded files to the CDN, but what about existing files in the file system - how would they get transferred to Azure Storage?

The problem here is that you now have media files in Azure Storage and in the Azure Web App, so what would the Media Library app display in Kentico? An amalgamation of the two?

Any thoughts or experience shared are most welcome and received.


Correct Answer

Brenden Kehren answered on October 16, 2017 17:56

Good start by adding/changing those settings in your instance. What you should also do is copy the media libraries from the file system to the blob storage using something like CloudBerry. After your changes are live and your files are in blob storage, things should work.

0 votesVote for this answer Unmark Correct answer

   Please, sign in to be able to submit a new answer.