Skip to content

Ignoring and whitelisting files on Agents (File and folder name filter)

Overview

To exclude selected files in the Job folder from being tracked and transferred, define and apply an ignore list. The list is available on global and local levels. The global list is defined in a Job Profile and it's applied to all Agents participating in the Job. The local ignore list is maintained in a text file in the .sync folder and its entries apply only to the given Agent.

You can use either of them, or both. In case of the latter, the resulting ignore list for the Agent will include entries from both lists combined.

Overriding local ignore list

Global list's entries supersede those in the local ignore list. For more information, see Whitelisting files and folders.

Timings and delays

Once Agent has scanned and indexed the directory tree of a sync folder, all the structural information 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 Active Everywhere processes the IgnoreList every time it is changed or, if system notifications are not coming through, every re-scan interval. We recommend to restart Agents if you want to apply changes in the IgnoreList immediately.

Local IgnoreList

The local ignore list is defined in the IgnoreList file that's automatically created in the .sync folder located in the root of the Job folder. It is an UTF-8 encoded text file containing a number of default entries such as system, cache or temporary files. You can add or remove entries to fine tune the behavior of the Agent in the given Job.

To create and edit the default IgnoreList file before creating a Job, create the .sync folder in the root of the Job folder on the participating Agents (in case of Distribution and Consolidation jobs, do it on the destination Agents) and copy the IgnoreList file to it.

Info

The IgnoreList is applied to the folder where it is contained and its sub-folders. It will not work with the files that have already been synchronized.

Note

Depending on their local ignore lists, Agents participating in the same job will report different file counts.

360002250559

Global IgnoreList

The global ignore list is defined in the Files and folder name filter parameter in a Job Profile.

File Folder Name Parameter

When you assign a Job Profile to a Job, the ignore list is applied to all of the participating Agents.

To create and apply a global ignore list when creating a Job, on the PROFILE tab select:

  • Previously created Job Profile

    1. Select a previously created Job Profile, then click EDIT.
    2. Select the File and folder name filter parameter, and click Edit....
      Previously Created Job Profile
    3. Provide a list of files excluded from transfer, then click Change. For details, see Ignoring files and folders.
  • Unique for this job

    1. Select Unique for this job.
    2. Locate the File and folder name filter parameter, and click Edit....
      Unique For This Job
    3. Provide a list of files excluded from transfer, then click Change. For details, see Ignoring files and folders.
  • Add new profile

    1. Select -- Add new profile --.
    2. Select the File and folder name filter parameter, and click Edit....
      Previously Created Job Profile
    3. Provide a list of files excluded from transfer, then click Change. For details, see Ignoring files and folders.

Tip

To create or edit the ignore list associated with the Default Job Profile, you have to edit the profile before creating a Job.

Note

If either ignore list is composed when creating the job, i.e. before it’s deployed on Agents, the Agents won’t be indexing and calculating the ignored files in job’s size.

Ignoring files and folders

Warning

  • The ignore list is case sensitive.
  • For global ignore lists, you can use either forward or back slash characters as delimiters and the Management Console will resolve them accordingly when they're dispatched to Agents.
  • For local ignore lists, you must ensure the correct slash characters specific to the operating system.

Wildcards

  • IgnoreList supports ?, * and ** wildcard symbols.
  • ? substitutes any single character in a filename
  • * substitutes a string of several (any number) characters in a filename
  • ** substitutes any number of directories in a multi-component filter

Example: Ignore all the .pdf files in the share

*.pdf

Example: Ignore all .txt files if their name is abc followed by one symbol (any symbol)

abc?.txt

Paths

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.

MyTest

Note, that files or folders with extension (like MyTest.txt) won't be ignored in this case. The extension must be explicitly defined. For example, ignoring all files and folders with any extension use the filter

MyTest.*

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.

ABC\CDE

Example: Ignore all txt files in FOO2 subfolders in the root of sync job. The folder FOO2 itself is not ignored.

FOO2\*.txt

