Selective inclusion and exclusion
Overview
With selective backups, you can define custom inclusions and exclusions for folder paths or volumes you choose, so that all of your selected data, and only your selected data, is backed up.
For example, you can specify Windows paths and files to include or exclude. However, be aware that using selective backups affects your ability to perform a bare metal restore.
IMPORTANT DO NOT attempt a bare metal restore if critical Windows components were excluded. For example: C:\Windows, C:\Program Files, or C:\Program Files (x86).
IMPORTANT By default, Microsoft automatically excludes certain files, such as .OST files, from being captured in Volume Shadow Copy Service (VSS) snapshots. For more information, see Why are temp and .ost files excluded from backups?
Wildcards
You can use the following wildcards to define your backup policy:
? - A simple, non-recursive wildcard that represents exactly one character.
* - A simple, non-recursive wildcard that represents zero or more characters.
** - A recursive wildcard that can substitute entire path segments.
It cannot be combined with other symbols (e.g., C:\Logs\**.log will function like a simple *).
Volumes
Since Windows uses drive letters for volumes, inclusions and exclusions can be applied to a specific volume or all volumes:
If you use an inclusion and/or exclusion with a drive letter (e.g., C:\), the selection will apply only to that specific volume.
If you use an inclusion and/or exclusion with a wildcard (e.g., *\), it will apply to all volumes.
Precedence
When applying rules to selective backups, exclusions take precedence over inclusions.
If neither inclusion nor exclusion is set, all supported volumes will be backed up.
If an exclusion is set, the specified path will be excluded from the backup, regardless of any inclusion rules.
If an inclusion is set with no exclusions, the specified inclusion will be the only one backed up.
Examples

Using the exclusion C:\Data\ or C:/Data/ will prevent all data in the C:\Data directory, as well as in its sub-directories, from being backed up. The Data directory will appear, but it will not contain any data as shown below.
NOTE Using C:\Data\** or C/Data/** will achieve the same result but may increase processing time.

Using the inclusion C:\Data or C:/Data and the exclusion C:\Data\*.txt or C:/Data/*.txt will back up all files in the C:\Data directory, except for the text files. This exclusion applies only to files directly in C:\Data and does not affect sub-directories. The text files within sub-directories (C:\Data\Services) will still be backed up as shown below.

Using the inclusion *\Data\Services\Services??.txt or */Data/Services/Services??.txt will back up all text files located in the Services subdirectory inside the Data directory, across all volumes. The files must start with "Services" and be followed by exactly two characters (it does not matter what the two characters are).

"C:\Logs\**" will match all files in C:\Logs and all files in all child directories, recursively.
"C:\Logs\*.log" will match all .log files in C:\Logs
"C:\Logs\**\*.log" will match all .log files in C:\Logs and all files in all child directories, recursively.
"C:\Users\*\AppData\Roaming" will match the Roaming folder for all users.
"C:\Users\*\Documents\**\*.txt" will match all .txt files in all sub-directories of all users' Documents folder.

Since Windows uses drive letters for volumes, inclusions and exclusions can be applied to a specific volume or all volumes: If the inclusions and exclusions starts with a drive letter (e.g., C:\), it applies only to that volume.
If the filter starts with "*\", it applies to all volumes.
Examples: "C:\Data" applies to only C:\Data.
"*\Data" applies to C:\Data, D:\Data, E:\Data, and similarly for all other available volumes.