Restoring DFSR After Restoring a VM from Backup or Snapshot
With virtual environments becoming the norm in the datacenter, it’s likely you are using some type of VM level backups, such as Veeam, or have used snapshots to protect your data. If you are using Microsoft Distributed File System Replication to sync up your files, restoring from those snapshots or VM level backup may not be the best solution for you. Even if you leverage VSS within your backup job, restoring a participating server will likely result in database corruption. The Microsoft KB 2517913 article shows the symptoms, but unfortuately the resolution is listed as “Contact Microsoft Support”. If you’ve found yourself in this predicament, follow the below steps to get it working again:
Remove Membership from the Replication Group on all Servers in the DFS Management Console
Delete the Replication Group
Remove the DFS Replication from the File Services Role in Server Manager.
From an elevated command prompt, delete the corrupted DFSR database: Run to Set Permissions –> icacls “c:system volume information” /Grant Administrator:F Run to Delete Database –> rd “c:system volume informationdfsr” /s /q
Enable DFS Replication within the File Services Role in Server Manager.
Recreate the Replication Group and reconfigure your replicated folders.
– After removing or recreating the replication group, you can use the command “dfsrdiag pollad” – from an elevated command prompt – to pull the changes from the domain controllers, which should speed things up a little for you. – After recreating the DFSR group, you can use the following command to poll the status of the replication: Wmic /namespace:\rootmicrosoftdfs path dfsrreplicatedfolderinfo get replicationgroupname,replicatedfoldername,state A state of 2 refers to initial replication and a state of 4 refers to replicating state.