DFS and conflict and deleted items

We had an issue with dfs database and it got dirty shutdown. As per microsoft kb article it should restart if we issue this command below
wmic /namespace:\\root\microsoftdfs path dfsrVolumeConfig where volumeGuid=""E18D8280-2379-11E2-A5A0-806E6F6E6963"" call ResumeReplication.
It gave me surprise by deleting all the files from the folder.
Files goes to deleted item/conflict folder if it is being accessed by more than one users in more than one server, this is not our case !!
Why it went into that folder?

Is it wrong to ins sue that command to restart the database?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

By default if you have 2008 R2 DFS servers, the dirty shutdown recovery process should get started automatically without any command
However, in that case there are chances that data deletion may happens
Install below hotfix to save from data deletion on 2008 R2 DFS servers

Reference article

To have DFSR perform AutoRecovery when a dirty database shutdown is detected, edit the following registry value after hotfix 2780453 is installed in Windows Server 2008 R2.
If the value does not exist, you must create it.
Key: HKLM\System\CurrentControlSet\Services\DFSR\Parameters
Value: StopReplicationOnAutoRecovery
Type: Dword
Data: 0

With 2012 and above hotfix is already included in OS and you need to simply create above registry key

There is one more hotfix you can install on 2008 R2 DFS servers
After you install hotfix 2663685 autorecovery function is disabled and then you need manual WMI command to start recovery process.
Microsoft has introduced new functionality to the DFS Replication (DFSR) service for Windows Server 2008 R2 through hotfix 2663685
You can use StopReplicationOnAutoRecovery registry key to keep autorecovery function enabled or disabled by setting its value to either 0 OR 1
0 - means autorecovery is enabled
1 - means autorecovery is disabled

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
sara2000Author Commented:
thank you for your reply.
I am new to this dfs other than restarting the services and check whether replication take place.
I now have to get into this.
Can i restore the files from backup and start the dfs?

is there anyway i can get the files from deleted item folder? i am not sure whether this folder has all deleted items or not.
I hope dfs data is intact on primary member.
one option could be, you can delete replica from DFS and recreate brand new DFS replica.

Another option could be prestage dfs replica from backup
You need to use Windows server backup for that

you can simply restore Replica from backup if you already have backup
sara2000Author Commented:
Thank you for your info.
Is there anyway we can monitor if dfs database  shutdown, not the service?
If you are getting event ID 2213 in DFS events, it means your DFS database is in dirty shutdown state

Event ID 2213
The DFS Replication service stopped replication on volume C:. This occurs when a DFSR JET database is not shut down cleanly and Auto Recovery is disabled. To resolve this issue, back up the files in the affected replicated folders, and then use the ResumeReplication WMI method to resume replication.

I believe the question was raised to resolve issue pertaining to above event only
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2008

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.