Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

copy ACLs from source to destination

KAdam January 6, 2020

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

Suggest an answer

Log in or Sign up to answer
1 vote
Answer accepted
JoliaJon January 14, 2020

I think you shouldn't use the mir flag then you can hceck this 
https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/robocopy

and you can exactly use  (try /sec swicth ) 

KAdam January 14, 2020

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 ?

JoliaJon January 14, 2020

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
KAdam January 14, 2020

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 .

KAdam January 16, 2020

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 .

1 vote
KAdam March 25, 2020

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. 

JoliaJon March 31, 2020

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 

KAdam April 19, 2020

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. 

TAGS
AUG Leaders

Atlassian Community Events