Active Directory · Troubleshooting

DFSR SYSVOL Stuck — Event 4012 and Backlog Not Clearing

A growing DFSR backlog or an Event 4012 in the DFS Replication log looks like SYSVOL corruption, but it is almost always a specific, documented DFSR state with its own recovery path — the job is identifying which one before you touch anything.

Quick idea: DFSR replicates SYSVOL between domain controllers using a change journal and a per-folder state machine, not a simple file copy. When that state machine lands somewhere it doesn’t trust — a domain controller offline too long, a dirty shutdown, a blocked RPC path — it stops replicating that folder and logs a specific event to tell you why. Event 4012 and a stuck backlog are symptoms; the DFS Replication event log has the actual diagnosis.
DFSR

DFS Replication — the multi-master engine that has replicated SYSVOL since Windows Server 2008, replacing the older File Replication Service (FRS).

Event 4012

Logged when a DC has been unable to replicate with any partner longer than the MaxOfflineTimeInDays limit — a staleness guard, not corruption.

Backlog

The count of pending file updates one DFSR member hasn’t yet processed from another. A backlog that never falls is the real symptom people search for.

Introduction

A GPO change goes out and applies cleanly on some domain controllers and never shows up on others. Or someone notices a SYSVOL backlog that has been climbing for days instead of draining. Or, worst case, the DFS Replication event log has an Event 4012 sitting in it and nobody is quite sure whether that means the domain controller’s SYSVOL copy can still be trusted.

DFSR is deliberately conservative about SYSVOL. Rather than silently replicating from a copy it isn’t sure is current, it stops and logs an event describing exactly what state it thinks it’s in. That is good news for troubleshooting: the fix depends entirely on which event actually fired, so read the event log before reaching for any recovery procedure.

What You’re Seeing

Event 4012 appears in Applications and Services Logs > DFS Replication, source DFSR, and reads approximately:

# Applications and Services Logs > DFS Replication, Source: DFSR, Event ID 4012
The DFS Replication service stopped replication on the folder with the following
local path: C:\Windows\SYSVOL\domain. This server has been disconnected from other
partners for 62 days, which is longer than the time allowed by the MaxOfflineTimeInDays
parameter (60).

The backlog symptom shows up differently — not as an event, but as a number that won’t move. Get-DfsrBacklog keeps returning pending files between the same pair of servers no matter how long you wait, or the DFS Management console shows a replicated folder stuck in a state other than Normal.

Key point: Don’t assume Event 4012 means journal wrap. DFSR recovers from USN journal wraps automatically — it re-verifies affected files against the file system and resumes, no administrator action required. That automatic recovery is a File Replication Service concept from the Windows 2000/2003 era; DFSR’s version of “something went wrong at the storage layer” is a dirty shutdown, logged as Event 2213, not 4012.

What It Actually Means

Think of content freshness as an expiration date stamped on a delivery. Once a domain controller has been cut off from every partner for too long, DFSR treats its copy of SYSVOL as potentially spoiled and refuses to serve it until that’s confirmed otherwise — the data isn’t necessarily wrong, it’s just been out of contact long enough that DFSR won’t take the risk.

Event 4012 is DFSR’s content freshness protection. Every DC enabled for it (on by default from Windows Server 2012 onward) tracks how long it has gone without successfully replicating with any partner. Cross the MaxOfflineTimeInDays threshold — 60 days by default — and DFSR concludes it can no longer be sure its copy of SYSVOL reflects current reality, so it stops replicating that folder rather than risk pushing stale data out to the rest of the domain, or pulling stale data in.

A backlog that never clears is a different symptom with several possible causes — the replicated folder itself may be healthy and just slow, or it may be sitting in an error state entirely. Both symptoms point to the same next step: stop guessing and read what DFSR itself recorded.

How to Diagnose

Work from the cheapest read-only check to the deepest. None of the commands below change anything.

