Migrate Windows Server 2008 R2 DFSRoot to New Drives


During a recent storage refresh ran into an issue with moving storage used by a Windows Server 2008 R2 DFS server and if and how could the DFSRoot be migrated. In this post we will cover how we were able to successfully move resources.


Before migrating there are several items to accomplish.

  • Use dfsutil to export DFSRoot / namespaces
  • Backup registry keys for DFS
  • Mount and assign new drive letter

Let’s look at the individual steps and execute.

Backup DFS Configs

First step is to backup the DFS exports defined using dfsutil command. Modify the command to save to a location and the path of your DFS Root. In this example we are backing up a Downtown and a Cincinnati DFS export to D:\DFS-Backups and saving as a text file. Open up a command prompt with Admin privileges.

Backup Registry Keys

Next we can export the DFS registry key using regedt32.

Browse to the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DFS key. and export the key.

We can also backup the key from the command line

Data Migration

Migrate your data to the new storage location, use robocopy or the tool of your choice. Before copying the data make sure you have mounted and formatted the destination drive with a different drive letter. An example using robocopy would be:

In this example we are copying from D to E drive using the options /MIR (Mirroring a directory tree), /E (Copy subfolders, including empty), /V (Verbose output), /R:1 (1 retry), /W:0 (No wait time), /LOG (log to output operation) and /ETA (Display Estimated completion time.


More Cleanup

Rename DFS Roots folder (D:\DFSRoots)

Delete DFS namespace from Cluster Server Manager under DFS menu if this is a clustered DFS server.

Run dfsmgmt.msc to open up the DFS Console and remove namespace.

Finishing the Migration

Now we are ready to make the flip. Change the drive letter assignment of the old drive containing DFSRoot (D) or just take the drive offline. Once completed change the new drive to D drive.

Now we can recreate the namespaces.

Run dfsmgmt.msc to open up the DFS Console if not still open from previous steps.

  • Right+click on namespace in DFS mgmt
  • Click New namespace
  • Enter server – filesvr01
  • Enter Name of namespace
  • Next next create

Import config from backup for that namespace using the dfsutil command.

Final Steps

At this point time to check and see if the DFS export is available and accessible. The namespace will show online and available and the DFSRoot directories that did not copy over will have recreated. Congratulations you have migrated the DFSRoot drive and configurations.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.