Dynamic Folder Exclusions in Syncrify


Imagine you want to backup only the Desktop, and Documents folders for every user on a machine. In order words, you only want to backup folders appearing in red below.

C:\Users
+---Jane Doe
|   +---Desktop
|   +---Documents
|   +---Downloads
|   +---Favorites
|   \---Pictures
\---John Doe
    +---Desktop
    +---Documents
    +---Downloads
    +---Favorites
    \---Pictures

One way to accomplish this goal is to individually add C:\Users\John Doe, and C:\Users\Jane Doe. Then, exclude the folders you do not want to backup. Although possible, this method is tedious, particularly on machines with many users.

Using Dynamic Folders Exclusions

Dynamic Folder Exclusions solves the problem mentioned above. Important: You must use build 1119 or above in order for this feature to work.

Follow the steps below to enable this option.

  • Open Windows Files Explorer, or Terminal on Linux and go to $INSTALL_DIR\config folder, where $INSTALL_DIR refers to folder where Syncrify Server is installed.
  • Create a new file called DynamicExclusions.xml
  • Paste the following contents in the file, or download it from here.
    <?xml version="1.0" encoding="UTF-8"?>
    <Exclusions>
      <DynamicExclusions>
        <DynamicExclusion>
          <Tlf>C:\Users</Tlf>
          <AdditionalDepth>1</AdditionalDepth>
          <SelFilter>Desktop/|Documents/</SelFilter>
        </DynamicExclusion>
      </DynamicExclusions>
    </Exclusions>

    Note:

    Text appearing in red signifies the part that could be different on your end.
  • There are 3 variables in this text that you may have to modify on your end. The table below explains each of them.
    TlfRefers to the value for a Top-level folder. This value must match with the desired top-level folder in Syncrify Client. This rule is skipped if no matching top-level folder is found. Consider the following image as an example:

    There are two top-level folders in this example. However, the rule will only apply to C:\Users, since that is the only value matching this parameter.
    AdditionalDepth Refers to the level of folders to go down. Since there is a gap of 1 level between C:\Users and C:\Users\John Doe\Desktop, this value is set to 1.
    SelFilter Refers to Selection Filter to apply. The value in this example is set to Desktop/|Documents/, implying only to include the Desktop, and the Documents folder. Every other folder will be excluded.

Important

Dynamic Exclusions apply to every client and will exclude non-matching folders if a matching Tlf value is found as a top-level folder in any profile.

How Dynamic Filters Work in Background

Before running backups, Syncrify Client contacts the server to pull this XML file and dynamically adds exclusion filters. These filters are also applied when viewing the file in the GUI. Refer to the image below, which demonstrates only Desktop and Documents folders are checked. Every other folder is skipped.

Navigation

Social Media

Powered by 10MinutesWeb.com