Presence of a delimiter character at the start of a filter also forces the filter to be applied to the root sync folder.

Example: Ignore FOO folder (including all their content and all subdirectories) only in the root sync directory.

\FOO

Double asterisk allows to ignore any amount of subfolders between root folder and target folder.

Example: Ignore folders a/b, a/x/b, a/x/y/b and so on.

a/**/b

Example: If we use this Ignore List:

*.pdf  
ABC\CDE  
\FOO  
FOO2\*.txt

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

Delimiters

When composing a filter consisting of two or more components, note that path delimiters are OS-specific and not universal. Make sure to use / for macOS and unix-based operating systems and \ for Windows operating systems.

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 local 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:

*  
!*.pdf

This whitelist will allow to only synchronize PDF files in both root folder and all its subfolders, and will keep the subfolder structure:

*.*  
!*.pdf

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  
!/Level_One/Level_two/Level_Three2

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.

Warning

When 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.

For example:

*  
!/Level_One  
/Level_One/*  
!/Level_One/Level_two  
/Level_One/Level_two/*  
!/Level_One/Level_two/Level_Three1

If Level_Three1 folder has DfsrPrivate inside of Level_Three1/ /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:

/**/**/**/**/DfsrPrivate

In this ignore rule DfsrPrivate is put to 5th level to override whitelisting rule which is set on 4th level.

Whitelisting Tilde

Sometimes the tilde character "~" is used to push file names to the top of the folder in users' environments at the user's discretion. Please keep in mind that this character is in the default ignorelist due to its use in temporary files that do not need syncing, and therefore any files or folders containing this character will not be synced by default.

To get around this issue and sync the folders and files with the "~" as part of their name, while ignoring temporary files that use this naming convention, configure your ignore list as follows:

  1. Navigate to Profiles.
  2. Locate and select your active Job Profile, then click Edit.
  3. Add the create_ignorelist custom parameter to disable the local ignore list:

    1. Click Add custom parameter.
    2. Search and add the create_ignorelist parameter.
    3. Set its value to false, then click Save.
      Create Ignorelist Custom Parameter
  4. Create a global ignore list from scratch:

    1. Locate and select the File and folder filter parameter, then click Edit....
    2. Copy and paste the contents of this file to initiate the global ignore list.
    3. Remove ~* and *~ entries.
    4. Add file extensions (temporary files) you do want ignored in the following format: ~*.<extension>.

    Ignoring temporary text files with ~*.txt

    $RECYCLE.BIN
    $Recycle.Bin
    System Volume Information
    ehthumbs.db
    desktop.ini
    Thumbs.db
    lost+found
    .DocumentRevisions-V100
    .TemporaryItems
    .fseventsd
    .iCloud
    .DS_Store
    .DS_Store?
    .Spotlight-V100
    .Trashes
    .Trash-*
    .~lock.*
    *.part
    *.filepart
    .csync_journal.db
    .csync_journal.db.tmp
    *.swn
    *.swp
    *.swo
    *.crdownload
    .@__thumb
    .thumbnails
    ._*
    *.tmp
    *.tmp.chck
    .dropbox
    .dropbox.attr
    .dropbox.cache
    .streams
    .caches
    .Statuses
    .teamdrive
    .SynologyWorkingDirectory
    @eaDir
    @SynoResource
    #SynoRecycle
    #snapshot
    #recycle
    .!@#$recycle
    DfsrPrivate
    ~*.txt
    

Starting with empty IgnoreList

Starting with Resilio Active Everywhere v3.6.0, it's possible to create jobs with a completely empty ignore list, meaning that the Agent will try and synchronize absolutely everything in the folder, even some temporary, lock, partial files created by other applications or the system itself. Note, that this may lead to synchronization problems.

Before creating the job add the create_ignorelist:false custom parameter to the Job Profile. In this case, the Agents in the job won't create their local IgnoreList file. Also, the Agent will ignore the already existing IgnoreList for concurrent Job runs Jobs recreated with the same path.