Inside Aperture

Digital Media | Spotlight: Photography | Inside Aperture | Blogs

Rebuild your library database


djrebuild.jpg

It was a stroke of luck that my Aperture library was in an external hard drive when my laptop's internal drive failed. It was therefore just a (somewhat inconvenient) matter of replacing the internal drive or buying a new laptop, and then installing Aperture, plugging in the external drive back up, and accessing the library's content.

And that's what I did. I asked a Mac Genius to install a new hard drive on my laptop (on two laptops actually), and as an added measure, I got myself a new unibody MBP. And then I installed Aperture. And then I tried to access the contents of the Aperture library from the external drive.

And that's when I knew I had a problem.

Aperture would start normally when it is pointing to the library in the internal hard drive. But when it's directed to the external hard drive, it wouldn't start. It would freeze and I had to "Force Quit" the application.

Maybe, somehow, the Aperture library got corrupted? As I remember, Aperture was the last software running when the internal hard drive failed. To my mind, that seemed like a possible reason that could have led to what appears to be corruption of data.

My first impulse was to fire up Disk Utility and see if I need to verify and repair the attached external disk. I've actually been able to access it and get stuff that's in it so I didn't know if this would help. Eventually, I found out that it wasn't the solution I was looking for.

Then I tried transfering the 88.87 GB Aperture library from the external drive to another connected external hard drive. It didn't work. Somewhere in the supposedly 3 hours or so of estimated transfer time, it would stop. I tried transfering it into the internal hard drive, it didn't work either.

I also tried poking inside the Aperture library. Pressing Control when clicking on the Aperture library, I selected "Show Package Contents." I considered taking the contents out one at a time but I had a feeling it would be very messy. Besides, I might be doing it more harm than good. So, I stopped.

Searching for a solution, I came across several ideas, and one seemed very promising. How about rebuilding the library?

Well, this is what I did:

  • I opened Aperture, and in Preferences, I pointed it to the library in the external drive that wouldn't open, then closed it again.
  • To force Aperture to rebuild the library, I held down both the Option and Command keys when doing a single click on the Aperture icon from the dock to start the software.
  • In a couple or so seconds, and instead of normally opening, a dialog box appeared with the question: Do you want to rebuild your library database? The dialog box provided a bit of helpful, if not totally reassuring, information, about 3 possible options. It said that if I click on the "Rebuild Now" button, it will immediately begin to rebuild all the projects. If, however, I choose to click on the "Consistency Check" button, it's written that it "will remove any permissions problems with files in your library, and needs Administrator access." And the third option was "Quit" -- something I didn't want to do. So that left me with "Consistency Check" and "Rebuild Now." But since I didn't quite understand what "Consistency Check" will do, despite the lengthy explanation, I opted to click on "Rebuild Now." A progress bar immediately popped up, with the words "recovering projects."
  • Anxious and eager to know what will happen, I watched the progress bar. It was moving quickly. It wasn't taking longer than I expected, but then again, I didn't know what exactly to expect since this isn't something I do all the time. When the progress bar notification was almost at the end, the message changed into "validating projects." It looked promising.
  • At the end, it took about a couple or so more minutes and then the Aperture interface opened. At first, I was a bit alarmed because it showed an empty shell with nothing but the Viewer and Browser panes. The Inspector pane wasn't showing, and then I pressed "I" to try to bring it out. And like magic, there it is ... all the projects that I previously couldn't open from the Aperture library in my external drive.
It would seem that I was able to successfully rebuild the Aperture library in my external hard drive. And just to make sure that I have the data, and all the work that I have done up to that point, I decided to create a backup by exporting all projects individually to a separate location. Rebuilding the library database saved me. It might save you too.




AddThis Social Bookmark Button
Comments (8)

8 Comments

Joe Samuels said:

Did you not have a vault or a copy of the library? I use Synchronize Pro X to maintain a full copy of my library on its own hard drive and I also have several Vaults. If my main library fails, I have back-up which will enable me to get going immediately. The easiest method would be to tell Aperture to use my full copy as the library, and then to create another back-up copy.

Sounds to me like you would be cooked if your drive failed utterly, or was stolen.

Joe, this particular library is one of the mobile ones that I have and had been hit at a most unfortunate time (Is there any other kind of time in such a situation?). Yup, "cooked" is a good term, and I still keep learning the "lesson."

Joe Samuels said:

Several years ago, my Powerbook, with its Aperture Library, was stolen from my hotel room in Europe. Fortunately, I had my portable hard drive with the Aperture vault on it. I was able to hook up to another Mac with Aperture on it, and simply use my portable for the Library and I lost nothing.

I always travel with two portable drives—one with a bootable back-up on it, and another with the Aperture Vault on it. Several times, I've needed one or the other while on the road and it made all the difference.

Eric Poelzl said:

After experiencing thumbnail corruption issues, I rebuilt my Aperture 2.1.2 database as mentioned above. The result was a disastrous and catastrophic mess, leaving me with multiple "versions" of my entire library without metadata/image edits, and original referenced files with metadata/images edits disconnected from the original file, without the ability to reconnected it using the "Manage Referenced Files" command. Rebuilding also did nothing to address the thumbnail corruption. Terrible situation; no productive advice/fix from Apple, including dumping prefs, running the Consistency Check, etc. I restored from a backup library file and spent a few hours catching up to where I was. Aperture (since 2.1.2) still falsely designates portrait images as landscape (unless I first import photo from the camera to the hard disk, then import); an issue recreated at the Apple Store and tech support.

Nick said:

Hi, I just wanted to thank you for your post, i thought my library was a gonner but thanks to you i finally managed to recover 10,000+ photos. Absolute legend.

Gabe said:

I've been searching all over the web for ways of speeding up Aperture. I've noticed lately that it's running slower than usual and I'm getting beach balls when I didn't use to.

I just finished defragmenting my disks and put the Library in an external Firewire 800 disk to have application and files in separate drives. A quick test showed much improvement and Aperture is back to normal, but I'm wondering if rebuilding the Library database could speed up things even more. The problem is that everywhere I read it's a 50/50 of either it's the best thing in the world and do it often or it screwed up everything and never go there.

I think I'll just back up everything and give it a go. I'll post my results later. Wish me luck!

T'Tayo said:

Thanks for this tip. It just saved my life. I keep my Aperture library on an external drive. I had a problem with the drive directory and after fixing that I found that although I could launch Aperture and all my projects were showing there were no photos to be seen. I think I must have aged several years in the space of a few minutes as we're talking about several thousand photos and I haven't backed up for a few months. Too lazy or too busy, not sure which.

I decided to rebuild my library and, hey presto, all my photos reappeared. Went out and bought an new external drive just for my Aperture library backup.

David J said:

I having ratings problems with my projects. Thanks for all the history before your rebuild. It's exactly what I was thinking of doing. Seeing what happened to you saved me the hassle of "reinventing the wheel" instead I will just rebuild my Library :)

Thanks.

Leave a comment


Recommended for You

Tag Cloud

Stay Connected