Link to home
Start Free TrialLog in
Avatar of tcianflone
tcianfloneFlag for United States of America

asked on

robocopy switches: copying data drive from old server/old domain to new server/new domain

I'm replacing a server 2003 standard edition with 2012 standard edition. Do I want to use /SEC for this copy? I don't think so because the new server is a fresh domain and none of the users/groups will match anyways. So I'm thinking the switches should look like this:

robocopy \\ServerOld\D$\Data D:\ /E /B /COPY:DAT /R:1 /W:1

Once the data is on the new server, I'm expecting it to inherit the permissions of the parent folder I'm copying to, then from there I can set them as I need for the new environment. Is this what will happen?

Regarding the retry and wait flags, does the "1" mean ONE retry, wait 1 second? I don't want to be waiting around for 1 million retries. What's reasonable here?

Finally, is there a way to get it to write a log ONLY for failures? Thanks!
ASKER CERTIFIED SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Please check below script (bat file)

robocopy "\\oldserver" "\\newserver" /MIR /COPYALL /NP /LOG+:"C:\Robocopy.log" /ZB /R:1 /W:1 /V /TEE

pause
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tcianflone

ASKER

Thanks, all for your input. Found out something interesting along the way. On the old server, all of the shared folders were at the root of D, implemented by their previous tech. If you use something like robocopy \\servername\D$ in your source path, robocopy sets the hidden and system flags on EVERYTHING!!! Here's a reference link on that behavior:

http://social.technet.microsoft.com/Forums/windows/en-US/8dcb6432-6ae0-4816-92e8-2599e5e638f5/robocopy-hides-destination-directory

Here's what I actually ended up using:
robocopy "\\oldserver\D$\foldername" "D:\shares\foldername" /E /B /MT /COPY:DAT /R:1 /W:1 /TEE /LOG:C:\Users\Administrator\Documents\robocopylog1.txt

I repeated for each folder that needed to come over, writing to a separate log. Worked great! Also decided to try the multithreading flag. Seemed to go pretty fast, subjectively speaking.