DFS Replication — Staging, Conflict Resolution, and Quotas
A closer look at what actually happens inside DFS Replication between a file changing and it landing on every other member — the staging folder, the conflict resolution rule, and the quotas that decide when either one starts throwing warnings.
A local cache of files queued to send or currently being received — not a second copy of the whole replicated folder.
Where the “losing” version of a simultaneously edited file, or a deleted file, gets preserved instead of destroyed.
Soft limits, not hard caps — DFSR cleans up the oldest files once a folder crosses its configured size.
What Is the Staging Folder?
DFS Replication never sends a file straight from its location in the replicated folder to a partner server. It first stages the file — copies it into a hidden DfsrPrivate\Staging folder under the replicated folder’s local path — and replicates from there. The same happens in reverse: an inbound file lands in staging before DFSR moves it into place.
Think of the staging folder as a loading dock, not a warehouse. Files pass through it on their way in or out; they don’t live there permanently, and the dock only needs to be big enough to hold what’s actively moving through it, not everything the warehouse contains.
Staging exists because DFSR needs a stable copy of a file to compute Remote Differential Compression (RDC) deltas against and to transfer without interference from whatever is still writing to the live file. Files are staged on the sending member when a receiving member requests them — skipped only if the file is 64 KB or smaller (256 KB or smaller with RDC disabled) — and staged on the receiving member as they arrive if under 64 KB, a threshold configurable between 16 KB and 1 MB.
Why Active Directory Cares About DFSR
DFS Replication is not just a file-server convenience feature. Starting with Windows Server version 1709, a server can no longer be promoted as a domain controller into a domain that still uses the File Replication Service (FRS) to replicate SYSVOL — the promotion fails outright, with an error stating the domain must migrate to DFS Replication first.
That makes DFSR part of the authentication path, not just file sharing: SYSVOL carries Group Policy Objects and logon scripts to every domain controller, and a staging or Conflict and Deleted folder that’s badly undersized on a DC can delay GPOs reaching a site exactly the way a broken replication topology can.
How DFSR Resolves Conflicts
A conflict happens when two members modify the same file before either change has replicated to the other. DFS Replication resolves it with one rule: the version saved most recently wins. The losing version is moved — not deleted — into the DfsrPrivate\ConflictAndDeleted folder on whichever member detects and resolves the conflict.
The same folder catches a related case: two members creating a folder with the same name at the same time. The old File Replication Service handled this by renaming one of the two folders in place — the “morphed folder name” problem, where a folder unexpectedly turns up with a suffix like _NTFRS_000add30 appended. DFSR avoids that specific failure mode: instead of renaming a folder in place, it moves the losing folder into Conflict and Deleted and leaves the winning folder under its original name.
Most recently saved version wins; the older version moves to Conflict and Deleted.
One folder keeps its name; the other is moved into Conflict and Deleted instead of renamed in place, avoiding the old morphed-folder-name problem.
By default, a file deleted on one member is preserved in Conflict and Deleted on every other member, not silently removed.
Every item DFSR preserves this way is logged in ConflictAndDeletedManifest.xml (for conflicts and deletions) or PreExistingManifest.xml (for files found unexpectedly during initial replication), both under the replicated folder’s DfsrPrivate folder. Files in Conflict and Deleted are renamed and are only accessible to the local Administrators group, but their ACLs are preserved, and the manifest records each file’s original name and path.
Recovering a preserved file uses two PowerShell cmdlets: Get-DfsrPreservedFiles reads a manifest and lists what it contains, and Restore-DfsrPreservedFiles moves the files back out, either to their original location or to a new path.
# List everything currently preserved in Conflict and Deleted for a replicated folder
Get-DfsrPreservedFiles -Path "D:\RF01\DfsrPrivate\ConflictAndDeletedManifest.xml"
# Restore those files to their original location, keeping every preserved version
Restore-DfsrPreservedFiles -Path "D:\RF01\DfsrPrivate\ConflictAndDeletedManifest.xml" -RestoreToOrigin -RestoreAllVersions
Configuring the Staging and Conflict and Deleted Quotas
Both quotas are set per replicated folder, per member — a member with three replicated folders has three independent staging folders and three independent Conflict and Deleted folders, each with its own quota. In DFS Management, under the Replication node, select the replication group, open the Memberships tab, right-click the replicated folder on the member to change, and choose Properties: the Staging tab holds the staging quota and path, the Advanced tab holds the Conflict and Deleted quota.
The PowerShell equivalent, Set-DfsrMembership (available since Windows Server 2012 R2), sets both in one call:
# View current quotas and paths for a membership
Get-DfsrMembership -GroupName "RG01" -ComputerName "SRV01" |
Select-Object ComputerName, FolderName, StagingPathQuotaInMB, ConflictAndDeletedQuotaInMB
# Raise the staging quota to 32 GB and the Conflict and Deleted quota to 4 GB
Set-DfsrMembership -GroupName "RG01" -FolderName "RF01" -ComputerName "SRV01" `
-StagingPathQuotaInMB 32768 -ConflictAndDeletedQuotaInMB 4096
| Setting | Default | Notes |
|---|---|---|
| Staging folder quota | 4,096 MB | Per replicated folder, per member. Cleanup starts at 90% of quota, stops at 60%. |
| Conflict and Deleted quota | 660 MB | Same per-folder, per-member scope. Same 90% / 60% watermark behaviour. |
Set-DfsrServiceConfiguration cmdlet, but the defaults are reasonable for most environments and rarely need touching.
Sizing the Staging Quota
The staging quota needs to be at least as large as the 32 largest files in the replicated folder — 16 largest for a read-only replicated folder. Below that minimum, DFSR can end up re-staging the same large files repeatedly to fit within the quota, which costs CPU and disk I/O and can stall replication rather than merely slow it. Initial replication is the worst case, since every existing file in the folder needs staging at least once.
# Calculate the minimum staging quota, in GB, for a replicated folder
# (use 16 instead of 32 for a read-only replicated folder)
(Get-ChildItem "D:\RF01" -Recurse -Force |
Sort-Object Length -Descending |
Select-Object -First 32 |
Measure-Object -Property Length -Sum).Sum / 1GB
Diagnosing Replication and Backlog
A backlog — files that haven’t replicated from one member to another yet — is not automatically a problem; it reflects normal latency under a schedule or a burst of changes. It’s worth checking whenever staging events suggest a folder is under pressure, or before assuming a change simply “didn’t replicate”.
# Count and list unreplicated changes from SRV02 (source) to SRV01 (destination)
# for a specific replication group and replicated folder
Get-DfsrBacklog -GroupName "RG01" -FolderName "RF01" -SourceComputerName "SRV02" -DestinationComputerName "SRV01" -Verbose
# Same check from the older dfsrdiag.exe utility, useful when the DFSR PowerShell
# module isn't available (e.g. checking SYSVOL from a script targeting older DCs)
dfsrdiag backlog /rgname:"Domain System Volume" /rfname:"SYSVOL Share" /smem:DC01 /rmem:DC02
# Confirm the DFS Replication role is actually installed before troubleshooting further
Get-WindowsFeature FS-DFS-Replication
Staging Event Cheat Sheet
These events are all logged to the DFS Replication event log and describe the same underlying condition at different severities — most environments will see 4202 and 4204 regularly without anything being wrong.
| Event ID | Severity | Meaning |
|---|---|---|
| 4202 | Warning | Staging space is above the high watermark; DFSR is deleting the oldest staged files. Normal under regular load. |
| 4204 | Informational | Cleanup from a 4202 event finished successfully; staging space is back below the watermark. |
| 4206 | Warning | Cleanup failed to free enough space. Large files may fail to replicate. DFSR retries automatically. |
| 4208 | Warning | Staging usage is still above quota after cleanup ran. Abnormal — the quota is genuinely too small for current activity. |
| 4212 | Error | The staging path itself is invalid or inaccessible; the replicated folder cannot replicate at all. |
Staging and Conflict Issues
| Symptom | Likely Cause | Fix |
|---|---|---|
| Replication of large files is slow or repeatedly stalls | Staging quota is below the 32-largest-files minimum, forcing DFSR to re-stage the same files. | Calculate the true minimum with the sizing script above, then raise it well above that floor with Set-DfsrMembership -StagingPathQuotaInMB. |
| Event 4208 recurring on the same replicated folder | Staging usage is exceeding quota even after automatic cleanup — sustained activity outpacing the configured size. | Increase the staging quota roughly 20 percent and monitor; repeat if 4208 keeps recurring. |
| Event 4212 — staging path invalid or inaccessible | The staging folder’s disk was removed, the path was deleted outside of DFSR, or permissions were changed on it. | Confirm the path in Get-DfsrMembership‘s StagingPath property still exists and is reachable, and restore it or reset the path via Set-DfsrMembership -StagingPath. |
| An expected file is missing after two servers were edited independently | DFSR resolved a conflict — the file now sitting in Conflict and Deleted lost because it wasn’t the most recently saved version. | Use Get-DfsrPreservedFiles against that folder’s ConflictAndDeletedManifest.xml to find it, then Restore-DfsrPreservedFiles to bring it back. |
| Domain controller promotion fails, citing FRS | The target domain is still using the File Replication Service for SYSVOL, which newer Windows Server versions cannot join. | Migrate SYSVOL replication from FRS to DFSR with dfsrmig before promoting the new domain controller. |
Final Thoughts
The staging folder and the Conflict and Deleted folder both look like implementation details until one of them runs out of room, and then they become the entire explanation for why replication looks broken. Neither is a bug to work around — they’re DFSR doing exactly what it’s designed to do, just against a quota that was sized for a smaller or calmer environment than the one it’s now running in.
For SYSVOL specifically, this isn’t optional plumbing. Every domain controller depends on it, and the default 4,096 MB and 660 MB quotas that work fine for a small file share can be exactly wrong once large GPO baselines or a burst of concurrent edits pass through.
Get-DfsrPreservedFiles and Restore-DfsrPreservedFiles.
The existing DFS Namespaces and DFS Replication post covers how namespaces and replication groups fit together at a higher level — worth reading first if replication groups and topology aren’t already familiar.