- Print
- DarkLight
Configure Custom Exclusions using XML (Windows)
- Print
- DarkLight
Exclusions prevent all files and subfolders of a directory from being indexed or included in a Backblaze backup.
Changes were made to the Backblaze Computer Backup Windows client in version 4.1 and newer that make it easier to determine what is excluded and to set custom exclusions other than the standard folder, file size, or file type options.
In the new system, some exclusions are mandatory, including operating system files and program files. These exclusions are in the file named bzexcluderules_mandatory.xml located here: C:\Programdata\Backblaze\bzdata
.
You can view this file with a text editor, and it contains the permanent exclusion that Backblaze uses.
Exclusion Rules
You can edit the file bzexcluderules_editable.xml to create more robust rules to exclude data. To restore the defaults, you can remove the file. It returns when you perform your next backup.
The Support team does not troubleshoot the edits that are in this file, and they do not create rules.
If you contact the Support team regarding the editing of the bzexcluderules_editable.xml file, they will instruct you to delete the file, perform a backup, and generate the default file again.
- The
excludefname_rule
variable is case insensitive. - A file must match all of the criteria on the line to be excluded from backup.
- An
excludefname_rule
variable must specify all criteria. Use "*" to skip criteria. - The
skipFirstCharThenStartsWith
variable is "*" or must be at least four characters long. - All of the rules apply to all attached volumes. This means that all rules are applied to volumes C:\, D:\, E:\, etc.
Valid Operating System Versions (osVers
)
- Windows 7
- Windows 8
- Windows 10
- Windows 11
hasFileExtensiom
versus endsWith
: A "file extension" in this context is strictly defined as the last period followed by non-space, simple ASCII characters, and it does not contain a forward slash (/) or backslash (\). The endsWith
is more general in that it can have spaces and include either slash. The hasFileExtension
is faster and helps the code group the same file extensions together, so you should specify the hasFileExtension
, if possible.
Performance Hints
Always specify a skipFirstCharThenStartsWith
. It is very performant and assists with pruning 99% of files from undergoing additional criteria checks.
Internally, the code groups together many tests with identical startsWith
and skipFirstCharThenStartsWith
, so those comparisons are done only once (not once for each excludefname_rule
).
Next, you should specify hasFileExtension
if possible, or if not, then define endsWith
which results in faster performance than contains_1
and contains_2
.
The following block includes the optional Windows excludes that you can edit:
<?xml version="1.0" encoding="UTF-8" ?>
<bzexclusions>
<!-- This block is for Internet Explorer history and cache files -->
<excludefname_rule plat="win" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith=":\Users\" contains_1="*" contains_2="*" doesNotContain="*" endsWith="\microsoft\windows\webcache\webcachev01.dat" hasFileExtension="dat" />
<excludefname_rule plat="win" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith=":\Users\" contains_1="*" contains_2="*" doesNotContain="*" endsWith="\cookies\index.dat" hasFileExtension="dat" />
<excludefname_rule plat="win" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith=":\Users\" contains_1="*" contains_2="*" doesNotContain="*" endsWith="\recent\index.dat" hasFileExtension="dat" />
<excludefname_rule plat="win" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith=":\Users\" contains_1="*" contains_2="*" doesNotContain="*" endsWith="\userdata\index.dat" hasFileExtension="dat" />
<excludefname_rule plat="win" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith=":\Users\" contains_1="*" contains_2="*" doesNotContain="*" endsWith="\feeds cache\index.dat" hasFileExtension="dat" />
<!-- This block is for temporary internet files and cookies, temp folders -->
<excludefname_rule plat="win" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith=":\Users\" contains_1="\local settings\temporary internet files\" contains_2="*" doesNotContain="*" endsWith="*" hasFileExtension="*" />
<excludefname_rule plat="win" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith=":\Users\" contains_1="\windows\temporary internet files\" contains_2="*" doesNotContain="*" endsWith="*" hasFileExtension="*" />
<excludefname_rule plat="win" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith=":\Users\" contains_1="\microsoft\windows\cookies\" contains_2="\appdata\" doesNotContain="*" endsWith="*" hasFileExtension="*" />
<excludefname_rule plat="win" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith=":\Users\" contains_1="\appdata\local\packages\microsoft" contains_2="\cookies\" doesNotContain="*" endsWith="*" hasFileExtension="txt" />
<excludefname_rule plat="win" osVers="xp" ruleIsOptional="t" skipFirstCharThenStartsWith=":\Documents and Settings\" contains_1="\cookies\" contains_2="*" doesNotContain="*" endsWith="*" hasFileExtension="txt" />
<excludefname_rule plat="win" osVers="xp" ruleIsOptional="t" skipFirstCharThenStartsWith=":\Documents and Settings\" contains_1="\local settings\temp\" contains_2="*" doesNotContain="*" endsWith="*" hasFileExtension="*" />
<excludefname_rule plat="win" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith=":\Users\" contains_1="\appdata\local\temp\" contains_2="*" doesNotContain="*" endsWith="*" hasFileExtension="*" />
<excludefname_rule plat="win" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith=":\Users\" contains_1="\appdata\local\microsoft\windows\history\" contains_2="*" doesNotContain="*" endsWith="*" hasFileExtension="*" />
<excludefname_rule plat="win" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith=":\Users\" contains_1="\appdata\local\MicrosoftEdge\SharedCacheContainers\" contains_2="*" doesNotContain="*" endsWith="*" hasFileExtension="*" />
<!-- This block is for Microsoft Cortana -->
<excludefname_rule plat="win" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith=":\Users\" contains_1="\AppData\Local\Packages\Microsoft.Windows.Cortana" contains_2="*" doesNotContain="*" endsWith="*" hasFileExtension="*" />
<!-- This block is for temporary internet files and cookies, temp folders -->
<excludefname_rule plat="win" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith=":\Users\" contains_1="\local settings\temporary internet files\" contains_2="*" doesNotContain="*" endsWith="*" hasFileExtension="*" />
<excludefname_rule plat="win" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith=":\Users\" contains_1="\windows\temporary internet files\" contains_2="*" doesNotContain="*" endsWith="*" hasFileExtension="*" />
<excludefname_rule plat="win" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith=":\Users\" contains_1="\microsoft\windows\cookies\" contains_2="\appdata\" doesNotContain="*" endsWith="*" hasFileExtension="*" />
<excludefname_rule plat="win" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith=":\Users\" contains_1="\appdata\local\packages\microsoft" contains_2="\cookies\" doesNotContain="*" endsWith="*" hasFileExtension="txt" />
<excludefname_rule plat="win" osVers="xp" ruleIsOptional="t" skipFirstCharThenStartsWith=":\Documents and Settings\" contains_1="\cookies\" contains_2="*" doesNotContain="*" endsWith="*" hasFileExtension="txt" />
<excludefname_rule plat="win" osVers="xp" ruleIsOptional="t" skipFirstCharThenStartsWith=":\Documents and Settings\" contains_1="\local settings\temp\" contains_2="*" doesNotContain="*" endsWith="*" hasFileExtension="*" />
<excludefname_rule plat="win" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith=":\Users\" contains_1="\appdata\local\temp\" contains_2="*" doesNotContain="*" endsWith="*" hasFileExtension="*" />
<excludefname_rule plat="win" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith=":\Users\" contains_1="\appdata\local\microsoft\windows\history\" contains_2="*" doesNotContain="*" endsWith="*" hasFileExtension="*" />
<!-- This block is to exclude the Windows registry file which is 8 GBytes and changes every second of every day and is part of "programs" that can be reinstalled -->
<excludefname_rule plat="win" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith=":\Users\" contains_1="*" contains_2="*" doesNotContain="*" endsWith="\ntuser.dat" hasFileExtension="dat" />
<excludefname_rule plat="win" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith=":\Users\" contains_1="*" contains_2="*" doesNotContain="*" endsWith="\ntuser.dat.log" hasFileExtension="log" />
<excludefname_rule plat="win" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith=":\Users\" contains_1="*" contains_2="*" doesNotContain="*" endsWith="\ntuser.dat.log1" hasFileExtension="log1" />
<excludefname_rule plat="win" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith=":\Users\" contains_1="*" contains_2="*" doesNotContain="*" endsWith="\ntuser.dat.log2" hasFileExtension="log2" />
<excludefname_rule plat="win" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith=":\Users\" contains_1="*" contains_2="*" doesNotContain="*" endsWith="\microsoft\windows\usrclass.dat" hasFileExtension="dat" />
<excludefname_rule plat="win" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith=":\Users\" contains_1="*" contains_2="*" doesNotContain="*" endsWith="\microsoft\windows\usrclass.dat.log1" hasFileExtension="log1" />
<excludefname_rule plat="win" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith=":\Users\" contains_1="*" contains_2="*" doesNotContain="*" endsWith="\microsoft\windows\usrclass.dat.log2" hasFileExtension="log2" />
<excludefname_rule plat="win" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith=":\Users\" contains_1="\ntuser.dat" contains_2="*" doesNotContain="*" endsWith=".tm.blf" hasFileExtension="blf" />
<excludefname_rule plat="win" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith=":\Users\" contains_1="\usrclass.dat" contains_2="*" doesNotContain="*" endsWith=".tm.blf" hasFileExtension="blf" />
<excludefname_rule plat="win" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith="*" contains_1="*" contains_2="*" doesNotContain="*" endsWith="\ntuser.ini" hasFileExtension="ini" />
<!-- This block is for temporary Mozilla and Firefox files -->
<excludefname_rule plat="win" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith=":\Users\" contains_1="\appdata\local\mozilla\" contains_2="\cache\" doesNotContain="*" endsWith="*" hasFileExtension="*" />
<excludefname_rule plat="win" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith=":\Users\" contains_1="\local settings\application data\mozilla\" contains_2="\cache\" doesNotContain="*" endsWith="*" hasFileExtension="*" />
<!-- This block is for a web browser named "Flock" leaving temporary files around -->
<excludefname_rule plat="win" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith=":\Users\" contains_1="\flock\browser\profiles\" contains_2="\cache\" doesNotContain="*" endsWith="*" hasFileExtension="*" />
<excludefname_rule plat="win" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith=":\Users\" contains_1="\flock\browser\profiles\" contains_2="*" doesNotContain="*" endsWith="\urlclassifier3.sqlite" hasFileExtension="sqlite" />
<excludefname_rule plat="win" osVers="xp" ruleIsOptional="t" skipFirstCharThenStartsWith="*" contains_1="\flock\browser\profiles\" contains_2="\cache\" doesNotContain="*" endsWith="\urlclassifier3.sqlite" hasFileExtension="sqlite" />
<!-- This block is for temporary Google files -->
<excludefname_rule plat="win" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith=":\Users\" contains_1="\appdata\local\google\" contains_2="\appdata\local\google\chrome\user data" doesNotContain="bookmarks|shortcuts|preferences" endsWith="*" hasFileExtension="*" />
<excludefname_rule plat="win" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith=":\Users\" contains_1="\local settings\application data\google\" contains_2="*" doesNotContain="*" endsWith="*" hasFileExtension="*" />
<!-- This block is for Apple programs running on Windows like iTunes, Safari, etc-->
<excludefname_rule plat="win" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith="*" contains_1="\itunes\" contains_2="\itunes\itunes music\podcasts\" doesNotContain="*" endsWith="*" hasFileExtension="*" />
<excludefname_rule plat="win" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith="*" contains_1="\itunes\" contains_2="\itunes\itunes media\podcasts\" doesNotContain="*" endsWith="*" hasFileExtension="*" />
<!-- Below here is for Apple Laptop and Desktop Operating systems (OS X running on Macintosh) -->
<!-- Below here is for Apple Laptop and Desktop Operating systems (OS X running on Macintosh) -->
<!-- Below here is for Apple Laptop and Desktop Operating systems (OS X running on Macintosh) -->
<!-- Below here is for Apple Laptop and Desktop Operating systems (OS X running on Macintosh) -->
<!-- This block are the optional Apple OS X excludes the customer is allowed to edit -->
<!-- none specified here -->
<!-- Top level folders on OS X we absolutely do not want to back up because they contain executable software or temp files -->
<!-- Below here are rules that are VERY expensive to execute. No quick pruning of 90% of cases, forcing a lot of execution. Try to reduce the number of these! -->
<excludefname_rule plat="mac" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith="users/" contains_1="/itunes/" contains_2="/itunes/itunes music/podcasts/" doesNotContain="*" endsWith="*" hasFileExtension="*" /> <!-- Backblaze doesn't backup podcasts -->
<excludefname_rule plat="mac" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith="users/" contains_1="/itunes/" contains_2="/itunes/itunes media/podcasts/" doesNotContain="*" endsWith="*" hasFileExtension="*" /> <!-- Backblaze doesn't backup podcasts -->
<!-- Below here is for Google apps like Chrome -->
<excludefname_rule plat="mac" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith="users/" contains_1="/library/application support/google/chrome/" contains_2="/safe browsing" doesNotContain="*" endsWith="*" hasFileExtension="*" />
<excludefname_rule plat="mac" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith="users/" contains_1="/library/application support/google/chrome/default" contains_2="/history" doesNotContain="*" endsWith="*" hasFileExtension="*" />
<excludefname_rule plat="mac" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith="users/" contains_1="/library/application support/google/chrome/default" contains_2="/thumbnails" doesNotContain="*" endsWith="*" hasFileExtension="*" />
<excludefname_rule plat="mac" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith="users/" contains_1="/library/application support/google/chrome/default" contains_2="/archived history" doesNotContain="*" endsWith="*" hasFileExtension="*" />
<!-- Below here is for Firefox the web browser which caches things like: /Users/<login>/Library/Application Support/Firefox/Profiles/cvbqc0ko.default/cookies.txt -->
<excludefname_rule plat="mac" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith="users/" contains_1="/firefox/" contains_2="/library/caches/firefox/profiles/" doesNotContain="bookmark" endsWith="*" hasFileExtension="*" />
<excludefname_rule bzmergeblock="001" plat="mac" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith="users/" contains_1="/.dropbox/.dropbox" contains_2="*" doesNotContain="*" endsWith="*" hasFileExtension="cache" />
<excludefname_rule bzmergeblock="001" plat="mac" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith="users/" contains_1="/library/application support/spotify" contains_2="*" doesNotContain="*" endsWith="*" hasFileExtension="*" />
<excludefname_rule bzmergeblock="001" plat="mac" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith="users/" contains_1="/library/application support/slack" contains_2="*" doesNotContain="*" endsWith="*" hasFileExtension="*" />
<excludefname_rule bzmergeblock="001" plat="mac" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith="users/" contains_1="loginhelper" contains_2="*" doesNotContain="*" endsWith="*" hasFileExtension="app" />
<excludefname_rule bzmergeblock="001" plat="mac" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith="users/" contains_1="/library/Safari/" contains_2="/touch icons cache" doesNotContain="*" endsWith="*" hasFileExtension="*" />
<excludefname_rule bzmergeblock="001" plat="mac" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith="users/" contains_1="/library/Safari/" contains_2="/favicon cache" doesNotContain="*" endsWith="*" hasFileExtension="*" />
<excludefname_rule bzmergeblock="002" plat="mac" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith="users/" contains_1="/library/containers/com.docker.docker/" contains_2="*" doesNotContain="*" endsWith="*" hasFileExtension="*" />
</bzexclusions>