Reliably copy files on Windows, whatever the ACLs [closed]

I often need to do a quick backup of some user data. And often I have an error message stating the ACLs do not allow to copy the whole data. So I have to modify the source ACLs, which is not a desired method.

In Windows, when a program runs under an administrator account it can not copy files when the ACLs block access to admins.
This behaviour is the same when the account belongs to the Backup Operators, because copy programs use the "copy API" and not the "backup API".

Anyone know a way to copy a directory structure whatever the source ACLs?
Maybe with a program using the "backup API"

It is better if we can decide if the ACLs are retained or not on the destination, but this is not a crucial point.


You will want to use robocopy with the /B switch, as an administrator or another account that has backup operator privileges.

The /B switch makes robocopy use the backup operator method of copying the files, letting pass over ACLs.

The default setting /COPY:DAT is to ignore ACLs on the destination.
To mirror the ACLs, you have to use /COPY:DATSO (or /COPY:DATSOU to also copy audit informations).