Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have this issue, I am trying to copy home directory from one server to another using robocopy. Now, my issue is, would robocopy be able to bring over all the permissions as well?

Here is the command line I am using:

robocopy "\\server1\home" "D:\home" /E /SEC /Copy:DATSOU /IS /IT /log:c:\logfile.txt /TEE

I am coping from Windows 2003 R2 Standard 32-bit to Windows 2008 R2 Enterprise 64-bit.

Now, I am not married to doing robocopy, if there is another, better solution, I am all ears, please!

Thank you!

share|improve this question
    
/Copy:DATSOU should already be copying the permissions. If it's not working, try copying in backup mode. /B. –  nojak Aug 22 '12 at 16:24
    
@nojak Would it be better if I added /ZB? So the command I have will do what I need it to do? I guess I can test it out! –  George Aug 22 '12 at 16:29
    
Probably. That's usually what I do. /ZB : Use restartable mode; if access denied use Backup mode. –  nojak Aug 22 '12 at 16:35
add comment

3 Answers

up vote 2 down vote accepted

Robocopy can do this The switches that govern this are:

/COPY:copyflag[s] : What to COPY (default is /COPY:DAT) (copyflags : D=Data, A=Attributes, T=Timestamps S=Security=NTFS ACLs, O=Owner info, U=aUditing info). /SEC : Copy files with SECurity (equivalent to /COPY:DATS).

share|improve this answer
    
So essentially by having /SEC /Copy:DATSOU in the command I am trying to run, will take care of the permissions? –  George Aug 22 '12 at 16:22
add comment

The DACL lists that actually define the permissions will only work if they are referencing domain-based security principals, OR one of the well-known SIDs (e.g.: S-1-5-18 for LocalSystem). If you have local groups in play, they won't be able to be resolved on the target server.

share|improve this answer
    
There are no local groups, it's AD based. –  George Aug 22 '12 at 20:18
add comment

This is probably a page you shouldn't be without if you're planning on using robocopy a bit.

Syntax, available switches, exit codes, file attributes, examples, known issues with different versions... really more than you'd ever want to know about robocopy. Anyways, since you have /COPY:DATSOU in your code, consider the below. Every time I see a script with /COPY:DATSOU in it, I know the author didn't do his due diligence on robocopy and give him a hard time for it.

/COPYALL : Copy ALL file info (equivalent to /COPY:DATSOU)

share|improve this answer
    
You are correct about /COPYALL, I used that originally, but my supervisor wanted to see the breakdown of the permission, so I subbed for /COPY:DATSOU –  George Aug 24 '12 at 15:41
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.