DFS Replication overview
Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012, Windows Server 2008 R2, Windows Server 2008
DFS Replication is a role service in Windows Server that enables you to efficiently replicate folders (including those referred to by a DFS namespace path) across multiple servers and sites. DFS Replication is an efficient, multiple-master replication engine that you can use to keep folders synchronized between servers across limited bandwidth network connections. It replaces the File Replication Service (FRS) as the replication engine for DFS Namespaces.
Consider using Azure File Sync to reduce your on-premises storage footprint. Azure File Sync can keep multiple Windows file servers in sync and each one only needs to keep a cache on-premises while the full copy of the data is in the cloud. Azure File Sync also has the additional benefit of cloud backup with integrated snapshots. For more information, see Planning for an Azure File Sync deployment.
Active Directory Domain Services (AD DS) uses DFS Replication for replicating the SYSVOL folder in domains that use the Windows Server 2008 or later domain functional level. For more information about replicating SYSVOL using DFS Replication, see Migrate the SYSVOL replication to DFS Replication.
DFS Replication uses a compression algorithm known as remote differential compression (RDC). RDC detects changes to the data in a file and enables DFS Replication to replicate only the changed file blocks instead of the entire file.
To use DFS Replication, you must create replication groups and add replicated folders to the groups. Replication groups, replicated folders, and members are illustrated in the following figure.
This figure shows that a replication group is a set of servers, known as members, which participate in the replication of one or more replicated folders. A replicated folder is a folder that stays synchronized on each member. In the figure, there are two replicated folders: Projects and Proposals. As the data changes in each replicated folder, the changes are replicated across connections between the members of the replication group. The connections between all members form the replication topology. Creating multiple replicated folders in a single replication group simplifies the process of deploying replicated folders because the topology, schedule, and bandwidth throttling for the replication group are applied to each replicated folder. To deploy additional replicated folders, you can use Dfsradmin.exe or a follow the instructions in a wizard to define the local path and permissions for the new replicated folder.
Each replicated folder has unique settings, such as file and subfolder filters, so that you can filter out different files and subfolders for each replicated folder.
The replicated folders stored on each member can be located on different volumes in the member, and the replicated folders do not need to be shared folders or part of a namespace. However, the DFS Management snap-in makes it easy to share replicated folders and optionally publish them in an existing namespace.
You can administer DFS Replication by using DFS Management, the DfsrAdmin and Dfsrdiag commands, or scripts that call WMI.
Before you can deploy DFS Replication, you must configure your servers as follows:
- Update the Active Directory Domain Services (AD DS) schema to include Windows Server 2003 R2 or later schema additions. You cannot use read-only replicated folders with the Windows Server 2003 R2 or older schema additions.
- Ensure that all servers in a replication group are located in the same forest. You cannot enable replication across servers in different forests.
- Install DFS Replication on all servers that will act as members of a replication group.
- Contact your antivirus software vendor to check that your antivirus software is compatible with DFS Replication.
- Locate any folders that you want to replicate on volumes formatted with the NTFS file system. DFS Replication does not support the Resilient File System (ReFS) or the FAT file system. DFS Replication also does not support replicating content stored on Cluster Shared Volumes.
Interoperability with Azure virtual machines
Using DFS Replication on a virtual machine in Azure has been tested with Windows Server; however, there are some limitations and requirements that you must follow.
- Using snapshots or saved states to restore a server running DFS Replication for replication of anything other than the SYSVOL folder causes DFS Replication to fail, which requires special database recovery steps. Similarly, don't export, clone, or copy the virtual machines. For more information, see article 2517913 in the Microsoft Knowledge Base, and Safely Virtualizing DFSR.
- When backing up data in a replicated folder housed in a virtual machine, you must use backup software from within the guest virtual machine.
- DFS Replication requires access to physical or virtualized domain controllers – it can't communicate directly with Azure AD.
- DFS Replication requires a VPN connection between your on premises replication group members and any members hosted in Azure VMs. You also need to configure the on premises router (such as Forefront Threat Management Gateway) to allow the RPC Endpoint Mapper (port 135) and a randomly assigned port between 49152 and 65535 to pass over the VPN connection. You can use the Set-DfsrMachineConfiguration cmdlet or the Dfsrdiag command-line tool to specify a static port instead of the random port. For more information about how to specify a static port for DFS Replication, see Set-DfsrServiceConfiguration. For information about related ports to open for managing Windows Server, see article 832017 in the Microsoft Knowledge Base.
To learn about how to get started with Azure virtual machines, visit the Microsoft Azure web site.
Installing DFS Replication
DFS Replication is a part of the File and Storage Services role. The management tools for DFS (DFS Management, the DFS Replication module for Windows PowerShell, and command-line tools) are installed separately as part of the Remote Server Administration Tools.
Install DFS Replication by using Windows Admin Center, Server Manager, or PowerShell, as described in the next sections.
To install DFS by using Server Manager
Open Server Manager, click Manage, and then click Add Roles and Features. The Add Roles and Features Wizard appears.
On the Server Selection page, select the server or virtual hard disk (VHD) of an offline virtual machine on which you want to install DFS.
Select the role services and features that you want to install.
To install the DFS Replication service, on the Server Roles page, select DFS Replication.
To install only the DFS Management Tools, on the Features page, expand Remote Server Administration Tools, Role Administration Tools, expand File Services Tools, and then select DFS Management Tools.
DFS Management Tools installs the DFS Management snap-in, the DFS Replication and DFS Namespaces modules for Windows PowerShell, and command-line tools, but it does not install any DFS services on the server.
To install DFS Replication by using Windows PowerShell
Open a Windows PowerShell session with elevated user rights, and then type the following command, where
<name\> is the role service or feature that you want to install (see the following table for a list of relevant role service or feature names):
|Role service or feature||Name|
|DFS Management Tools||
For example, to install the Distributed File System Tools portion of the Remote Server Administration Tools feature, type:
To install the DFS Replication, and the Distributed File System Tools portions of the Remote Server Administration Tools feature, type:
Install-WindowsFeature "FS-DFS-Replication", "RSAT-DFS-Mgmt-Con"