It didn't happen to me with the latest version of iPhoto yet. But the only solution I found to fix this kind of issues in iPhoto '09 without trashing the entire iPhoto library was to remove only the Faces related files. With the '11 version the procedure would be:
- Close iPhoto
- Find your iPhoto library
- Right click on the photo library and chose "Show Package Content"
- Navigate to the
Database
directory
Edit: If you save your iPhoto library regularly you can restore the files instead of deleting them. To open the iPhoto bundle in Time Machine follow the instructions in this answer.
- Depending on your version of iPhoto you might have to right click on
Faces.db
and "Show Original"
Delete the original Faces.db
in the newly opened folder.
- Delete the 2 Faces files in the
Database
directory
- Relaunch iPhoto
- Go to your Photos library
- Select all the pictures (click on a picture then ⌘+A to select all pictures).
- Then in the "Photos" menu select "Detect Missing Faces"
You could also try removing only some of the files in the Faces directory before and relaunching iPhoto to check which file might be corrupted in your case.
I've resolved the problem, and it wasn't pretty.
It starts with iPhoto 8 ('09) on my iMac. This library had a bunch of "referenced" photos, ie, photos whos image files were outside of the iPhoto Library folder. In iPhoto 8 this was handled by creating an OS X alias file in the Originals folder within the iPhoto Library folder.
Then I wanted to move my library to my new MacBook Air running Lion and iPhoto 9 ('11). Forgetting that I had referenced files in my library I just copied the iPhoto Library folder from my iMac to my MacBook Air as the Apple support docs say (they don't mention anything about referenced files). Of course the referenced files were not copied to the MacBook, but everything appeared to be OK.
Start iPhoto 9 on my MacBook and it upgrades the library. It can't find the referenced images of course, but there's no warning or anything. iPhoto 9 has a totally different folder and database structure. All the information it needs about where to find an image is now in the Library.apdb SQlite database file in iPhoto Library/Database/apdb/. In that db there's a table called RKMaster which stores the info about each photo. RKMaster has a column called imagePath which is where the full path of the original image file is supposed to go. However, since my referenced images were not available during the iPhoto library upgrade it just set these all to Masters/<image file name>
, and stored the alias information from the iPhoto 8 database in a BLOB column called fileAliasData. When I worked out the referenced files were missing I copied them over to my MacBook, and the iPhoto was miraculously able to find them again because of the information in the fileAliasData column in the database.
However, iTunes and other apps that link to the iPhoto library don't access the iPhoto Library database directly. They use a file called AlbumData.xml in the iPhoto Library folder. iPhoto 9 re-creates this file every time you close iPhoto. Unfortunately, what it uses to build the full image path for putting in the XML file is what's stored in the imagePath column in the database, which by now is basically garbage. iPhoto can see all the files OK, but nothing else can.
The only solution was to painstakingly fix the RKMaster records for all my referenced files so that they pointed to the correct place. I took the opportunity to copy the files to the iPhoto Library folder in the process so that now all my images are in the iPhoto Library folder. This implied setting fileIsReferenced = 0
and fileAliasData = null
for those records aswell.
Now I finally have everything working again, but it was a very long and tedious process that can only be done with some knowledge of SQL databases. Apple should really warn people about this potential problem when advising on how to move your iPhoto Library.
Best Answer
This is really easy*. But the version of the OS doesn't matter. it's the version of iPhoto that does.
So, if you have iPhoto 6 or earlier:
Go to your Pictures Folder and find the iPhoto Library Folder there
iPhoto 08 or later:
Go to your Pictures Folder and find the iPhoto Library icon there
In either case then drag the iPhoto Library from the Pictures Folder to another Disk. The Disk should be formatted Mac OS Extended (Journaled).
Once that's done test the back up - open it and view the Photos: To choose a Library to open: Hold down the option (or alt) key key and launch iPhoto. From the resulting menu select 'Choose Library'
Assuming the Library is working okay that's the back up part.
Then the restore:
Drag the Library from the External back to the Pictures Folder. Then Hold down the option (or alt) key key and launch iPhoto. From the resulting menu select 'Choose Library' and point iPhoto at the Library in Pictures.
Done.
*Easy that is unless you have a referenced Library. A Referenced Library is when iPhoto is NOT copying the files into the iPhoto Library when importing because you made a change at iPhoto -> Preferences -> Advanced. (You unchecked the option to copy files into the Library on import) The files are then stored where ever you put them and not in the Library package. In this scenario you are responsible for the File Management.
IF you have a Referenced Library then you have a much more complex job. You'll need to convert it to a Managed one, and the do the steps above.