Posted on: July 2nd, 2013
As an Operations Engineer at PEI, I have the opportunity to fulfill a wide range of requests for our clients. Recently, when migrating a physical file and print server to a newly build virtual server I discovered how useful the Robocopy command is.
Robocopy, or Robust File Copy for Windows, is built in to the Windows command line on Windows 7/8 and Windows Server 2008 or greater. The value of this command in a file and print server migration is the fact that it can copy an entire directory structure while leaving parameters intact (permissions, last modified dates, etc.)
The command that I recommend executing in a simple FP Server migration is below. This is assuming you are running it from the new FP Server:
ROBOCOPY “\\path_to_existing_share” “X:\path_to_new_share” /MIR /R:5 /COPY:DAT /log:”C:\log.txt”
Let’s dissect this command to see what exactly we are doing here:
1) “\\path_to_existing_share” “X:\path_to_new_share”
a. We are telling ROBOCOPY to move files from the existing network share to the local path to the new share location.
a. Mirrors the directory tree
a. Specifies the number of retries on failed copies. I recommend setting this to 5 to prevent and endless retry loop. The default value if not specified is 1 million retries
a. Copies Data, Attributes and Timestamps
a. Places a copy log in the root of C:\
By running the command as shown above, you will accomplish a simple and effective data transfer between two locations. To see a full list of ROBOCOPY switches, head to the following TechNet Article: http://technet.microsoft.com/en-us/library/cc733145(v=ws.10).aspx
Andy Shaffer, PEI