Skip to content

AzureSync Configuration

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

The AzureBlobStorageSync.exe.config file includes a user-configurable section called <appSettings>, which looks similar to this:

<appSettings>
    <add key="Container" value="name_of_container" />
    <add key="LocalPath" value="C:\SQLData\Backup" />
	<add key="CopyFilesToRemoteStorage" value="True" />
	<add key="FetchFilesFromRemoteStorage" value="False" />
	<add key="DeleteMissingFilesFromRemoteStorage" value="False" />
	<add key="DeleteExplicitFilesFromRemoteStorage" value="False" />
	<add key="ExplicitFilesToDeleteMatchingString" value="file_name_string" />
</appSettings>

###Container

This is the name of the Azure Blob Storage Container you create in the Azure Portal. Note that this is not the same as the Storage Account, which is configured in the connections.config file.

###LocalPath

This is the location of your on-premises SQL Server database backups. This value will also accept a UNC path if you wish to run the Sync tool from a separate machine.

This value will be the same as the default Backup location specified when you configure Ola Hallengren's Maintenance Solution, usually in the form C:\SQLData\Backup.

###CopyFilesToRemoteStorage

This is a boolean setting which, if True, will upload any files to Remote Storage that exist on the local storage path, as specified in LocalPath, that do not appear in the Azure Blob Storage Container (the default condition).

The default value is True. If False, no files will be uploaded. This may be useful for when using the Sync tool for downloads only.

###FetchFilesFromRemoteStorage

This is a boolean setting which, if True, will download all files from Remote Storage that do not exist on the local storage path, as specified in LocalPath.

This setting is useful when migrating to a new server, to allow downloading the entire Container's contents.

###DeleteMissingFilesFromRemoteStorage

This is a Boolean setting which, if True, will delete all files in Remote Storage that do not exist on the local storage path, as specified in LocalPath.

If this setting is False, the behaviour will match the Infinite Lease, and no files will be deleted from Remote Storage.

###DeleteExplicitFilesFromRemoteStorage

This is a Boolean setting which, if True, will delete all files in Remote Storage that match the substring specified in ExplicitFilesToDeleteMatchingString.

If this setting is False, no files will be deleted from Remote Storage that match ExplicitFilesToDeleteMatchingString, even if this value is set.

###ExplicitFilesToDeleteMatchingString

This is a String setting, which is used by DeleteExplicitFilesFromRemoteStorage to delete all files in Remote Storage that match the value specified, as a substring. Any part of the file name that matches this string, will be deleted.

Please use this setting with caution. There is no Undo.

If this setting contains a value, no files will be deleted from Remote Storage if DeleteExplicitFilesFromAzure is set to False.

Clone this wiki locally