Recently I was tasked with syncing some shared drives so we could upgrade a server. I started down the path of finding the best tool for the job, Googling Robocopy, XCopy, RichCopy, etc. My requirements were that the tool had to copy security permissions for the shared folders, had to be able to copy across the network, and needed to be able to sync just deltas so we didn't have to copy hundreds of GB's every time something changed. I came across a few recomendations for EMCopy 1 2 3.
Other people have done more in depth comparisons of the various tools. This is just my recommendation and an example of how it's being used in my environment.
First, the download. I couldn't find where on EMC's site they had the newest version, but searching the support forums I came across a direct link. Register for an account, log in, and follow the direct link.
Flags and options
I placed EMCopy on the server I wanted to move files to, and used the following...
emcopy.exe \\remoteserver.domain.com\F$ F:\ /o /secforce /s /de /sd /c /r:1 /th 16 /cm md5 /purge /sdd
I'll break that down in logical blocks, not necessarily how it's listed above:
\\remoteserver.domain.com\F$ F:\ - Source path followed by destination path. In this case I'm coping entire drives (F: drive) from a remote server to the local server
/s /purge /sdd - Directory options. /s copies sub directories. /purge removes files and directories from the destination that do no exist in the source. /sdd forces the target directories dates to be synchronized with the source directory.
/de - Compares both file size and last modification time when deciding to update a file, updates it if either have been changed.
/cm md5 - checks the file content after copying using and md5 comparison of the source and destination.
/o /secforce /sd - /o copies the files owner, without this the account used for the copy will be the owner. /secforce overwrites the destination security settings with the source security settings (copies security settings). /sd preserves security, the file isn't copied if an error occurs during security settings.
/th 16 - Uses 16 threads, default is 64.
/r:1 /w:30 /c - /r:1 retires one time (default I believe is 100), I don't care to have it retrying all day because someone left a word document opened. If it fails it fails and I'll catch it tomorrow. /w:30 is the wait time in seconds between retries. /c will allow the process to continue after the retries.