Windows – Robocopy copying files from source to destination in backup mode and with file security permissions intact

backuprobocopySecuritywindows

I need to use Robocopy to mirror files and folders from one shared location to another, in restartable backup mode with security permissions.

My current command is:

robocopy \\sourceServer\src \\destinationServer\dest /E /XO /Z /R:5 /W:30 /MIR

I am planning to use /zb and /SEC flags, for which the user has to be given the following privileges:

 Manage auditing and security log   SeSecurityPrivilege 
 Backup files and directories       SeBackupPrivilege  

The user from which the command will be executed has R/W permissions on both the shared drives. What I need to know is do I need to give the above mentioned privileges to my user:

  1. On the source machine
  2. On the destination machine
  3. On the client machine where I am executing this command.
  4. On all the machines

Best Answer

Option 4 - but do it via a GPO at the Domain level.

Create a new group policy object (or edit an existing one if you prefer), and add the user to those two privileges under Computer Configuration --> Windows Settings --> Security Settings --> Local Policies --> User Rights Assignment. Apply the GPO to an appropriate OU and reboot the affected machines to allow the changes to take effect.

Related Question