I'm trying to import a large (100GB+) iPhoto library located on a seemingly faulty external drive, that always yields an error -36
when I attempt to copy the library using Finder. I therefore tried the ditto
the approach suggested in this article:
ditto -v ~/Pictures/Photos\ Library.photoslibrary/ /Volumes/MyDrive/Photos\ Library.photoslibrary/
The problem is, when ditto
reaches the faulty file, I get these errors logged:
ditto: (...)/MVI_5490.MOV: Device not configured
ditto: (...)/IMG_5489.JPG: No such file or directory
Then suddenly macOS complains about the drive being ejected improperly, and the copy stops.
These two files seem to have contiguous IDs and reside in the same directory. So I guess that they're both located on a single faulty block.
I'd like to try preventing ditto
from attempting to copy these files altogether, in the hope that this will prevent the disk from failing and allow the copy to complete (I don't care about a couple photos/videos missing, and I can always rebuild the iPhoto library later on).
Is there a way to instruct ditto
to skip a known list of files?
If not, I'd accept an alternative solution (cp
command based or any other), as long as it can handle the copy the way ditto
does it (preserving ownership, permissions and such).