Skip to content
Randolph West edited this page Dec 20, 2016 · 1 revision

What?

To synchronise your on-premises SQL Server database files with Azure Blob Storage, you need an Azure Storage account, as well as a Container for storing the files.

Additionally, this tool is more effective with smaller SQL Server databases, as there is currently a 1 TB size limit with Azure Blob Storage.

If you have more than one database backing up to the same Container, with the same database name (e.g. different instances), the Restore part of this tool will fail. It is recommended that you back up each instance to a separate Container.

Once you have compiled the assembly, you will have the following files:

  • AzureBlobStorageSync.exe (Command-line executable that runs the sync)
  • AzureBlobStorageSync.exe.config (Configuration file for the command-line executable)
  • connections.config (Configuration file containing the Azure Storage Primary Access Key)
  • Microsoft.Azure.KeyVault.Core.dll (Azure Keyvault Storage Library, via NuGet)
  • Microsoft.Windows.Azure.Storage.dll (Azure Storage Library, via NuGet)
  • RemoteStorageHelper.dll (Library with all the sync and restore methods)

The command-line executable relies on the AzureBlobStorageSync.exe.config file for its settings.

How?

Use Windows Task Scheduler to schedule the Sync tool to start a few minutes after your transaction log backups have completed.

For example, if your log backups take place every fifteen minutes, starting on the hour, you can set this tool to run every fifteen minutes, starting at five minutes past the hour.

When setting up the scheduled task, ensure the working directory is set correctly, and make sure that the user associated with the task has permission to read from the local SQL Server backup location.

Files will download from smallest to largest. A file is downloaded even if the local version exists, if the sizes do not match.