# 1. Check pending files between a source and destination DC
Get-DfsrBacklog -SourceComputerName DC01 -DestinationComputerName DC02 `
  -GroupName "Domain System Volume" -FolderName "SYSVOL Share"

# 2. Check the overall inbound/outbound DFSR state on a given DC
Get-DfsrState -ComputerName DC02

# 3. Confirm the underlying AD replication that carries DFSR's configuration
# is actually converging between DCs
repadmin /showrepl DC02 /errorsonly

# 4. Confirm SYSVOL is flagged ready and Netlogon is advertising correctly
dcdiag /test:sysvolcheck /test:advertising /s:DC02

# 5. Let dcdiag scan the DFSR event log itself for the last 24 hours of
# warnings and errors
dcdiag /test:DFSREvent /s:DC02

# 6. Confirm the domain has fully migrated from FRS to DFSR for SYSVOL -
# a DC stuck mid-migration behaves like a replication failure
dfsrmig /getmigrationstate
Practical note: Step 6 catches a failure mode that looks exactly like a stuck backlog but isn’t one — a domain controller that never completed the FRS-to-DFSR SYSVOL migration. dfsrmig /getglobalstate is most reliable when run against the PDC emulator, since that’s the role Active Directory treats as authoritative for the migration state.

Common Causes

Cause How to Confirm Fix
DC offline longer than MaxOfflineTimeInDays Event 4012 in the DFS Replication log; confirm the threshold with wmic /namespace:\\root\microsoftdfs path DfsrMachineConfig get MaxOfflineTimeInDays. Restore connectivity, then run the non-authoritative resync in the fix below rather than assuming it will resume on its own.
Dirty shutdown of the DFSR database Event 2213 in the DFS Replication log — logged when the ESE database wasn’t closed cleanly. Back up the replicated folder, then invoke the ResumeReplication WMI method on the affected volume once the backup is confirmed.
RPC blocked between partners Event 5002, “encountered an error communicating with partner”; repadmin /showrepl also shows the same partner failing. Open TCP 135 (RPC Endpoint Mapper) and the dynamic RPC port range between the affected DCs.
DC never completed initial sync Event 4614 logged with no matching Event 4604 afterward — initialization started but never finished. Confirm AD replication has converged, run dfsrdiag pollad, and re-check for 4604 before assuming a resync is needed.
FRS-to-DFSR migration stalled Event 8028 or 6016, “Access is denied,” usually on a newly promoted DC. Confirm the built-in Administrators group still holds the Manage Auditing and Security Log right; restore it if a security policy removed it.
Antivirus or backup software scanning SYSVOL Backlog grows steadily with no admin-made changes; files show unexpected modification timestamps. Apply the documented SYSVOL and DFSR database exclusions — automatic on Server 2016+ once AD DS is installed, otherwise configured manually.
Replicated folder sitting in an error state WMI query against DfsrReplicatedFolderInfo returns state=5 (In Error) instead of 4 (Normal). Check the DFS Replication event log for the specific blocking event first — the state alone doesn’t tell you which recovery path applies.

Working Through a Fix

Most stuck-SYSVOL cases resolve with a non-authoritative resync of the affected DC — telling it to discard its local copy and pull a fresh one from a healthy partner. DFSR has no BurFlags registry values the way FRS did; the flag lives in Active Directory, on the DC’s own DFSR subscription object.

In ADSIEdit.msc, connect to the Default naming context and locate the affected DC’s object:

CN=SYSVOL Subscription,CN=Domain System Volume,CN=DFSR-LocalSettings,
CN=<server name>,OU=Domain Controllers,DC=<domain>

Set msDFSR-Enabled to FALSE on that object, force AD replication throughout the domain, then run DFSRDIAG POLLAD on the affected DC. Confirm Event ID 4114 appears — that’s SYSVOL stopping replication cleanly. Set msDFSR-Enabled back to TRUE, force replication again, run DFSRDIAG POLLAD once more, and watch for Event ID 4614 followed by 4604 — that pair confirms the non-authoritative resync completed.

Production note: An authoritative resync (setting msDFSR-options=1 on one DC while non-authoritatively resetting every other DC in the domain) is a last resort for when every DC’s SYSVOL is suspect, not a routine fix for one unhappy server. Doing it on a single DC without resetting the rest produces conflicts on every DC you didn’t touch. Back up SYSVOL before starting either procedure, and if you’re not certain which DC has the most current data, the PDC emulator is the conventional choice for the authoritative source.

How to Prevent It

Don’t let a domain controller sit disconnected from the replication topology for anywhere close to 60 days — a DC that’s going to be offline for an extended maintenance window is a candidate for demotion and later repromotion, not for triggering content freshness on return. Keep the DFSR service account’s environment stable: verify the built-in Administrators group retains the Manage Auditing and Security Log right, since removing it as part of a hardening pass is a common, self-inflicted cause of migration and initialization failures.

Monitor backlog proactively with Get-DfsrBacklog or a scheduled Write-DfsrHealthReport run rather than waiting for a GPO complaint to surface it — a backlog that’s merely slow and one that’s genuinely stuck look identical from the help desk ticket, and only a health report or event log check tells them apart. Confirm SYSVOL and DFSR database exclusions are in place for antivirus and backup agents; on Server 2016 and later these apply automatically once the AD DS role is installed, but verify rather than assume on older builds or third-party AV that doesn’t respect Windows’ automatic exclusion list.

Quick Reference

Command / Event Use
Get-DfsrBacklogCount pending files between a source and destination DC for a replicated folder.
Get-DfsrStateShow current inbound/outbound DFSR activity on a computer.
dcdiag /test:DFSREventScan the DFS Replication event log for warnings and errors from the last 24 hours.
dfsrmig /getmigrationstateConfirm the domain has fully completed the FRS-to-DFSR SYSVOL migration.
Event 4012Content freshness — DC exceeded MaxOfflineTimeInDays without replicating.
Event 2213Dirty shutdown detected — DFSR database needs a supported recovery, not a delete.
Event 5002RPC communication with a partner failed — check firewall and DNS.
Event 4614 / 4604Initial or non-authoritative sync started (4614) and completed (4604) for a DC.

Final Thoughts

A stuck SYSVOL backlog feels urgent because it eventually breaks Group Policy delivery everywhere, but the DFSR event log almost always already contains the answer. Content freshness, dirty shutdown, blocked RPC, and a stalled migration each leave a distinct fingerprint, and each has a documented, low-drama fix.

Reach for an authoritative resync only when every DC’s copy is genuinely in doubt. In every other case, the non-authoritative procedure on the one affected DC — done in the right order, with AD replication forced between each step — clears the backlog without putting the rest of the domain’s SYSVOL at risk.

Key takeaway: Run Get-DfsrBacklog and check the DFS Replication event log for 4012, 2213, or 5002 before touching anything. Match the event you find to its documented fix — non-authoritative resync via msDFSR-Enabled for a single stale DC, authoritative resync only when the whole domain’s SYSVOL is suspect — and confirm success by event ID (4114, then 4614/4604) rather than assuming the backlog count alone tells the full story.
More troubleshooting

If SYSVOL itself is healthy but policy still isn’t landing on the client, the next place to look is Group Policy Not Applying — a different failure with its own diagnostic path once replication is confirmed clean.