If you already have a community that uses the file system to store its files you can migrate those files Azure while your site is running(after the initial setup) in the background. This however requires you be running Telligent Community 10.3 or later. It also means that if you also plan to migrate your site to use Azure web sites, you must complete this migration process prior to moving the web site to Azure (as an Azure web application).
The migration itself works by taking your existing file storage provider and replacing it with the Azure storage provider while maintaining your current file system provider as a backup or fallback option. This means that initially you will not have any files in Azure but the provider will recognize this when it attempts to load a file not yet present in your storage account and instead load the file from your fallback provider.
The migration itself occurs as part of a scheduled job that by default runs at 2am UTC(You can adjust this like any recurring job). This job will load all of the existing file storage files and attempt to copy them to the Azure storage provider. Because this job is recurring, if a file encounters a problem, the next time the job runs it will re-attempt the upload. Administrators are notified when the process is complete.
Preparing for Migration
As with any operation that involves manipulation of the community data or its installation, you should take a full backup of the file storage, database and web files before you begin. It is also recommended that you try this in a non-production environment if at all possible.
You first need to install the Azure components which can be obtained from Telligent Support.
Installation and Configuration
Going forward your site will be configured to communicate to Azure as its primary file storage and your current, existing file storage becomes the fallback file storage. You need to refer to the following sections of How Do I Deploy my Site to Microsoft Azure? to set up Azure as your storage provider:
- Storage Account - This will provide guidance on how to configure your Azure storage account
- Preparation/Prepare Web and Job Files For Deployment - This will help you install the Azure components. The only difference is where this article refers to the "Telligent Community Installation Package" as the place to copy files to, you will be using your existing web installation directory.
You must stop all web and job servers when installing the Azure components.
Connection Strings
Update your existing connectionstrings.config
file in the web installation and job server installation to point to your storage account.
Note: The value for connectionString is provided in Azure portal under the keys area of the storage account properties:
<add name="AzureFilestorageContainer" connectionString="[Obtain from the Portal]" />
Configuration
Once you complete the setup from [How Do I Deploy my Site to Microsoft Azure?]] as described above, your web installation and job installation now has (or had) a communityserver_override_config
file with the appropriate configuration settings in it:
Note: This is an example, your section may have different values and or additional fields not shown here
<Override xpath="/CommunityServer/CentralizedFileStorage" mode="add" where="end">
<fileStoreGroup name="Azure"
default="true"
type="Telligent.Evolution.Azure.Filestorage.AzureBlobFilestorageProvider, Telligent.Evolution.Azure.Filestorage"
cdnUrl="https://yourcdn.azureedge.net"
/>
</Override>
Modify that section by adding the migrationSource
node as a child node of filestoreGroup
as shown below in both the web and job versions of this file.
<Override xpath="/CommunityServer/CentralizedFileStorage" mode="add" where="end">
<fileStoreGroup name="Azure"
default="true"
type="Telligent.Evolution.Azure.Filestorage.AzureBlobFilestorageProvider, Telligent.Evolution.Azure.Filestorage"
cdnUrl="https://yourcdn.azureedge.net"
>
<migrationSource name="FileStorageProvider" type="Telligent.Evolution.Extensibility.Storage.Providers.Version1.FileSystemFileStorageProvider, Telligent.Evolution.Platform" connectionStringName="FileStorage" />
</fileStoreGroup>
</Override>
Once you have successfully installed all the files and modified the configuration, you can start web site followed by the job server. From this moment on your site will be using Azure as its file storage, however when it cannot locate a file there, it will fallback and load the file from its original location.
Enabling the Job
Enable the job by going to the Administration area and locating the Centralized File Storage Migration Job under the Jobs section. When this job executes it will begin copying files over to Azure.
Once successfully complete, administrators will receive a system notification stating the job has completed successfully and the steps to now disabled the job (or see below).
If the job encounters errors, administrators will receive a system notification communicating there were errors with links to log files. Note: It is not uncommon in large operations for some files to fail. You should check these error log files for any errors that you may be able to correct. It is also advisable that if the issue is not immediately apparent or correctable, to allow the job to run at again at its scheduled time where it will try and rectify any issues from subsequent runs. If you continue to experience errors contact Support with the error log files provided in the notification.
Success
When migration ends successfully and you receive the system notification do the following:
- Disable the Centralized File Storage Migration Job in Administration
- Stop your web and job servers.
- Modify
communityserver_override.config
in both web and job servers and remove the<migrationSource/>
node you previously added. Save the files. - Restart the web and job servers.