Monday, July 14, 2014

How to restore/import Domain DFS Namespace Using DFSUtils

1)      Export each DFS Namespace using the following command
a.       Windows 2008 syntax
dfsutil root export \\domain.local\dfsroot filename.txt

2)      If needed delete a DFS Namespace from AD using ADSI Edit. This procedure assumes all DC’s that hosted this DFS Namespace are no longer available and will not be restored.  Use this procedure with caution, follow good practices by taking system state backups prior to deleting anything from Active Directory.

     2.1)      Open AdsiEdit
a.       Connect to the Default Naming Context of the Domain
b.      Right click the ADSI Edit and select Connect To
                                                               i.     
c.       Fill in the appropriate connection settings as shown below.
                                                               i.     
d.      Click OK
          2.2)      Drill down to the following container
CN=Dfs-Configurat,CN=System,DC=domain,DC=net
a.       Delete the affected DFS Namespace(s) listed on the right.
                                                               i.      Example, deleting the apps DFS Namespace.
                                                             ii.     
           2.3)      Force Replication
           2.4)      On each DC stop and restart the DFS Namespace service.
a.       Command Line
net stop dfs
net start dfs
b.      Services MMC
                                                               i.      Select the DFS Namespace service and click Restart.
                                                             ii.     
         2.5)      Restart the DFS service on the client computer.
         2.6)      Run the DFS Management Console
a.       Remove any existing DFS Namespaces from the display.
b.      Restart the DFS Management Console
c.       Add DFS Namespaces to display.
                                                               i.      This list should not display the removed DFS Namespaces.
         2.7)      You can now manually recreate the DFS Namespace
a.       To simplify creating the DFS Namespace you should export the DFS Namespace configuration on a regular basis so you can import it as needed.

3)      Manually create the DFS Namespace using DFS Management Console
4)      Import the exported Links to the appropriate DFS Namespaces
a.       Run the following command to import the previous DFS Namespace configuration.  This will overwrite any existing configuration for the namespace.  DFSUtil will automatically create a backup file of the existing configuration in the current folder.  Only the DFS Link configuration is updated.  Target Servers are ignored.
b.      Windows 2008 syntax
dfsutil root import set filename.txt \\domain.local\dfsroot

c.       Note: Large imports may take a few minutes to complete, you can run multiple imports at the same time to speed the process along if needed.
d.      Compare configuration against the import file using this command
dfsutil root import compare filename.txt \\domain.local\dfsroot

e.       Check blob size using this command.

dfsutil root import blobsize filename.txt \\domain.local\dfsroot

No comments:

Post a Comment