-
-
Notifications
You must be signed in to change notification settings - Fork 3
FileSync Configuration
The FileStorageSync.exe.config file includes a user-configurable section called <appSettings>
, which looks similar to this:
<appSettings>
<add key="LocalPath" value="C:\SQLData\Backup" />
<add key="RemotePath" value="\\SERVER\share" />
<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>
###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
.
###RemotePath
This is the UNC path (in the format \\SERVER\share
) for the location of your off-server backups. You can use any UNC path, including an Azure SMB File Share.
###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 UNC path (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 UNC path'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
.