Design Decisions, Defaults and Behavior for FRS File and Folder Filters in DFS and SYSVOL Replica Sets (229928)



The information in this article applies to:

  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Datacenter Server

This article was previously published under Q229928

SUMMARY

The File Replication service (FRS) is a multi-threaded, multi-master replication engine that replaces the LMREPL service in Microsoft Windows NT versions 3.x and 4.0. Windows 2000 domain controllers and servers use FRS to replicate system policy and login scripts for Windows 2000 and down-level clients.

Optionally, FRS can replicate content between Windows 2000 servers hosting the same fault-tolerant Distributed File System (DFS) roots or child-node replicas.

This article describes how filters are applied to files and folders in FRS replicated SYSVOL and DFS replica trees. The following topics are discussed in some detail:

  • Design decisions for file and folder filters
  • How filters are applied
  • Default File and Folder Filters
  • Modifying file and folder filters in the Registry and Active Directory
  • Other files excluded by FRS
  • File and Folder Filter Behavior

MORE INFORMATION

Design Decisions for File and Folder filters.

During the design the following questions were considered to determine what how FRS should handle file and folder extensions:

  • "What should happen to the rename of a file to a file with a filtered name?"
  • "What should happen to existing files when the filter string is changed?"
  • "Should files or folders matching an excluded extension be deleted?
  • What if the filter change was an accident?
To ease administration, prevent data loss and unintentional data inconsistency between members, the following decisions and assumptions were implemented:

  1. File and folder filters apply to the initial create of the file or directory
  2. File and folder filters will never cause existing files to get deleted
  3. Files and directories not subject to a filter during create will continue to replicate to avoid unintentional data inconsistency between replica members
  4. Files and directories not subject to filters during create should be moved out of the replica directory tree when administrators don't want them considered for replication
  5. Files and directories are only deleted by the administrator or user with delete permissions in the local or shared directory

How filters are applied

NTFRS monitors the USN journal of NTFS 5.0 formatted partitions for closed files on directories where replication has been configured. Next, file and folder filters defined in Active Directory, the registry or in lieu of those, internal defaults in the binary itself, are applied before a file is considered for replication. The compiled in default is only used if no value is supplied in either the DS or the Registry.

Default File and Folder Filters

Out of the box, no filters defined in Active Directory or the Registry so FRS uses built-in defaults, excluding files with the following signatures:

~*
*.TMP
*.BAK

.
Excluding *.tmp, *.bak and ~* files prevents replication when Microsoft Office data files are located on FRS replicated directories. Folder filters are not defined in the registry, active directory or NTFRS.EXE binary so all directory names are replicated.

Modifying file and folder filters in the Registry

To set FRS filters in the Windows registry, add or modify the following values under HKLM\SYSTEM\CCS\NTFRS\PARAMETERS:

"Directory Exclusion Filter List" (REG_SZ)
"File Exclusion Filter List" (REG_SZ)


Multiple file or folder filter extensions can be defined in they registry using the comma as a delimiter (*.doc,*.tmp,*.dmp,*.bak).
Notes on setting file and folder filters in the registry:

  • The "Directory / File Exclusion Filter List" registry values do not exist in a default install of Windows 2000 and must be created.
  • File and folder filters in the registry apply to all replica sets hosted by the member computer
  • Registry based File and folder filters the apply only to the FRS member on which they are set. In this way you could prevent outbound replication of files excluded by a file or folder filter.
  • Registry based file and folder filters are not dependent on Active Directory replication.
Because they are global to all replica sets and cannot be modified when a member computer is offline, registry based file and folder filters are less commonly used than their Active Directory counterparts.

Modifying file and folder filters in Active Directory

File and Folder filters in Active Directory are maintained for each FRS replica set in a given domain.

Filters in Active Directory can be viewed or modified with the "Users and Computers" snap-in, or a suitable LDAP editor such as ADSIEDIT.MSC or LDP.EXE. To view and edit the filters in the "Users and Computers" snap-in, enable the "Advanced Features" option from the View menu.

