For the first time since owning Lightroom, I have experienced a Lightroom catalog becoming corrupted. Fortunately under File>Catalog settings>Metadata, I have been writing my metadata to my .xmp side car files. Unfortunately, I did not realize when a .lrcat file becomes corrupted, the metadata does not include virtual copies of the images, or references to what catalog sets they are in. I hope Adobe changes this in the next release of Lightroom.
To back up a step, I am running a MacBook Pro on 10.5.1, working with Lightroom version 1.3.1 and working off of external hard drives where my library of images lives. Virtual copies and catalog sets are critical parts of my workflow, and I would rather scrub down my bathroom walls with comet than manually reconstruct both of those aspects of a major edit. My .lrcat files reside on the external hard drives, as I don’t have space for them on my laptop, and the particular catalog that became corrupted was comprised entirely of .TIFF film scans. I believe what caused the corruption was going to the Photo>Edit in Adobe Photoshop CS3… command, choosing “Edit Original ” file in Photoshop CS3, applying a rotational change in Photoshop and then saving the file in CS3. When the edited image returned back to LR, it would not display correctly on the screen, and appeared mashed. Upon quitting and re-opening LR, the images displayed correctly on the screen, however the .lrcat file became corrupted.
WHAT DID I DO TO FIX IT?
After testing the integrity of the catalog several times, and trying unsuccessfully to use the built in utility to repair the .lrcat file, Lightroom recommended I visit a website that kindly informed me I was screwed and needed to revert to a backup .lrcat file. I am fairly fastidious about my backups, but the most recent .lrcat file I had on hand was a few days old and would mean loosing three full days of editing. I knew there must be a better way.
Fortunately for me, I was still able to open the corrupted .lrcat database even though it was unable to properly display all of the images in the library. After a lot of trial and error, I came up with a simple, elegant solution for recovering all of the virtual copies and catalog sets from the corrupted database.
THE SOLUTION:
1. If you are still able to open the corrupted .lrcat database, do so. If you can’t get past this step, you are screwed and the following steps will not help you.
2. Click “All Photographs” in the Library module, make sure all filters are turned off, and and choose Edit>Select All from the menu.
3. Go to File>Export as Catalog….
4. From the dialogue box that drops down, choose your desktop as the destination for the exported catalog file, give it a meaningful name (like “corrupted”) and be sure to uncheck the box at the bottom of the window that says “Export negative files” as this will physically duplicate all of the images that are currently in your catalog. NOTE: Whenever I import images into Lightroom, I ALWAYS “Import photos at their current location”.
5. Go to File>New Catalog and choose a meaningful destination and name for the new catalog.
6. Go to File>Import from Catalog, navigate to the corrupted catalog you saved to the desktop, locate and highlight the .lrcat file and click “choose”.
7. Lightroom will present you with the familiar import dialogue box, be sure to select “Import photos at their current location” and click “Import”.
8. Lightroom will think for a while, then most likely give you an error message that reads something like “Lightroom was unable to successfully import the catalog” … Ignore this.
9. If the computer gods are smiling on you, you now have a new, non corrupt, almost fully functional catalog, complete with virtual copies and catalog sets.
10. Go through the new catalog and check for anything that may be missing. There will be some missing images, but in my case, three or four missing virtual copies pales in comparison to having to go back and re-create hundreds of virtual copies.
If any of you have experienced or are experiencing a similar problem, and have a similar workflow of always “Importing photos at their current location”, I hope you find this material helpful, and that it helps you recover your database!
Text © Jonathan Kingston 2007



3 Comments
Yep I just went through this myself. I love light room, but come on, really?
To add to this fun, I could figure out why my harddrive was bogging down. Then I discovered I had 40gigs of image previews.
Do you keep you previews on a drive of thier own?
I have been using lightroom about a month. I had a problem with the files in downloading. First the compact flash card ’s files got corrupted. Then I could burn a cd without all kinds of dire notices popping up. I spent 12 hours yesterday downloading through my camera via the canon software and could finally burn a disc. Lightroom may be wonderful but I’ll never know. I lost 4gb of an overnight sailing race and consider myself lucky. Thanks for your post though. they made me relize how much there is to learn. Any recommendation for books or other materials. tw
Hi Tom,
Sorry to hear about your image travails. Corrupted cards do happen from time to time, but there are a couple things you can do to minimize the risk of them happening in the future.
1. Every time after you download your card to your computer, put the card in back in the camera and format it (this is different from “delete all”). There should be a “format card” option somewhere in the menu of your camera.
2. Avoid editing in the camera and deleting individual shots during the shoot. Wait until your home on your computer to do this. The evidence against this is more anecdotal at this point, but it is worth avoiding.
If and when you do get in a bind, like you just went through, there are some great recovery utilities out there that can help you recover information off of your card. I use the file recovery utility provided by San Disk called “RescuePRO”. It comes with every purchase of one of their cards and has saved me a couple of times.
Post a Comment