Robocopy clobbering files

jarednichols
Honored Contributor

Does anyone (Don perhaps?) have deep experience with Robocopy? I'm using it to daily replicate my DPs but there are some files that constantly get clobbered and re-copied. The issue is that these are some of my large disk image files (like 5GB) so it's really a pain re-doing that across international links. I've tried /MIR, /E /Purge and now just /E but it still sees large files as newer on my source than destination.

I suspect it has something to do with these large files taking long enough to write that the dates and times are off, but I can't be sure. I think if I could force it to look at date vs time that may help. Perhaps the /maxage or /minage flags?

1 ACCEPTED SOLUTION

jarednichols
Honored Contributor

Fixed it!

Honestly it was a self-inflicted gunshot wound to the foot. I have no shame, so here's what happened:

It seemed like hourly, files would go missing in my backup JSS's CasperShare. Only this server! All my other distribution points were fine. I turned on file auditing and it was my domaincasperadmin account doing the deletions. Odd. Then I looked at the source IP address: It was a sandbox server that I had cloned from PROD awhile back.

Turns out Robocopy was working just fine. It was just robocopying (with a /MIR flag) from my sandbox master to my prod secondary. It was removing files the sandbox instance didn't have (just like I had told it to.)

D'oh!

View solution in original post

9 REPLIES 9

donmontalvo
Esteemed Contributor III

Not sure if you meant me...I'm still trying to find out why Restart is in the Start Menu...clueless on Wintel platform. :(

Our Wintel guru who handles infrastructure for tons of environments just walked by and I showed him your post. His response:

Tell him to have his Wintel team set up DFS...or if he needs to do a one-off (single copy) tell him to look at BITS.

PS, This guy oversees infrastructure for a collective user base total of over 8 figures (Wintel environments of course). ;)

Don

--
https://donmontalvo.com

Kumarasinghe
Valued Contributor

This is the one we use and works without any problems. This is a PowerShell script but you can get the robocopy options we used from it. https://jamfnation.jamfsoftware.com/discussion.html?id=4127#responseChild24180

jarednichols
Honored Contributor

Interesting, your options are pretty much the same as mine. One thing I did see is that this is only happening on one particular server - the one that is also my JSS failover for the database. What I'm doing differently is replicating the CasperShare hourly instead of daily like the rest of my DPs. My other DPs all seem to be okay. I'm going to try backing down the interval to every 3 hours and see how that goes.

jarednichols
Honored Contributor

Fixed it!

Honestly it was a self-inflicted gunshot wound to the foot. I have no shame, so here's what happened:

It seemed like hourly, files would go missing in my backup JSS's CasperShare. Only this server! All my other distribution points were fine. I turned on file auditing and it was my domaincasperadmin account doing the deletions. Odd. Then I looked at the source IP address: It was a sandbox server that I had cloned from PROD awhile back.

Turns out Robocopy was working just fine. It was just robocopying (with a /MIR flag) from my sandbox master to my prod secondary. It was removing files the sandbox instance didn't have (just like I had told it to.)

D'oh!

resmartin
New Contributor

Long Path Tool can simplify and probably end your problems in unlocking, managing and renaming files that appear to have a long filename.

jack_reacher
New Contributor

nice article

dannydan
New Contributor

I wish I could help you but command line is not really my cup of tea (I'm not a techie). So I use GS Rich Copy Enterprise..has good interface and just over a hundred dollars you can buy it for lifetime! so no /mir or /purge or /e ;)

georgeeerenee
New Contributor

nice article

georgeeerenee
New Contributor

lol so you’re worried about performance? how many files are you transferring exactly? the transfer speed largely depends upon the number of files that’s why we have third party tools for transferring files quickly. I have used robocopy before and it fails when the files are in reallllllllyyyyy large numbers..try gs rich copy 360…once i could transfer all my files (more than a million of them) in about 40% of time as compared to robocopy