Repair of corrupted catalogs

Status
Not open for further replies.

Tomiron

New Member
Joined
May 28, 2012
Messages
3
Location
Sweden
Lightroom Experience
Advanced
Trying to open a corrupt catalog of mine makes LR freeze forcing me to kill the actual LR-process to proceed. I also need to delete the preference files to start LR again. It is not possible to import any data from the corrupted catalog to a new one. (My latest backup catalog works just fine though, but lacks quite a few hours of work...)

Is there by any chance a way to check integrity or do any other kind of catalogue repair of corrupted catalogs that doesn't open in LR? If I'd been more of a tech-pro I'd might been successful in using sqlite3 or sqlite analyzer to check the database. Now is that not the case..

I'm aware of that holding down the Alt-key (on Win) or Opt-key (on Mac) while simultaneously clicking on the LR icon in the dock cause LR to open but not to open the default catalog. Instead it shows a dialog with a list of available catalogs and an option to create check integrity of each catalog. In my case - this doesn't work. If I choose my corrupted catalog following this procedure this will still cause LR to crash.

Working in LR 4, Win7 64 bit, 4GB RAM, accessing catalog and previews from an external drive, images stored on a multiHD-NAS.
 
As you use a Macintosh, don't you have a Time Machine backup? If you don't, buy an external HD today and start making backups! No doubt you have more valuable stuff on your HD than just a Lightroom catalog...

Hi Johan, Yes, your very right and I have now started this process. I bought I new hard drive to replace the damaged one so know all the files that were recovered via a DataRecovery company have now been transferred on to my new portable HD. I have also now got another to back up the external HD. Also as an even more back up.. I have just signed upto to BACKBLAZE, an unlimited online cloud storage so that a another backup can be made.
 
Hi Johan, Yes, your very right and I have now started this process. I bought I new hard drive to replace the damaged one so know all the files that were recovered via a DataRecovery company have now been transferred on to my new portable HD. I have also now got another to back up the external HD. Also as an even more back up.. I have just signed upto to BACKBLAZE, an unlimited online cloud storage so that a another backup can be made.
sadly I did not have a time machine back up.
 
Hi Amraiz & Holger, welcome to the forum!

No backup catalogs anywhere to be found? Perhaps on another drive?

If you'd like to zip the original file and send it to using www.wetransfer.com to [email protected], I'll pass it on to a Lightroom engineer, who has the best shot at recovering it, if it's recoverable.

Hi Victoria, just wanted to let you know that I have sent the files yesterday via wetransfer. Pls do let me know if you receive them . Many Thanks
 
Got them and forwarded to Paul. I'll let you know when I hear back (obviously he's off at weekends).
 
Hi Victoria and all,

I have the same problem as many before me - my Lightroom catalog got corrupted and I'm looking for some help...
Lightroom isn't able to repair the catalog file on its own - it asserts and crashes when I attempt that. I tried the SQLite dump/recreate option and it seems the DB is structurally fine, the dump looks to contain a ton of useful information (history of photo edits etc.) but some indices/SQL constraints seem corrupted - here's what I get when I'm importing the SQL dump file to a new DB:

