question

Marcus-9726 avatar image
0 Votes"
Marcus-9726 asked Marcus-9726 commented

Robocopy without security permission for copied files

I'm currently doing a file server migration using Robocopy and I've copied 1 of the folders and its subfolders+files to new server. I used the following commands to copy the folder to new server with security permissions.

robocopy \\source\share D:\share /e /zb /copy:DATSOU /r:3 /w:3 /log:D:\log\folder.log /V /TEE

After the copy, we have modified some of the folders and files permissions manually in new server. And because of this migration is still in progress so I would have to do another round of copy by using /MIR or without /MIR. At the same time, users are still creating new files in the source server.

So, I would like to know if I'm going to run another round of robocopy to keep the same set of data and preserve the permission in new server but also copy the permission of new files in source server. What switches could I use to achieve the following:

  1. Preserve the modified permissions in new server

  2. Copy the newly created files in source server with security permission

Because I have tried to do a simulation and run the command with /MIR or without /MIR. Both robocopy commands will replace the security permission in the new server. Have gone through the switches of /xc /xn but is unsure whether it will apply to folder as well or just only files. If I remove S from copy:DATSOU it won't copy the security permission of new files in source server.

Appreciate if anyone could help on this.



windows-serverwindows-server-infrastructure
· 2
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.

Hi,

Thanks for posting on our forum!

Based on your description, I would like to check something first:
What do you mean you would like to do a round copy. You mean you want to copy the files and folders that you have maunally adjusted on your new server (the destination server) while at the same time, the ongoing migration is still copying files and folders with security to the new server? What do you want to achieve by the two goals you established?

Besides, /xc /xn only serves for files, not folders, as I know.

Finally, you can research on this article to see if your issue can be self-resolved:
https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/robocopy

Thanks for your support!

BR,
Joan

0 Votes 0 ·

Hi Joan,

I've copied the folders from source to destination, and then before the cutover I will run again the robocopy command to copy the changes of files in source server. However, I've modified some of the folder permission in the destination server. And If I run again the robocopy with /copy:DATSOU it overwrites the permission in destination server. If I use /copy:DAT only, the new files that was created in source server were copied without security permission.

So my purpose is to run the robocopy command that could copy any new files/folders with permission but at the same time do not overwrite the permissions in destination server for any folders/files that I've copied and modified previously.

0 Votes 0 ·

0 Answers