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.
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