An inconsistency in your database has been detected…
Posted on January 07th, 2008 in Aperture
Uh oh. You know it’s not going to be a good day when you see this dialog box while working with Aperture.

The relatively quick (and usually successful) fix is to relaunch Aperture while holding down Command & Option as the above dialog box states. This time, however, that isn’t working. I’m getting this same warning during the database rebuild itself… and each of the subsequent half dozen rebuilds I’ve tried.
OK, so you say I should restore from a Vault. I tried that. It turns out that I restored from a backup of a corrupted source. Two backups of a corrupted source.
So what’s a guy to do? Here is my plan & how things worked (and sometimes didn’t)…
- Back up Aperture Library
- Copied Library to external FW HD
- Rebuild database
- Errors galore
- Drink
- Shot of Jameson makes things seem better
- Delete database from Library bundle (just in case the built-in rebuild isn’t real thorough)
- Errors galore on rebuild. Lost access to Vaults! Glad I have a backup!
- Time to get serious – problem isolation
- Rebuild database 1 Project at a time
- When you Command-Option launch Aperture, you have the option to rebuild the database immediately or ‘later.’ What later means is that the individual Projects and Albums will be rebuilt when you select them.

My plan is to select each individual Project and Album to see where I start to get errors. As soon as I started rebuilding the Project that contains our wedding photos (of all projects!), I started getting database errors. - I’m really glad that Apple put that option in there.
- Excise the problem project
- I quit Aperture, and opened the Library. I found the suspect .approject bundle and removed it from the Library. I then restarted Aperture with Command-Option pressed and continued my investigation.
- 3 problem Projects
- My Library is now functional, but without 3 Projects. Only 1 of these has been backed up to Disc. That means that I may have to rebuild 2 Projects from scratch.
- Back up Aperture Library
- Copied Library to external FW HD again. I now have lots of copies of this darn thing.
- Check Vault backups
- I opened up a Vault and dragged one of the corrupted Projects into Aperture to see what would happen. Yep, you guessed it- the Project caused database errors.
- Problem isolation step 2
- We used to call this the split-half search. It was really useful for trying to find out where your pre-Mac OS X extension conflicts were… ahhh the good old days! Anyhow, I decided that I can live without the Albums contained within the Projects so I pulled them out of the Project folders that I extracted from my Library. I then tried importing the Project.
- Success!
- Apparently all 3 of my corrupted Projects were causing problems because of Albums that were in the Project. I’m sure I’ll miss those Albums, but I would miss my images way more. I’m not sure what in those Albums caused the problem and I’m not sure which Albums were the cause, but my Library is almost completely rebuilt and ready to be Vaulted.
- Next Steps
- I’m exporting my Aperture metadata as I write this. I will be sure to continue to do this periodically. I think that I will begin implementing the following data preservation strategy:
- Keep Aperture Projects sized to fit a single-layer DVD (script)
- As soon as I finish adding masters to a Project, I will archive it to DVD
- When I burn a Project DVD I will export a complete metadata file
- I will write an AppleScript to make a list of every image in every Album (in case I have to rebuild some Albums)
- Tell you all what I did in case someone else ends up in the same situation
What did I learn?
- Take Project snapshots
- Export metadata (File -> Export -> Export Metadata)
This will give you a tab-separated text file with the metadata for all of your selected images.
Do this.
Technorati Tags: Aperture
Tags:

This post has 4 comments
January 13th, 2008
Quickest way to fix this problem is
1. Make a copy of your Aperture Library.
2. Go back to the original Aperture Library and right click or Ctrl Click the library and select show package contents. Inside this folder you’ll see a folder callled Aperture.aplib and a file called ApertureData.xml Trash both of these and clear your trash.
3. Re-start aperture, it will be forced to do a library recover and may take some time depending on the amount of images you have inside.
One thing to note however is any vault you had before will no longer be available, Best thing to do is once aperture is up and running again is to create a new vault and back up aperture to that, It will again take some time.
This will (should) get you back up and running again. when everything is working to your satisfaction don’t forget to delete the Aperture Library Copy.aplibrary.
January 14th, 2008
Eoin-
Those files were part of what I’d deleted as part of my “Delete database from Library bundle” step. In this case, it didn’t help.
Good tip tho!
January 30th, 2008
Thanks. This was very helpful. I imported a bunch of folders form an old iphoto library and the automatically generated albums were the culprit. Erasing them directly within the aperture library was the only way it worked.
April 11th, 2009
I’m having this problem too and appreciate the steps. I’m also thinking my last step may very well be: move to Lightroom.