As some of you might know already that whenever you are asked to create a another Replica for your current file server in another location, DFS comes in mind

Now the very first step in implementing DFS is mirroring your shares on a new given server.. cool, so how do we do that.

Well, thinking about it .. this is achievable through various methods

1- FSMT – Microsoft File server migration tool

2- Combination of Xcopy or Robocopy and a REGISTRY mod Winking smile

Now here I am gonna talk about the second method which I personally used a lot

So in short here is what you need to do

1- Robocopy the folder structure from the old server to the new server using the below command

robocopy “c:\test” “\\newfileserver\c$” /MIR /E /F /XF *

 image

Where the S is your Source and D is the Destination

This will copy the whole structure to the new server without the files hence the /XF * –> Exclude all files

Now that we are done lets move on to the shares

2- Using article 125996, all you need to do is to actually copy a registry key from your old server to the new server

  1. On the existing Windows installation that contains the share names and permissions that you want to save, start Registry Editor (Regedt32.exe).
  2. From the HKEY_LOCAL_MACHINE subtree, go to the following key:

    SYSTEM\CurrentControlSet\Services\LanmanServer\Shares

  3. Save or export the registry key.
    • For Windows NT and Windows 2000, click Save Key on the Registry menu.
    • For Windows Server 2003, click Export on the File menu.
  4. Type a new file name (a file extension is not necessary), and then save the file to a floppy disk.
  5. Reinstall Windows.
  6. Run Registry Editor (Regedt32.exe).
  7. From the HKEY_LOCAL_MACHINE subtree, go to the following key:

    SYSTEM\CurrentControlSet\Services\LanmanServer\Shares

  8. Restore or import the registry key.
    • For Windows NT and Windows 2000, click Restore on the Registry menu.
    • For Windows Server 2003, click Import on the File menu.
  9. Type the path and file name of the file that you saved in steps 3 and 4.
    Caution This step overrides the shares that already exist on the Windows computer with the share names and permissions that exist in the file you are restoring. You are warned about this before you restore the key.
  10. Restart the server.

 

Doing the above, you are fully prepared to start configuring DFS to replicate the same files  between two or more servers.

Advertisements