Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

copy ACLs from source to destination

I am trying to copy data from a Windows Server 2012 R2 to a QNAP NAS(ext4).
I use the /MIR switch and I want to keep the ACLs on files and sub-folders unchanged.

The problem is that the ACLs in the source folder and target folder are different. I tried something like that:

robocopy <source> <target> /MIR /copy:DATS  /R:5 /MT:24 /W:1 /NP /ZB /M /V /XD *$RECYCLE.BIN* 

also I have long path names it's over 290 C .


Note : no one in other communities gave me a good answer till now !

2 answers

1 accepted

1 vote
Answer accepted

I think you shouldn't use the mir flag then you can hceck this

and you can exactly use  (try /sec swicth ) 

I need to make a clone....

so I will try the /SEC parameter.... otherwise I'll run powershell to reset ACLs on root folder accordingly...

and what about the problem of long path names ?

KAdam  , you can't call it a clone and want different permissions. 

try don't use mir flag and open the link that I mentioned . for the the problem long path ,are they all in subdir's or spread out all over the place?  You could actually do the above for these also, however, if they're all over the place, creating 100+ separate jobs would be counterproductive.  If they are within the same tree structure, create a batch that starts further down into the subdir, then you can exclude that in the batch file that copies the rest of the structure, if that makes sense.  The switch to exclude a folder is /XD dir (so, it would look like /XD \\server\share\sub1\sub2\sub3) which will definitely shorten your path names. in the other hand if you are not familiar with command line or powershell , I recommend you to use one of these GUI copying programs which I used before  securecopy quest  , gs richcopy360 for WINs and rsync for linux , all can easily solve the proplem of long path names , clone issue and other powerful copying tools .

Like KAdam likes this

thanks Jolia for your help

I will try to apply your solution ASAP and feed you back

for your recommendations , I am comparing now between (securecopy and gsrichcopy360) to choose the acceptable one for my company , as now  we are moving to  leave coding and to use GUI SWs .

thanks Jolia again , an Experienced friend  informed me that it your solution is smart  ,but when we tried to apply your solution we found that it will take too much time so we switched to gs richcopy360 , it works well , solved the problem off ACLs and also the problem of long path names .

Hi JoliaJon , thanks again for your recommendation, we have a situation here in my company that all employees will work from home because of coronavirus and all employees will send tasks via gs richcopy360 standard from home to our server in HQ, my question is, is standard enough in this issue or should we use the enterprise version? because we do not need any future problems. 

It depends on what option or features you will need , but if you need to know the  difference between the two versions , you can back to gurusquad site and download the admin guide , I think it will help 

Hi again JoliaJon , thanks for your advice, backing here again to share my experience with you, we switched to the Enterprise version because there is a helpful feature called Byte level replication which transfers just the changed data in a file when synchronizing, instead of the entire file. This is useful in saving bandwidth, especially when dealing with large files. 

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events