Error: near line 3154091: UNIQUE constraint failed: AgMetadataSearchIndex.id_local
Error: near line 3154092: UNIQUE constraint failed: AgMetadataSearchIndex.id_local
Error: near line 3154093: UNIQUE constraint failed: AgMetadataSearchIndex.id_local
Error: near line 3154094: UNIQUE constraint failed: AgMetadataSearchIndex.id_local
Error: near line 3154700: UNIQUE constraint failed: AgMetadataSearchIndex.id_local
Error: near line 3154701: UNIQUE constraint failed: AgMetadataSearchIndex.id_local
Error: near line 3154702: UNIQUE constraint failed: AgMetadataSearchIndex.id_local
Error: near line 3154703: UNIQUE constraint failed: AgMetadataSearchIndex.id_local
Error: near line 3154704: UNIQUE constraint failed: AgMetadataSearchIndex.id_local
Error: near line 3154705: UNIQUE constraint failed: AgMetadataSearchIndex.id_local
Error: near line 3154706: UNIQUE constraint failed: AgMetadataSearchIndex.id_local
Error: near line 3154707: UNIQUE constraint failed: AgMetadataSearchIndex.id_local
Error: near line 3154708: UNIQUE constraint failed: AgMetadataSearchIndex.id_local
Error: near line 3154709: UNIQUE constraint failed: AgMetadataSearchIndex.id_local
Error: near line 3154710: UNIQUE constraint failed: AgMetadataSearchIndex.id_local
Error: near line 3154711: UNIQUE constraint failed: AgMetadataSearchIndex.id_local
Error: near line 3154712: UNIQUE constraint failed: AgMetadataSearchIndex.id_local
Error: near line 3154713: UNIQUE constraint failed: AgMetadataSearchIndex.id_local
Error: near line 85489365: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489366: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489367: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489368: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489369: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489370: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489371: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489372: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489373: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489374: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489375: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489376: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489377: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489378: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489379: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489380: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489381: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489382: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489383: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489384: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489385: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489386: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489387: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489388: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489389: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489390: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489391: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489392: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489393: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85489394: UNIQUE constraint failed: AgHarvestedExifMetadata.id_local
Error: near line 85527105: UNIQUE constraint failed: AgLibraryImageSyncedAssetData.image, AgLibraryImageSyncedAssetData.payloadKey


Any hints how to debug this further and restore as much information as possible? Alternatively, if a Lightroom engineer could take a look, that would be even better!

I uploaded my corrupted catalog file (~2.38 GB) and the SQL DB dump (~1.94 GB) here:
http://szef.niente.eu.org/~kinia/LR/catalog.lrcat
http://szef.niente.eu.org/~kinia/LR/catalog.sql

Thanks,
Violet.
 
I've forwarded it to the engineer Violet.
 
Your catalog's on its way back to your outlook email address. Paul said "I was able to recover the majority of the catalog, but there was some corruption in some critical areas so some images may no longer be in the catalog."
 
Victoria, sorry to follow up on this so late but I was only now able to rebuild my OS after a hard disk failure (that's what caused the catalog corruption in the first place, it seems) and try out the repaired catalog. I'm still getting an "assertion failed!" pop-up when trying to open the repaired file, sometimes (but not always which is odd) followed by Lightroom crashing. Any hints how to debug this further? Did the repaired catalog open fine for Paul?

Thanks,
Violet.
 
He likely ran it through his repair tools, rather than opening in Lightroom. I've just tried it and it's not looking good here either. It may be the end of the road for the catalog, but I've just pinged him to check whether he has any more ideas.
 
Paul's just emailed back. He gave your catalog another shot but said it turned out it was corrupted beyond repair, sorry.
 
Thanks for your help anyway.
FWIW: I managed to restore some of the most critical data myself (edits history was what was important for me) by creating a new empty catalog, importing all the original photos into it and transferring the contents of one of the tables from the old catalog to the new one while adjusting file/image IDs. It's not ideal but it's better than losing all the data :)
 
Have you tried backing up to another location, just to humor it? Has this catalog always had issues?
 
Yes I have and I also have made a blank new catalog and tried to import the bad one to that. I have also tried to restore from backups but nothing helps.
I noticed this problem after I uppgraded to LR 2015.8. Before that the catalog worked just fine.
 
A long shot... what happens if you rename it, removing the ä characters from the name? I'm wondering if there's a bug with accented characters.
 
Hi, tried that but didn't help. It wasn't a problem before either. I have of course file and disk backups which are essential in this situation, but of course Light Room's own backup should work too.
Any more ideas ?
Edit: May be i'Il just try to make a new catalog and import the bad one piece by piece so that I can find out what part of the catalog is the cause for the problem...i'll let you know what happens.
 
Last edited:
Hi, did that. Hopefully something can be done :) Thank's for quick replies. Goin to shoot some photos meanwhile :) Seems to take a while before the upload is done...
 
Well the good news - or the bad news - is it backs up perfectly on my Mac but not on my Windows 10 VM. With your permission, I'll attach the catalog (no previews) to the bug so the engineers can reproduce it easily.
 
Hello Victoria. First of all thank's for help. I downloaded and copied the config.lua as instructed and it seems to do the job. Excellent :) Waiting for the final fix though ;) One happy man here :)
 
Status
Not open for further replies.
Back
Top