If you don’t want Resilio Connect Agents to track and sync some files in your sync folder, use IgnoreList(Blacklist). There are two places where it lives.
- Default IgnoreList file, which is created inside .sync directory in the root of syncing directory for Sync jobs and destination agents for transfer jobs.
This is a UTF-8 encoded text file and mainly ignores system, cache, temporary and other similar files. You can remove any lines or add new ones
- Global File and foldername filter in Job Profile.
This ignore list applies to all agents in the job and extends default IgnoreList. Global IgnoreList can be used to ‘cancel’ some entries from default IgnoreList (see section “Whilelisting” below)
You can use either option or combine them. Global IgnoreList is easy to edit on Management Console and applies to agents in the job. Default IgnoreList file allows for some fine agent-level tuning.
If both options are used, the resulting IgnoreList for the agent will include entries from both lists combined.
If either IgnoreList is composed when creating the job, i.e. before it’s deployed on agents, agents won’t be indexing and calculating the ignored files in job’s size.
Global IgnoreList applies to all agents in a job.
To create and edit global IgnoreList before running the job, apply it under "Settings" tab when configuring a job. Create a new Job profile and fill its "File and folder name filter" parameter or use an already created profile.
It does not matter which slash (forward or backslash) you use for its entries, agents will resolve it themselves.
Local IgnoreList file
If you need some agents to have an individual list of ignored files, use default IgnoreList for that.
To create and edit default IgnoreList file before job, manually create .sync directory in the root of syncing directory for Sync jobs and destination agents for transfer jobs and place the IgnoreList file, attached at the bottom of this article, there.
Syntax for global IgnoreList is the same as for local. However, local Ignore List shall have the correct slash for their operating systems though.
Based on their IgnoreList file differences, agents will report a different number of files though show status ‘Synced’.
Ignoring files and folders
Important NoteIgnoreList is case sensitive!
- IgnoreList supports
?substitutes any single character in a filename
*substitutes a string of several (any number) characters in a filename
Example: Ignore all the .pdf files in the share.
Example: Ignore all
.txt files if their name is
abc followed by one symbol (any symbol).
Each line in the ignore list can represent both a directory and a file.
Example: Ignore all the files called
MyTest, as well as all the directories called
MyTest (including all their content and all subdirectories) in all folders and subfolders of a file tree within a job.
If an ignore filter consists of 2 or more components, it will be applied to the root of a sync folder.
Example: Ignore subfolder
CDE of folder
ABC which is located only in the root of a sync folder.
Example: Ignore all txt files in
FOO2 subfolders in the root of sync job. The folder
FOO2 itself is not ignored.
Presence of a delimiter character at the start of a filter also forces the filter to be applied to the root sync folder.
FOO folder (including all their content and all subdirectories) only in the root sync directory.
Double asterisk allows to ignore any amount of subfolders between root folder and target folder.
Example: Ignore folders
a/x/y/b and so on.
Example: If we use this Ignore List:
The following folder structure will behave this way:
\ABC //will be synced
CDE //will not be synced, ignored by ABC\CDE
FOO //will be synced
\123 //will be synced
ABC //will be synced
CDE //will be synced
Filename.pdf //will not be synced, ignored by *.pdf
\FOO //will not be synced, ignored by \FOO
QWER //will not be synced, ignored by \FOO
\FOO2 //will be synced
example.txt //will not be synced, ignored by FOO2\*.txt
When composing a filter consisting of 2 or more components, note that path delimiters are OS-dependent and not universal. So please do not forget to use
/ for Mac and unix-based OSes, while for Windows OSes use
Important Notethe IgnoreList is applied to the folder where it is contained and its subfolders. It will not work with the files that have already been synced.
Timings and delays
Once Agent has scanned and indexed the directory tree of a sync folder, all the structural info is going to be stored in its database and always passed to other peers (until you disconnect the sync folder). It means that if you create or edit your IgnoreList file after the directory is added to an Agent, the folder structure will always be fully synced, however, actual files / folders added to the ignore list will not be passed to other agents.
Resilio Connect re-reads IgnoreList every time it is changed or, if system notifications are not coming for some reason, every Rescan interval. We recommend to restart Agents if you want to apply changes in the IgnoreList immediately.
Whitelisting files and folders
Whitelisting works in a similar manner as ignoring, although you need to comply with one simple rule: whitelist rules must start with
! symbol (no quotes). Whitelist rules are always of higher priority than exclude rules, so their position in the list does not matter.
You can use global IgnoreList in Profile to force agents to sync entires that are ignored by default IgnoreList. For example, default IgnoreList on each agent has entry
~* meaning that agents won’t sync items starting with a tilde. Edit global IgnoreList in Profile and add line
!~* , all agents will start syncing new items starting with tilde. However, it may take up to one rescan interval for the Agent to detect new non-ignored entries.
To create a pure whitelist, the first (ignore) filter should be all files
* followed by a number of whitelist filters starting with
!. For example, the whitelist allowing only synchronization of PDF files in the root folder should look like:
This whitelist will allow to only synchronize PDF files in both root folder and all its subfolders, and will keep the subfolder structure:
Whitelisting subdirectories on some deeper levels is a bit tricky. it requires a level-by-level excluding and including of the desired subdirectories. Below is the sample filter and whitelist for this case
* !/Level_One /Level_One/* !/Level_One/Level_two /Level_One/Level_two/* !/Level_One/Level_two/Level_Three1
It's basically interpreted as "Ignore everything but folder Level_One; inside it ignore everything but Level_two; inside Level_two ignore everything but Level_Three1 and Level_Tree2" and so on until the desired subdirectory is reached.
Important NoteWhen using whitelisting, keep in mind that whitelisting rule has a priority over ignore rule, so can whitelist the entries that are already in default ignore list.
Level_Three1 folder has
DfsrPrivate inside of
/Level_One/Level_two/Level_Three1/DfsrPrivate, it will be synced. It is better to keep this folder ignored. Use this pattern to ignore all possible
DfsrPrivate folders or any you like from 1st to 4th level of
/Level_One and its subfolders:
In this ignore rule
DfsrPrivate is put to 5th level to override whitelisting rule which is set on 4th level.