R
R
Reikoemco2019-11-12 10:33:27
System administration
Reikoemco, 2019-11-12 10:33:27

Why doesn't ROBOCOPY work as it should?

Good afternoon, colleagues. There is such

script
robocopy \\share1 \\share2 /E /COPY:DATS /DCOPY:T /M /ZB /R:3 /W:10 /MT:64 /SL /log:E:\robocopy_log_N.txt /V

The script works, the files are copied and everything is OK, but the "archive" attribute is not reset, although the /M key is specified. I
thought that /M conflicts with /ZB and left /M and /Z - the same story. Without the /Z key, that is, only /M, several scenarios are possible:
1) Copying "hangs" on some file
2) Files are copied, but the "archive" attribute is not reset
3) Files are copied, the attribute is reset, but copying "hangs" on a random file
What's going on? And please explain to someone how the /Z, /B and /ZB keys generally work.
What does copying in archive mode mean (?)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
akelsey, 2019-11-12
@Reikoemco

The key combination "/ZB" starts copying in the "Restart mode + backup" mode, if copying fails, it switches to copying mode in backup mode. For copying, special constants SeBackupPrivilege and SeRestorePrivilege are used - it increases the copying time, you can read about the constants here .
If copying hangs on some file, it is better to use the / W / R switches, the number of attempts and the waiting timeout, and / LOG detailed to the file - in which it will be clear if something was not copied.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question