I often use Robocopy when migrating/copying data from file servers.
When running the copy process to transfer data from Windows Server 2003 to Windows Server 2008 I usually run robocopy from the destination server (usually the newer server) in order that it will use version XP027 (5.1.10) There are a number of flaws in XP026 and also requires a seperate download Windows 2003 Resource Kit to obtain it.
This is the main syntax I use to perform a full copy.
robocopy D:\Source E:\Destination /MIR /R:1 /W:1 /COPYALL
Example, when copying from another server (using UNC):
robocopy \\myserver\e$\data E:\data /MIR /R:1 /W:1 /COPYALL
Although “/MIR” is mirroring the data, this will not actually copy the ACL permissions, therefore you will need to ensure that /COPYALL is included. I’ve copied a whole load of data before without including this only to find I have had to recopy to correct the ACL.
/COPYALL : Copy ALL file info (equivalent to /COPY:DATSOU) including timescamps, permissions, ACL, other attributes.
/MIR : MIRror a directory tree – equivalent to /PURGE plus all subfolders (/E)
/R:n : Number of Retries on failed copies – default is 1 million.
/W:n : Wait time between retries – default is 30 seconds.
Sometimes the copy may set the top level folder to “hidden” This can be un-hidden using the “attrib” command:
-s : Removes the system file attribute.
-h : Removes the hidden file attribute.