We help IT Professionals succeed at work.

Robocopy update acl rather than copy?

Hi All,

Im currently using the following script to migrate large areas of data from one server to another. My problem is that i want to do the initial data copy then apply some permission changes and then continue to run the copy nightly without wiping the changes made.

At the moment this isnt happening. As soon as i run the script it is reverting the ACL back to original.

My script is as follows:

Robocopy.exe "\\server1\share" "\\server2\share" /COPYALL /MIR /PURGE /z /r:0 /w:0 /np /LOG:C:\temp\robolog.log /ndl /tee

Is there anyway i can merge the security ACL rather than copying over exisiting?

Comment
Watch Question

NikSystems Specialist

Commented:
Have you tried the /SEC switch?

Author

Commented:
That just copies the security does it not?
Systems Specialist
Commented:
Yes, I've just read through your question again.
Try to remove the /COPYALL switch and see if your permissions will be overwritten once you apply them.

Author

Commented:
Perfect! - made updated ACL, took out the /COPYALL section of the script. Ran again and it left the security in place.

Thanks

Author

Commented:
I've requested that this question be closed as follows:

Accepted answer: 0 points for MJB2011's comment http:/Q_27478495.html#37238251

for the following reason:

Fixed
NikSystems Specialist

Commented:
Well, I'm glad it worked but I don't understand why didn't you accept my answer then?

Author

Commented:
Incorrectly closed.

Author

Commented:
Sorry incorrectly closed. Adding points now,
NikSystems Specialist

Commented:
NP, Thanks!