Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 567
  • Last Modified:

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

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?
0
Senior IT System Engineer
Asked:
Senior IT System Engineer
2 Solutions
 
Arjun VyavahareTechnical ConsultantCommented:
Hi,

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.

Regards,
Arjun
0
 
Senior IT System EngineerIT ProfessionalAuthor Commented:
ok, I have install it on the new target server, but what's the command line to use in the Windows Server 2012 R2 ?
0
 
Joel JerkinConsultantCommented:
Hi,

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.

Regards,
Joel
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now