How to transfer data from one server to another that keeps all shares and permissions intact

Posted on 2006-04-12
Last Modified: 2010-04-18
Hi there,

I will be transferring data from one server to another but I would like to transfer this data keeping the shares and security permissions intact, is there a way I can do this..?


Question by:philipgecko
    LVL 82

    Expert Comment

    Copy the files with robocopy.exe form the ResKit Tools, it will allow you to copy the permissions; check the robocopy.doc file in the installation folder for details.
    Windows Server 2003 Resource Kit Tools

    The shares can be moved over with the help of this article (assuming you have the exact same drive name and folder structure):
    Saving and restoring existing Windows shares


    Author Comment

    Great.  How do you use robocopy, is it straight forward..?

    Basically, I have a partition which is called Vol1 (D:) which has about 37Gb of data.  I have a partition created on the new server called Vol1 (E:) and basically I need to copy everything across to the new server.  How do i use robocopy to do this..?
    LVL 82

    Accepted Solution

    Basically the same way as with xcopy, it just will copy folders by default (and, yes, it will by default only copy files that aren't present in the target folder or differ from the source, so you can run it several times without problems).
    robocopy D:\ \\NewServer\e$ /copy:datso
    should do it for starters. For more control, check out the documentation.
    GUI wrappers are available as well, for example this one (didn't work for me, but I'm not using an English Windows version):
    Robocopy GUI 3.0: Workspace Home
    Note that if you don't change the drive letter on the new machine, migrating the shares won't work like described.
    If you can't change the drive letter, you'll have to open the exported reg file before importing it on the new server, and change the references to D:\ to E:\.

    Author Comment

    hmmm, thats useful.  To keep everything simple I should really change the new servers Vol! partition to D should i?  This way when I do the copy as you have stated above, all the shares will come across, is that right? Or do i still have to do an import from the regsitry?

    Author Comment

    actually, what is the easiest way of labelling these drives?
    LVL 82

    Expert Comment

    You'll still have to export/import the registry files as described in the article above; robocopy won't copy any shares, only files.
    The drive letter can be assigned in the Computer Management Console; make sure the current D drive can be renamed (that is, for example, there are no programs installed on it) before giving it a new letter (a CD/DVD won't mind ...)!
    Or just do a Search/Replace run with the reg file in Notepad.

    Author Comment

    when I use robocopy d:\ \\fbspdc001\d$ /copy:datso it aonly copys the files across not the folders, is there a way to copy EVERYTHING within D$..?
    LVL 9

    Expert Comment

    you can use the built in command xcopy /o.  

    XCOPY source [destination] [/A | /M] [/D[:date]] [/P] [/S [/E]] [/V] [/W]
                               [/C] [/I] [/Q] [/F] [/L] [/G] [/H] [/R] [/T] [/U]
                               [/K] [/N] [/O] [/X] [/Y] [/-Y] [/Z]

      source       Specifies the file(s) to copy.
      destination  Specifies the location and/or name of new files.
      /A           Copies only files with the archive attribute set,
                   doesn't change the attribute.
      /M           Copies only files with the archive attribute set,
                   turns off the archive attribute.
      /D:m-d-y     Copies files changed on or after the specified date.
                   If no date is given, copies only those files whose
                   source time is newer than the destination time.
                   Specifies a list of files containing strings.  Each string
                   should be in a separate line in the files.  When any of the
                   strings match any part of the absolute path of the file to be
                   copied, that file will be excluded from being copied.  For
                   example, specifying a string like \obj\ or .obj will exclude
                   all files underneath the directory obj or all files with the
                   .obj extension respectively.
      /P           Prompts you before creating each destination file.
      /S           Copies directories and subdirectories except empty ones.
      /E           Copies directories and subdirectories, including empty ones.
                   Same as /S /E. May be used to modify /T.
      /V           Verifies each new file.
      /W           Prompts you to press a key before copying.
      /C           Continues copying even if errors occur.
      /I           If destination does not exist and copying more than one file,
                   assumes that destination must be a directory.
      /Q           Does not display file names while copying.
      /F           Displays full source and destination file names while copying.
      /L           Displays files that would be copied.
      /G           Allows the copying of encrypted files to destination that does
                   not support encryption.
      /H           Copies hidden and system files also.
      /R           Overwrites read-only files.
      /T           Creates directory structure, but does not copy files. Does not
                   include empty directories or subdirectories. /T /E includes
                   empty directories and subdirectories.
      /U           Copies only files that already exist in destination.
      /K           Copies attributes. Normal Xcopy will reset read-only attributes.
      /N           Copies using the generated short names.
      /O           Copies file ownership and ACL information.
      /X           Copies file audit settings (implies /O).
      /Y           Suppresses prompting to confirm you want to overwrite an
                   existing destination file.
      /-Y          Causes prompting to confirm you want to overwrite an
                   existing destination file.
      /Z           Copies networked files in restartable mode.

    The switch /Y may be preset in the COPYCMD environment variable.
    This may be overridden with /-Y on the command line.

    Author Comment

    so in my case I should do the following
    xcopy \\fbspdc01\d$ d:\d$ /e

    is that right?

    will this bring across all the permissions and security attributes. i know an import of the registry may bring this across

    I just need to know here which command IS the right one.

    many thanks

    Author Comment

    what aboiut

    robocopy \\fbspdc01\d$ d:\ /e /copyall

    is that ok..?
    LVL 9

    Expert Comment

    the xcopy command you have to do it from the source machine.

    for example the files are located at  abc server and you want to copy it xyz sever.

    xcopy d:\foldername \\xyzserver\d$ /e /o

    u need to o switch.
    LVL 82

    Expert Comment

    Add a "/e" to the arguments:
    robocopy d:\ \\fbspdc001\d$ /copy:datso /e

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    So you have two Windows Servers and you have a directory/folder/files on one that you'd like to mirror to the other?  You don't really want to deal with DFS or a 3rd party solution like Doubletake. You can use Robocopy from the Windows Server 200…
    Recently, I had the need to build a standalone system to run a point-of-sale system. I’m running this on a low-voltage Atom processor, so I wanted a light-weight operating system, but still needed Windows. I chose to use Microsoft Windows Server 200…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now