How to Use Windows Server DFS (Distributed File System) to Replicate Data

If your company has a main office in New York and a branch office in London, sharing files can be a nightmare. If the London team needs to open a 500MB CAD file stored on the New York file server, they have to pull that data across the transatlantic VPN, resulting in crippling load times. The solution is Distributed File System (DFS). DFS allows you to create a local file server in London and a local file server in New York, and have them automatically, seamlessly replicate data in the background, so users always access files at LAN speeds.

Understanding DFS Components

DFS consists of two distinct technologies that work together:

  1. DFS Namespaces: This creates a single, logical folder structure (e.g., \\company.local\Shared). Users map a drive to this one address, and DFS automatically routes them to the physical server that is geographically closest to them.
  2. DFS Replication (DFS-R): This is the background engine that synchronizes the actual files between the servers. It uses Remote Differential Compression (RDC) to only sync the changed blocks of a file, minimizing WAN bandwidth usage.

Step 1: Install the DFS Roles

You must install the DFS roles on both the New York (Server 1) and London (Server 2) servers.

  1. Open Server Manager and click Add roles and features.
  2. Expand File and Storage Services > File and iSCSI Services.
  3. Check the boxes for DFS Namespaces and DFS Replication.
  4. Complete the installation on both servers.

Step 2: Create the DFS Namespace

On your primary server (Server 1):

  1. Open the DFS Management console from Administrative Tools.
  2. Right-click Namespaces and select New Namespace…
  3. Enter the name of Server 1.
  4. Give the namespace a name (e.g., “Public”).
  5. Choose Domain-based namespace. This makes the path \\yourdomain.com\Public.
  6. Complete the wizard.

Step 3: Create the Folder Targets

Now you link actual physical folders to the virtual namespace.

  1. In the DFS console, select your new namespace.
  2. Right-click and select New Folder… (Name it something like “Projects”).
  3. Click Add… to add folder targets.
  4. Add the network share path from Server 1 (e.g., \\Server1\ProjectsShare) and click OK.
  5. Click Add… again and add the network share path from Server 2 (e.g., \\Server2\ProjectsShare).

Users going to \\yourdomain.com\Public\Projects will now be routed to either Server 1 or Server 2.

Step 4: Configure DFS Replication

Now you must tell the servers to keep those two target folders synchronized.

  1. When you click OK after adding the second folder target in the previous step, a prompt will appear asking if you want to create a replication group. Click Yes.
  2. The Replication Group wizard will launch. The group name and folders will be pre-populated.
  3. Primary Member: Select Server 1. This is the server that holds the authoritative “master” copy of the data for the very first initial sync.
  4. Topology: Choose Full Mesh (both servers sync to each other).
  5. Schedule and Bandwidth: This is critical. You can choose to replicate continuously (Full bandwidth), or you can create a custom schedule. For example, you can limit DFS-R to only use 1 Mbps of bandwidth during business hours, but allow it full bandwidth at night.
  6. Complete the wizard.

Step 5: Verify Replication

The initial replication can take hours or days depending on the amount of data. To verify it is working, create a simple text file in the mapped drive from a New York computer. Within a few seconds (or minutes, depending on your schedule), that file should appear in the physical folder on the London server, proving that DFS-R is successfully synchronizing the data across the globe.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.