Robocopy – File Server Migration Guide

file-serverrobocopywindows-server-2003windows-server-2012

I plan to migrate a file share from Windows server 2003 to Server 2012 R2 (It has more than 500 GB of data. FYI – It does not have DFS).

I thought of using below command for copying the data from source server to target server:

robocopy "\\Source server\folder\" "\\Target server\folder\" /S /E /COPY:DATSOU /R:1 /W:10 /TEE /log:<log path.txt>

During the cut over, I plan to run the same command again to copy any new/modified files.

Are there any issues with above command and do I need to include '/XO' during the cut over to exclude copying the existing files again?

Best Answer

I had the exact scenario earlier this year. To answer your question, there shouldn't be any issues with your Robocopy command. I would like to share the Robocopy command I used to migrate my file server to a new Server 2012 R2 VM.

Note: Use the same drive letters and the exact same file paths on your new Windows Server 2012 R2 server. Failing to do so will result in the share information not matching and your migration fail.

Details on the Robocopy switches:

 /e – Copy subdirectories, including empty ones
 /xj – Exclude junction points
/r:2 – 2 retries
/w:5 – 5 second wait between retries
  /v – Verbose output for skipped files
 /it – Include tweaked files (identical size/timestamp, but different attributes)
/purge – Delete destination files/directories that no longer exist in source
/copyall – Copy data, attributes, timestamps, security (ACLs), owner, auditing info

I ran this command from the Server 2012 R2 Server.

ROBOCOPY /e /xj /r:2 /w:5 /v /it /purge /copyall \\Server2003FileServer\c$\Data c:\Data

Then you can export the file share information from the 2003 server and then import the share information to the 2012 R2 server. I used the KB article here https://support.microsoft.com/en-us/kb/125996 to perform my share export.