Migrate Files And Shares To Server 2012 Guide

Written by Allen White on. Posted in SBS2008/2011, Server 2003, Server 2008, Server 2012

One of the most painful parts of any migration to a new IT system is migrating your files from the old server to a new server. In the guide below I will show you how to copy your files with permissions to Server 2012 from your existing server 2003 or server 2008r2 install. I will then show you how to migrate your shares from Server 2003 or Server 2008 to Server 2012. We will keep all share permissions when we migrate the shares and also the shares will not need setting up again once we are complete.

Migrating Files With Permissions To Server 2012

In this example we have our old server drive “E” and we are migrating/copying files with there permissions, to drive “F” on our new server. On your old server first map drive “F” to your new file server.  Then drop to a command prompt and CD to drive “E”. We then run the command below, this command copies all files and folders with permissions from source to destination.

xcopy e:*.* f:*.* /D /E /C /F /H /K /O /Y

Of course you may not want to copy the whole content of your old drive to your new server. So in the example below we copy individual folders with all permissions from the old server to the new server.

xcopy e:oldfolder f:newfolder /D /E /C /F /H /K /O /Y

Once you have copied all your files and folders to the new server we are ready to migrate our shares and share settings.

Migrating Shares To Server 2012

This method as mentioned will copy all the shares and share permissions to your new server, it involves backing up a registry key and importing it to our new server. If you can and want to make this even more simple try and keep the drive letter the same on your new server the shares where on your old server, if you cannot, don’t worry we can change it later. On your old server migrate to the following key.

HKEY_LOCAL_MACHINE>SYSTEM>CurrentControlSet>Services>LanmanServer>Shares

Then right click the Shares key and select “Export”, give it any name you like and save it to an area accessible from your new server.
migrate shares and files to server 2012
Now go to your new server, right click the registry file you have exported and select “Merge”. All your shares are now setup on your new server. If your new server uses the same drive letter then there is nothing more to do bar restart the “Server” server. Start>Run>Services.msc then restart the “Server” service. If you drive has a different drive letter to the old server then we need to do the following.

On the new server, again in regedit, browse to the following key.

HKEY_LOCAL_MACHINE>SYSTEM>CurrentControlSet>Services>LanmanServer>Shares

Now on the right hand side you can see your shares. To change the drive letter of a share simply double click the share in question and then locate the section labeled “path” and change the drive letter to the drive of your new file server as highlighted in the image below.

migrate shares with permissions

You will need to do this for each share that you want to change the drive location for. Once complete we need to restart the server services again, start>Run>Services.msc then restart the “Server” service or simply reboot the new server. This process is now complete

 
Allen White
Allen is a Consultant for ITPS in the North East of England and holds the following accreditations. MCSA, MCSE, MCTS, MCITP, CCA, CCSP, VCP 4,5 and HP ASE, AIS - Network Infrastructure.

ITPS provides strategic IT consultancy, implementation, data centre provision and unified communications, as well as support services and workspace and disaster recovery. If you require a consultation then please contact me via the contacts section or direct on 07931222991, add me on linkedin. https://uk.linkedin.com/in/allenwhiteconsultant0001

Tags: ,

Comments (8)

  • Jesmond

    |

    I like your article. It’s very interesting. However, I am confused about the fact that the new server must have the same hostname in order to have a smooth transition. Can this be done?

    Reply

    • Allen White

      |

      Hi, its not crucial to the migrate however it makes it a lot easier as its one less setting to change in the registry, however yes you can use a different server name, just make sure you modify the share setting once you have imported the registry entry to the name of the new server.

      Reply

  • Peter

    |

    Hi, great article, however xcopy is failing while copying shared files with max_path over 260 characters, is there any switch so xcopy will ignore these files or copy them anyway without stopping?

    Reply

    • Allen White

      |

      Maybes you could replace xcopy with robocopy /MiR

      Reply

  • Bobby

    |

    I have a question. I have to migrate our 2008 R2 server to 2012. It will have the same name and drive letters. I was wondering if after the first copy you need to sync again to get updated changes what commands to use. I am asking because this will be a slow process and I will probably have to “sync” changes a few times before switching over. Thanks.

    Reply

    • Allen White

      |

      Hello Bobby, it depends really only if you are keeping the share live during the migrate, I generally do not unless its desperate the client has access at all times. The flag you need to add is /d in your situation to copy only the files that have changed. Here is a list of further flags.

      /k copy attributes
      /e be recursive, and even re-create empty directories
      /y say yes to prompts
      /c don’t stop on errors
      /h copy hidden and system files
      /o copy ownership and ACL information
      /r overwrite read-only files
      /d copy only changed files (or new files)

      Allen

      Reply

  • Harold

    |

    What steps do I do if I want the new server to have the same name as the old server? Thanks

    Reply

  • JOf

    |

    Hello Guys, There is the fastest way for your to Transfer those huge files you have from Old to New.

    I used ShadowProtect – Server Edition to copy my Multiple Drives Partition/Volume containing 3TB (All in All).

    Once copying is done on the existing Server, I restored it to the New Server using the same Software. All Files and Permission will remain and copied in a matter of 2 to 3 Hours.

    Then for transferring the Shared Folder sharing to the new Server. I’m using the same process what describe in titled “Migrating Shares To Server 2012”

    Reply

Leave a comment

Categories

(c) Techieshelp.com. Please be aware, all information is provided freely, any information used is done so at your risk and Techieshelp will not be held responsible for any issue that may occur.
!-- BuySellAds On-Site Shopping Cart -->