question

DaisyZhou-MSFT avatar image
0 Votes"
DaisyZhou-MSFT asked JeremyGamble-6123 commented

Robocopy everything to another drive

Its a Repository server with hundreds of shares having thousands of permissions granted to large number of AD security groups. I have to expand a MBR disk1 beyond 2TB on Windows 2016 VM. For that, I attached another GPT disk2 of 2.5TB and now have to migrate everything from disk1 to disk2.
Need help with Robocopy command to copy everything with all directory structure, security permissions, ACLS etc as it is on new disk.

Source link:
https://social.technet.microsoft.com/Forums/en-US/cef41acf-079c-40f6-9aa7-120cc2b8e47d/robocopy-everything-to-another-drive?forum=winserverMigration

windows-server-migration
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

FanFan-MSFT avatar image
1 Vote"
FanFan-MSFT answered JeremyGamble-6123 commented

Hi,

Need help with Robocopy command to copy everything with all directory structure, security permissions, ACLS etc as it is on new disk.

Please refer to the following command:

robocopy <source path> <destination path> /Copyall /S /E /dcopy:T /b /R:3 /W:1 /Log:C:\robocopy-log.txt /NP

And for detail information about Robocopy, please see the official document over here:

https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/robocopy

Please attention that robocopy cannot copy share permission. Share and share permissions are in the registry, not part of the file system. Robocopy handles NTFS permissions with the command noted. For shares, you need to copy registry entries.

https://support.microsoft.com/en-us/help/125996/saving-and-restoring-existing-windows-shares

Hope this can help you a bit.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I'm looking into ROBOCOPY for a similar purpose as the OP, but I had a quick question about your answer: Don't the /S and /E flags contradict each other, and which would ROBOCOPY "default" to using in that case?

/S :: copy Subdirectories, but not empty ones.
/E :: copy subdirectories, including Empty ones.

0 Votes 0 ·