Use this when folders must stay synchronized between servers.
DFS Replication
DFS Replication (DFSR) keeps folders synchronized between servers using remote differential compression, so only changed blocks cross the network. It also replicates SYSVOL between domain controllers.
1. Get-DfsrBacklog between members.
2. Events: 4012 (stale), 2213 (needs resume), 5002/5008 (connectivity).
3. Staging quota adequate.
4. Conflict/deleted folder.
5. Don't use for frequently open files concurrently.
changes detected → staged → replicated → installed on partners
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Common mistakes Narrow the fault
- Staging quota too small (event 4202).
- Using DFSR as a backup.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Deletes replicate like any other change.
- Undersized staging quotas slow replication.
- Backlog shows how far members are behind.
Get-DfsnRoot— namespacesGet-DfsnFolderTarget -Path <path>— folder targets and stateGet-DfsrBacklog -GroupName <g> -FolderName <f> -SourceComputerName <a> -DestinationComputerName <b>— DFSR backlogdfsrdiag replicationstate— replication statedfsutil /pktinfo— client referral cache
ReferenceWhy it matters1 section · depth on demand
How it works
DFS Replication (DFSR) keeps folders in sync between servers. It detects changes through the NTFS USN journal, then sends only changed blocks (Remote Differential Compression) and uses a staging folder to prepare files. It is multi-master: conflicts are resolved by last writer wins, and the losing file goes to ConflictAndDeleted. DFSR also replicates SYSVOL on domain controllers.
ReferenceImportant terms & boundaries2 sections · depth on demand
In depth
Backlog — the number that tells you if replication keeps up
PS C:\> Get-DfsrBacklog -GroupName RG-Data -FolderName Data -SourceComputerName fs01 -DestinationComputerName fs02 -Verbose
VERBOSE: No backlog for the replicated folder named "Data"
PS C:\> (Get-DfsrBacklog -GroupName RG-Data -FolderName Data -SourceComputerName fs01 -DestinationComputerName fs02).Count
Check both directions. A backlog that grows during working hours and empties overnight is capacity; a backlog that never decreases is a fault.
Staging quota sizing
DFSR builds files in a staging folder before sending them. If the quota is smaller than the largest files in flight, it cleans up repeatedly (event 4202/4204) and replication slows down. A common rule of thumb is a staging quota at least the size of the 32 largest files in the replicated folder:
Get-ChildItem D:\Data -Recurse -File | Sort Length -Descending | Select -First 32 | Measure Length -Sum
Set-DfsrMembership -GroupName RG-Data -FolderName Data -ComputerName fs02 -StagingPathQuotaInMB 32768
Event IDs worth alerting on (DFS Replication log)
| Event | Meaning |
|---|---|
| 4202 / 4204 | Staging high watermark / cleanup |
| 4412 | File conflict — the losing version moved to ConflictAndDeleted |
| 2213 | Replication paused after a dirty shutdown; needs manual resume |
| 5002 / 5008 | Cannot communicate with partner |
| 4012 | Member disconnected longer than MaxOfflineTimeInDays — content no longer replicates |
Design rules
- DFSR replicates last writer wins; it is not a locking system. Two users editing the same file on different members create conflicts.
- It is not a backup: deletions replicate too.
- RDC (remote differential compression, mentioned in Microsoft's DFSR overview) helps over slow links for large changed files; on fast LANs it can cost more CPU than it saves.
- Use
Write-DfsrHealthReportfor a full HTML health report across members.
*The DFS Replication backlog checks above are illustrative examples, not captured from a lab or production system.*
Commands
Get-DfsReplicationGroup
Get-DfsrBacklog -GroupName RG1 -FolderName Data -SourceComputerName fs01 -DestinationComputerName fs02
dfsrdiag pollad
Documented example, not captured output.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in DFS → DFS Replication. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://learn.microsoft.com/en-us/windows-server/storage/dfs-namespaces/dfs-overview · confidence 94%