Robocopy command parameter to migrate home drives while retaining the file ownership after copied to target file server

Posted on 2014-07-16
Last Modified: 2014-07-23
Hi people,

I'm using Windows Server 2012 R2 as the new file server to copy the Home Drives content from the old file server (Server 2008) to the S:\ drive in the new file server.

Can anyone please suggest me which parameter should I use to make sure that the file & directory ownership is still retained from the old source file server in the new file server ?

I have tried to copy using the following one line batch script:  

robocopy \\OldFileServer\Homes S:\homes *.* /MIR /SEC /SECFIX /LOG:C:\TEMP\RoboCopylogs.txt

Open in new window

but the result is that all of the copied directories in the new S: drive are owned by the newServer2012R2\Administrators group ?

the users cannot delete the files in their own Home drives.

Is there any way or parameter to include or script to fix the ownership above?
    LVL 5

    Accepted Solution


    I would suggest you to use Microsoft File Migration Toolkit, this tool will copy files as well as permissions of folder and folder ownership.

    I hope this wil resolve your issue.

    LVL 6

    Author Comment

    by:Senior IT System Engineer
    ok, I have install it on the new target server, but what's the command line to use in the Windows Server 2012 R2 ?

    Assisted Solution

    by:Joel Jerkin

    If you are using robocopy, try with the following line:
    robocopy \\OldFileServer\Homes S:\homes *.* /MIR /COPYALL /SECFIX /LOG:C:\TEMP\RoboCopylogs.txt

    Open in new window

    /COPYALL (same as /COPY:DATSOU) will include the O-flag (Owner Information).

    You can read more about the /COPY parameter here.


    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.

    Join & Write a Comment

    The reason that corporations and businesses use Windows servers is because it supports custom modifications to adapt to the business and what it needs. Most individual users won’t need such powerful options. Here I’ll explain how you can enable Wind…
    What to do when Windows Update is not working correctly? What tools can I use to detect the cause of the malfunction problem? What does this numeric error code mean? These and other questions that you have been asking in the past are answered here (…
    This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…
    This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

    746 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

    16 Experts available now in Live!

    Get 1:1 Help Now