Skip to content
Randolph West edited this page Feb 11, 2018 · 2 revisions

What?

When restoring your on-premises SQL Server database files from Azure Blob Storage, you need to know your Azure Storage account details, the Container where the files are stored, and the name of the database.

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), 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:

  • AzureBlobStorageRestore.exe (Command-line executable that runs the restore)
  • AzureBlobStorageRestore.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 AzureBlobStorageRestore.exe.config file for its settings.

How?

This tool can be run manually in the case of emergency, or as part of a process to test database backups.

As long as the working directory is set correctly, and that all requisite files are in that working directory, the testing process can be scripted in almost any manner, because the name of the generated restore script is fully customisable.

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