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.
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.
Installation and Configuration
You will need to install the Azure components(obtainable from support for your version) as going forward your site will actually be fully configured to communicate to Azure as its primary file storage, and your existing filestorage becomes the fallback file storage. Do you you will need to refer to the following sections of How Do I Deploy my Site to Microsoft Azure?:
- 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.
Connection Strings
You will need update your existing connectionstrings.config file in your web installation AND job server installation to point to your storage account. You do so by adding the following connection string to that file and the value for connectionString should be the connectionString provided in the keys area of the storage account properties in the Azure portal:
<add name="AzureFilestorageContainer" connectionString="[Obtain from the Portal]" />
Configuration
If you completed 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 file titled communityserver_override.config with the appropriate configuration settings in it:
Note: This is for example only, 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 again 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.
Migration Jobs
The Migration itself is a recurring a job that will run daily at approximately 2am UTC(note the time reflected in the actual job may be adjusted for your timezone.). You can however change it like any job to run at a different time or more frequently however even though the job will not run if its already running, you should take into consideration how large your file storage is and how long it could take to upload each file.
The job will need to be manually enabled by going to the Administration area and locating the Centralized File Storage Migration Job under the jobs section or by searching. When this job executes it will begin copying files over to Azure. Once it's complete, if it was successful, administrators will receive a system notification stating it has completed successfully and the steps to take at that point (or see below). If it encounters errors, administrators will receive a system notification communicating there were errors with links to log files. 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
If the migration ends successfully and you receive the system notification saying so, the first thing to do is disable the Centralized File Storage Migration Job so that it will no longer run. Then stop your job and web servers and modify both the web and job communityserver_override.config file by removing the <migrationSource/> node you had added previously. You can then restart the web and job servers.