Two attributes, the FrsFileFilter and FrsFolderFilter attribute on the NTFRSReplica object in the domain naming context define file and directory names that are excluded for replication by the File Replication service.

The DN path and object class for the FrsFileFilter and FrsFolderFilter attributes on a domain controller in the A.COM domain hosting SYSVOL and an FRS replicated fault-tolerant DFS \\A.COM\DFSFT would be:

Path                                        Object Class

DC=A,DC=COM                                 Domain				
 CN=SYSTEM                                  Container
  CN=File Replication Service               NTFRSSettings
   CN=Domain System Volume                  NTFRSReplicaSet 
   CN=DFSFT                                 NTFRSReplicaSet
					


In the "Users and Computers" snap-in, folder and file filters can be viewed and modified in the "Directory Filter and "File Filter" fields of the "Replica Set" tab for each FRS replica set under the DN path "CN=File Replication Service,CN=System,DC=<Domain Name>

Multiple file or folder filter extensions can be defined in Active Directory using the comma as a delimiter (*.doc,*.tmp,*.dmp,*.bak).

Alternatively, to replicate all files and directories, set an explicit file and folder filter of "," (the comma character) on the NTFRSReplicaSet object. FRS will pick up the change once Active Directory (AD) replicates in the change and the FRS service polls subsequently polls the AD. FRS polling is described in MS KB article:

Q221111: Description of FRS Entries in the Registry

.

The table below shows how the final filter is formed when settings are defined in Active Directory and \ or the registry.

Filter in DSFilter in RegistryResulting filter string Used
NullNullInternal Default
NullYesValue in registry
YesNullValue in DS
YesYesValue in DS + Value in registry

For more detailed information on FRS File and Folder filters, see MSKB article:

Q296944: How to Use FRS File and Directory Filters



Other files excluded by FRS

In addition to files and directories excluded by filters, replication does not occur for the following cases:

  • EFS-enabled files and folders. EFS-encrypted files are computer-specific and excluded from replication.
  • Changes to a file or folder's last access time.
  • Changes to a file or folder's Archive bit.
  • NTFS mount points.

Example File and Folder Filter Behavior


When applying filters on NTFRS-Replica-Set objects to prevent files on the the Windows 2000 system volume or replicated Distributed File System (DFS) volumes from being replicated. The following rules apply:
  • File filters apply to file name extensions. Filters defined to the left of an extension (for example, "File_000.*") are ignored.
  • Long file name extensions (such as .temp) are supported.
  • Filters are applied only to new files created or copied to the replica set. Existing files renamed to a filtered extension are replicated, subject to normal FRS operation.

Assume that filters for the SYSVOL replica set are set to exclude files with .tmp and .bak extensions for the following scenarios:
  • Action: Create file named Memo.doc.
    Result: New file not excluded by filter: replicated.
  • Action: Create file named Memo.bak.
    Result: New file excluded by filter: not replicated.
  • Action: Rename existing Memo.doc file to Memo.tmp.
    Result: Existing file renamed to excluded extension: replicated.
  • Action: Create file named Memo.temp.
    Result: New file not excluded by filter: replicated.
Similar rules apply to directories in DFS or SYSVOL replica sets. Assume that a folder filter has been set to exclude folders with the extension ".old " for the following scenarios:

Action: Create folder named Memos.old in the command prompt.
Result: New folder and all sub-folders excluded by folder filter: not replicated. Action: Create folder named Memos.old in EXPLORER.
Result: New folder and all sub-folders not excluded by filter: replicated. When creating new directories, EXPLORER.EXE first creates the directory "New Folder", then prompts the user for the desired directory name. FRS filters do not apply to renamed files and folders


Modification Type:MajorLast Reviewed:11/13/2003
Keywords:kbenv kbinfo KB229928