Copiare tutti i diritti con ROBOCOPY

Argomenti vari di carattere sistemistico
Post Reply
daniele
Posts: 333
Joined: 04 Mar 2009, 13:59

Copiare tutti i diritti con ROBOCOPY

Post by daniele »

Utilizzare il seguente comando:

C:\WINDOWS\SYSTEM32\ROBOCOPY S:\Source D:\Destination /B /ZB /NOSD /NODD /E /V /TS /FP /COPYALL /MIR /PF /W:10 /R:3 /XF

se i files esistono già , può essere necessario questo comando per copiare le permissions, timestamp, attributim proprietario, info di controllo)
C:\WINDOWS\SYSTEM32\ROBOCOPY S:\Source D:\Destination /S /COPY:ASTOU /SECFIX

(notare che il comando /COPY senza la 'D' non copia i dati)

Con Windows Server 2008 ho notato che la presenza dei flag /COPYALL, /SEC, /SECFIX non era sufficiente.

NOTA IN CASO DI ACCESS DENIED: (da qui http://superuser.com/questions/25509/ro ... ion-denied)
If you copy NTFS security information (ACLs) along with file data, it is possible to copy files to which you have read access, but not write access. After such a file is copied once, and the ACLs are applied, you may find that to get an “Access Denied” error when you try to copy the file again. In this situation you should use the /B or /ZB switch to copy the files in Backup Mode.

/B copies all files with backup semantics (Backup Mode). /ZB first attempts to copy files in restartable mode (for greater resiliency) but if that fails with an “Access Denied” error it automatically retries the copy using Backup Mode.
ARTICOLO ORIGINALE: http://social.technet.microsoft.com/For ... ermissions
(Articolo di GUNNER999)
Post Reply