How to Use File Filter Rule Syntax

Follow

Summary

This Knowledgebase article describes the File Filter Rule Syntax when configuring the Neverfail protected data set.


More Information

File filter rules are the means by which the set of files and directories to be replicated by the Neverfail Heartbeat system are configured. This set is commonly referred to as the “protected set”.

The protected set is specified by one or more filter rules. Up through V5.2[.n], these rules cannot be exclusive. For example, it is not possible to specify files and directories explicitly that should be excluded from the protected set.

Note: Neverfail identified in V5.2.2 and earlier that if the root of a drive or the Neverfail install directory is added to the file filter set (e.g. C:\**, D:\**, D:\<neverfail_install_directory>), Neverfail may experience problems replicating the Neverfail installation directory and/or the System Volume Information folder. This type of filter should not be included in a Neverfail Heartbeat V5.2.2 and earlier filter set as it may prevent Heartbeat from becoming fully synchronized, thus preventing a successful switchover or failover.

Starting with V5.3.0 and later, Neverfail Heartbeat will veto any attempt to add the root of a drive (e.g. C:\**) to a file filter thereby preventing the issue from arising.

Procedure

Explicitly Specifying Files and Directories

Filter rules can be used to specify files and directories explicitly. For example:

Rule 1: C:\protected\document.doc

This defines a protected set containing three entities:

C:\
C:\protected
C:\protected\document.doc

Note that directories and drives in the path to protected directories and/or files are implicitly in the protected set.

Although directories in themselves have no data content in the same sense as files, they do have various attributes that are replicated.

If (for whatever reason) C:\protected\document.doc existed on the file system as a directory, it would be in the protected set.

Similarly, if C:\protected existed on the file system as a file it would be in the protected set.

Specifying String Wildcards

Filter rules may incorporate string wildcards. For example:

Rule 1: C:\protected\*.doc

In this context, the * character means “any string” (including an empty string).

This defines a protected set containing:

C:\
C:\protected

As well as any file or directory, immediately under C:\protected whose name ends with “.doc”.

Filter rules may incorporate any number of * characters in this way. For example:

Rule 2: C:\protected\*.*

This defines a protected set containing:

C:\
C:\protected

As well as any file or directory immediately under C:\protected whose name contains ‘.’. Please note that the contents of sub-directories will not be protected. Refer to the section on Recursive Wildcards for this functionality.

String wildcards cannot be used in the context of drive letters. Drive letters must be specified explicitly.

Specifying Character Wildcards

Filter rules may include character wildcards. For example:

Rule 1: C:\protected\????

In this context the ‘?’ character means “any character”.

This defines a protected set containing any folder whose name consist of four characters.  For example:

C:\protected\user
C:\protected\data

Filter rules may incorporate any number of '?' characters in this way. Character wildcards cannot be used in the context of drive letters. Drive letters must be specified explicitly.

Specifying Recursive Wildcards

Filter rules may include recursive wildcards. For example:

Rule 1: C:\protected\**

This defines a protected set containing:

C:\
C:\protected

As well as any file or directory anywhere (i.e. recursively) under C:\protected

Use of recursive wildcards is restricted. They can only be used at the end of filter rules immediately following a backslash character. The  following examples are valid:

Rule 1: D:\**
Rule 2: C:\protected\**
Rule 3: C:\protected\anotherdirectory\**

The following are not valid:

Rule 1: D:\**\protected
Rule 2: C:\protected**
Rule 3: C:\protected\**.txt

Double slashes are NOT valid:

Rule 4: C:\\protected\\**


Applies To

All Versions


Related Information

None

KBID-298

0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.