1

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!

George
  • 500
  • 4
  • 18
  • 40
  • `/Copy:DATSOU` should already be copying the permissions. If it's not working, try copying in backup mode. `/B`. – tacotuesday 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.` – tacotuesday Aug 22 '12 at 16:35

3 Answers3

2

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).

Dave M
  • 4,494
  • 21
  • 30
  • 30
  • 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
1

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)

HopelessN00b
  • 53,385
  • 32
  • 133
  • 208
  • 1
    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
0

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.

Simon Catlin
  • 5,222
  • 3
  • 16
  • 20