Selective inclusion and exclusion
Overview
With selective backups, you 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.
Inclusion restricts backups
If no inclusions are set, all supported, non-excluded volumes are backed up.
IMPORTANT If any inclusions are set, those specified inclusions are the only data backed up.
Inclusion restriction example:
If you define inclusions for:
- C:\Users\datto\Documents
- C:\Users\datto\Downloads
Then only those two folders are backed up.
Everything else on the C:\ drive (and any other volumes) is excluded.
Wildcards
Use the following wildcards to define your backup policy:
? - A non-recursive wildcard that represents exactly one character.
* - A non-recursive wildcard that represents zero or more characters.
** - A recursive wildcard that substitutes for path segments.
It cannot be combined with other symbols (e.g., C:\Logs\**.log functions like a simple *).
Specify volumes by drive letter
Inclusions and exclusions use drive letters to specify a volume or all volumes:
- If you specify a drive letter (e.g., C:\), the selection applies only to that specific volume.
- If you specify a drive letter with a wildcard (e.g., *\), the selection applies to all volumes.
Volume-specific vs. cross-volume inclusions and exclusions
If an inclusion or exclusion starts with a drive letter (e.g., C:\), it applies only to that volume.
If the filter starts with "*\", it applies to all volumes.
- "C:\Data" applies to only C:\Data.
- "*\Data" applies to C:\Data, D:\Data, E:\Data, and all other available volumes.
Exclusion takes precedence
When applying rules to selective backups, exclusions take precedence over inclusions.
If an exclusion is set, the specified path is excluded from the backup, regardless of inclusions.
Bare Metal Restore is restricted by selective backup
Using selective backup 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?
Selective backup examples
Using the inclusion C:\Data\*.txt backs up all text files in the C:\Data directory, but does not back up text files in its sub-directories as shown below because inclusion restricts backups.
Using the inclusion C:\Data and the exclusion C:\Data\*.txt backs 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) are backed up as shown below.
Also, this inclusion restricts all backups outside the inclusion because inclusion restricts backups.
Using the inclusion C:\Data\**\*.txt backs up all text files in the C:\Data directory and all text files in its sub-directories.
Also, this inclusion restricts all backups outside the inclusion because inclusion restricts backups.
Using the inclusion C:\Users\*\Desktop backs up all user data under their desktop folder, but no other data because inclusion restricts backups.
Using the inclusion C:\Users\*\Desktop\**\*.txt backs up all text files under each users' Desktop folder, but no other data because inclusion restricts backups.
Using the inclusion C:\Users and the exclusion C:\Users\*\Desktop\**\*.txt backs up all files in the C:\Users directory and its sub-directories, except for text files in the desktop folder for each user, but no other data because inclusion restricts backups.
Using the inclusion *\Data backs up all Data directories on every volume, but no other data because inclusion restricts backups.
Using the inclusion *\**\*.txt backs up all .txt files on every volume, but no other data because inclusion restricts backups.
Using the inclusion *\Data\Services\Services??.txt backs up all text files located in the Services sub-directory inside the Data directories across all volumes, but no other data because inclusion restricts backups.
The files must start with "Services", followed by exactly two characters.
It does not matter what the two characters are.
"C:\Logs\**" matches all files in C:\Logs and all files in all child directories, recursively.
"C:\Logs\*.log" matches all .log files in C:\Logs
"C:\Logs\**\*.log" matches all .log files in C:\Logs and all files in all child directories, recursively.
"C:\Users\*\AppData\Roaming" matches the Roaming folder for all users.
"C:\Users\*\Documents\**\*.txt" matches all .txt files in all sub-directories of all users' Documents folders.










