Solved

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

Posted on 2013-11-11
4
598 Views
Last Modified: 2013-11-13
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!
0
Comment
Question by:tcianflone
4 Comments
 
LVL 83

Accepted Solution

by:
oBdA earned 350 total points
ID: 39639885
Your target folder should probably be D:\Data, otherwise every folder under "\\ServerOld\D$\Data" will end up in the root folder of the new D: drive.
Yes, if you don't use /sec (or /copy:DATS), only the files will be copied over, and the permissions from the target folder will be inherited.
In a LAN, /r:1 and /w:1 should be enough; you could probably even use /r:0 and simply run the same command again if an error occurred.
If you wont to log only errors, use /nfl (no file list) and /ndl (no directory list); errors will still be logged. If you want a log file, use /tee (to write to the file as well as generating console output, /np to disable the progress display (leaves control characters in the log file), and /log:"<LogFile>".
0
 
LVL 11

Expert Comment

by:Manjunath Sullad
ID: 39639991
Please check below script (bat file)

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

pause
0
 
LVL 15

Assisted Solution

by:Rob Stone
Rob Stone earned 150 total points
ID: 39642920
To answer your question on R:1 meaning one retry, that is correct, if it fails, it will wait 1 second then retry again and if it fails it will skip the file and move on.

If you are happy with your existing file security you can use other tools to change the domain such as setacl or subinacl.

http://helgeklein.com/blog/2012/07/howto-reacling-a-file-server-in-a-domain-migration-with-setacl-3-0/
0
 
LVL 1

Author Closing Comment

by:tcianflone
ID: 39646456
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.
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Best advice possible for Hdd drives 5 56
Task with PowerShell Script is failing with 0x41301 7 85
Multiple Domains 8 41
Windows Permissions 4 35
Understanding the various editions available is vital when you decide to purchase Windows Server 2012. You need to have a basic understanding of the features and limitations in each edition in order to make a well-informed decision that best suits y…
A procedure for exporting installed hotfix details of remote computers using powershell
In this Micro Tutorial viewers will learn how to use Windows Server Backup to create full image of their system. Tutorial shows how to install Windows Server Backup Feature on Windows 2012R2 and how to configure scheduled Bare Metal Recovery backup.…
This tutorial will walk an individual through the process of installing of Data Protection Manager on a server running Windows Server 2012 R2, including the prerequisites. Microsoft .Net 3.5 is required. To install this feature, go to Server Manager…

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now