Photos Database Corruption

I wasn’t previously having a problem with Photos, but because I was having an issue with restoring to my new iPhone 7, so I repaired the database (after a Time Machine backup).


The Masters directory is still identical to its previous state, but many photos (basically, everything that was imported in October, and who knows what else) now appear to be missing from the Photos library. It was easy to see what was missing in a number of cases, because some are within albums and smart albums and have been synced to my iPad and older iPhone. Further, these files still exist within the Masters directory; they’re all still there. An attempt to add them back into the library, though, reveals the “duplicate photos” dialog box, and shows the appropriate thumbnail.


I do not have any hidden albums, and searches for the filenames within the Photos app do not reveal the missing photos that supposedly still exist within the library, so the files have disappeared into a tangle of broken database pointers, apparently.

Mac Pro, macOS Sierra (10.12.1)

Posted on Nov 28, 2016 8:05 AM

Reply
6 replies

Nov 28, 2016 9:40 AM in response to Osiris Ani

How do the missing photos appear: a blank space, space with exclamation mark, etc.?


Where is you library located? If it's on an external HD how is that drive formatted and connected to your Mac?


Are you running a "managed" or "reference" library? Managed is recommended.


How is your PHotos/iCloud preference pane configured? Post a screenshot of it.

User uploaded file

Nov 28, 2016 9:58 PM in response to Old Toad

How do the missing photos appear:


They don’t. That’s the problem; the first indication that the photos were ever there is their appearances in albums on my iPad and old iPhone, which were synced immediately prior to my having performed the repair. The other, as previously mentioned, happens when I attempt to add them back into the library and get the “duplicate photos” dialog box and appropriate thumbnail.


Otherwise, no other indication of their existence appears within the Photos app. They do not appear; there’s no placeholder.

Where is you library located?

This behavior is consistent whether the library is in the standard location (~/Pictures/) or on an attached Thunderbolt RAID. I know this because I repaired the same library on two different machines (the first attempt being the former).

Are you running a "managed" or "reference" library?

Its configuration is the standard, recommended managed library.

How is your PHotos/iCloud preference pane configured?

I’m not using iCloud/Photo Stream at all for my photos.

Nov 28, 2016 10:15 PM in response to Old Toad

This is the Masters directory within my Photos library.

User uploaded file

If I look for images on that date, none of the ones in this directory (in fact, none of the ones in Masters/2016/10/) are there. If I search the Photos app for “IMG_0705,” it returns a number of similarly-named files, but not this specific one. If, however, I drop this file to import it into Photos, it asks me if I want to import a duplicate file, and it will show me an identical pair of thumbnails of this image.


…but it was there immediately before the database repair. Because I synced it to a couple of different iDevices before the repair, at least I know exactly which photos are missing from synced albums (if not the rest of the library).

Nov 29, 2016 10:09 AM in response to Osiris Ani

User odysseus posted this fix for a similar situation after rebuilding/repairing his Photos library. Might be worth looking into:

Well, I've found a solution to the problem where a rebuild causes photos to appear to disappear after a rebuild. Here are the steps.


  1. Quit "Photos"
  2. Back up your Photos Library
  3. Control Click on your Photos library and delete the folder located at <library_bundle>/resources/recovery
  4. Close the Photos Library bundle and double-click it to launch Photos
  5. A new recovery folder will be created

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Photos Database Corruption

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.