Showing posts with label acls. Show all posts
Showing posts with label acls. Show all posts
Saturday, June 15, 2019
Robocopy only ACLs from source to target
set source=source
set target=target
robocopy %source% %target% /SECFIX /E /XX /COPY:ASOU /mt:128 /r:0 /w:0 /np /X /V /LOG+:ROBOLOG.TXT
To only copy ACLs from source to Target
Not modifying the data (data will remain intact)
AVOID /SEC :: copy files with SECurity (equivalent to /COPY:DATS). -> INCLUDES D
/COPY:ASOU
/XX :: eXclude eXtra files and directories.
/MT[:n] :: Do multi-threaded copies with n threads (default 8). (must be Win x64 2008 R2 or newerish)
/r:0 /w:0 - wait 0 when error, retry 0 on error
/NP :: No Progress - don't display percentage copied. (fastens the copy in theory)
/X :: report all eXtra files, not just those selected.
/V :: produce Verbose output, showing skipped files.
/LOG+:file :: output status to LOG file (append to existing log). (could also be /UNILOG+:file :: output status to LOG file as UNICODE (append to existing log).
/E :: copy subdirectories, including Empty ones.
/SECFIX :: FIX file SECurity on all files, even skipped files. (enforce matching or equal file -compared source vs target - to be processed)
/COPY:copyflag[s] :: what to COPY for files (default is /COPY:DAT).
(copyflags : D=Data, A=Attributes, T=Timestamps).
(S=Security=NTFS ACLs, O=Owner info, U=aUditing info).
If required add the backup mode (SEbackupPrivilege/SErestorePrivilege)
/B :: copy files in Backup mode.
ALWAYS TEST FIRST
SEE THE RESULTS THEN APPLY WHERE YOU NEED
Labels:
acls,
directories,
files,
robocopy
Subscribe to:
Posts (Atom)
0 comments:
Post a Comment