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).

  • You can create a list of files that ditto will copy. Think the find command. see man ditto --bom bom Copy only files, links, devices, and directories that are present in the specified BOM. Jul 9, 2019 at 21:07
  • You could try out my beta file copier. It was write with your situation in mind. I've tested it on a working drive, but not on a problem drive. See:discussions.apple.com/thread/… Jul 9, 2019 at 21:35

1 Answer 1


I've worked around the problem by booting on the failing drive and copying to the external drive.

I still get the I/O errors when attempting to read the same files, but at least the drive does not eject (and the system does not crash) so I was able to go through with ditto and ignoring/logging files in error.

Otherwise, the answer to my original question seems to lie with rsync:

rsync -av --exclude='path1/to/exclude' --exclude='path2/to/exclude' source destination


rsync -av --exclude-from=FILE source destination

See this answer for more information.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .