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 an inclusion for: C:\Users\datto\Documents
or /Users/datto/Documents, then only that one folder is backed up.
Everything else on all 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.
** cannot be combined with other symbols (e.g., C:\Logs\**.log and /Logs/**.log function like a simple *).
Specify volumes by drive letter
IMPORTANT When you specify drive-level inclusions or exclusions, the trailing backslash is required.C:\ works.C: does not.
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\ or /Data/ protects all data in the C:\Data or /Data directory, along with all data in its sub-directories as shown below. No data outside the defined inclusion is protected because .
NOTE Using C:\Data\** or /Data/** achieves the same result, but may increase processing time.
Using the exclusion C:\Data\ or /Data/ prevents all data in the C:\Data or /Data directory, as well as in its sub-directories, from being backed up. The C:\Data or /Data directory appears, but does not contain any data as shown below.
NOTE Using C:\Data\** or /Data/** achieves the same result, but may increase processing time.
Using the inclusion C:\Data\*.txt or /Data/*.txt backs up all text files in the C:\Data or /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 or /Data and the exclusion C:\Data\*.txt or /Data/*.txt backs up all files in the C:\Data or /Data directory, except for the text files. This exclusion applies only to files directly in C:\Data or /Data and does not affect sub-directories. The text files within sub-directories (C:\Data\Services or /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 or /Data/**/*.txt backs up all text files in the C:\Data or /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 or /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 or /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 or /Users and the exclusion C:\Users\*\Desktop\**\*.txt or /Users/*/Desktop/**/*.txt backs up all files in the C:\Users or /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 or /Volumes/*/Data backs up all Data directories on every volume, but no other data because inclusion restricts backups.
Using the inclusion *\**\*.txt or /**/*.txt backs up all .txt files on every volume, but no other data because inclusion restricts backups.
Using the inclusion *\Data\Services\Services??.txt or /Volumes/*/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\** or /var/log/**" matches all files in C:\Logs or /var/log and all files in all child directories, recursively.
"C:\Logs\*.log or /var/log/*.log" matches all .log files in C:\Logs or /var/log
"C:\Logs\**\*.log or /var/log/**/*.log" matches all .log files in C:\Logs or /var/log and all files in all child directories, recursively.
"C:\Users\*\AppData\Roaming or /Users/*/Library/Application Support" matches the Roaming or Library/Application Support folder for all users.
"C:\Users\*\Documents\**\*.txt or /Users/*/Documents/**/*.txt" matches all .txt files in all sub-directories of all users' Documents folders.










