# Corrupt Catalog, please help!



## mega789 (Mar 21, 2020)

Hello!
I have a corrupt Lightroom catalog. *Over 20k images on this*! *Please I hope someone can help me.* I followed Holger's video on youtube 
*(How To Fix A Corrupted Lightroom catalog file using SQLite).*

The command prompt showed MANY errors and I still cannot open the file. I sent the file to Holger hoping he could help me. He did try to help and this was his response:
_I tried some thing on your file, but only got so far that the file opened in Lightroom, but it didn’t show any images. Looking at the sql file, there is a lot of information about edits, but it has major problems with two local IDs. So I think the develop,emt information is there, it just doesn’t find anything about the images._
_There is nothing I can do at this point, but you might visit Victoria Brampton’s Lightroom forums. She is in contact with at least one Lightroom engineer. Maybe they can help._

Here is a little more info:
This is pretty much my last resort. I spent time working with Dan Hartford on fixing my lightroom files as it was a disaster. Then I spent SEVERAL days, nights and hours merging my catalog/images all into one nice catalog and moving thousands of images onto one drive. I was at over 20K images from the past few years. Well, a few days ago disaster struck and my catalog is now corrupt. Unfortunately I do not have a backup. 
I don't even know how it happened, but I was too tired and somehow dragged a .LOCK file and a .WAL file from an older version of this catalog on another drive into the folder of my now Master catalog. At the point everything froze and I could not delete those .lock and .wal files. When I try to open my catalog, Lightroom would say Assertion failed. 
I restarted the computer, and was able to delete those.lock and .wal files, but I I still got an error that says Assertion failed.  So, I updated my lightroom Classic from 7.4 version to now 9.2 version. Other catalogs upgrade and open fine, but my master catalog won't upgrade or open. It says it is damaged. I tried to rollback my Lightroom but the oldest version I found was 8.2.1 so I downloaded that one. I get assertion failed with this version as well. I really hope someone can help me. Thank you!!!


----------



## clee01l (Mar 21, 2020)

I guess you now have learned the valuable lesson of the importance of backups. 
I hope you can come up with a copy of your original corrupt catalog before everyone started tinkering with the SQL tables. 

If you can’t provide that, I won’t offer any hope that Victoria’s Adobe contact will be able to do any more than those before him. 

Zip up the catalog file (only the file with the .lrcat extension) and use www.wetransfer.com to send it to [email protected]. 


Sent from my iPad using Tapatalk


----------



## mega789 (Mar 21, 2020)

clee01l said:


> I guess you now have learned the valuable lesson of the importance of backups.
> I hope you can come up with a copy of your original corrupt catalog before everyone started tinkering with the SQL tables.
> 
> If you can’t provide that, I won’t offer any hope that Victoria’s Adobe contact will be able to do any more than those before him.
> ...



YES after learning this lesson, I most definitely have made several copies of this catalog now before giving it to anyone. 
Thank you for the links. I will send it right away.


----------



## mega789 (Mar 21, 2020)

Also just want to add that even after restarting the pc, the .lock and .wal files are still in the folder


----------



## clee01l (Mar 21, 2020)

The .wal file is the “write ahead log”. It contains data not yet added to the catalog. Deleting this file can corrupt the catalog database It should only be removed by Lightroom. The .lock file is to prevent 2 instances of the app from writing to the the same catalog. It often gets left behind when LR crashes. It needs to be deleted before LR. Can open a new instance


Sent from my iPad using Tapatalk


----------



## Califdan (Mar 22, 2020)

I've been working with Mega789 on this corrupt catalog problem and based on emails we've traded, and as she said above, she inadvertently copied a WAL file form an older catalog folder to her new catalog folder.  I'm guessing that the WAL file she copied had pending Write Ahead entries from the old catalog that were then applied to the new catalog.  But, as the new catalog had different content (index numbers point different places, etc) when it applied the pending WAL instructions it caused internal inconsistencies in the DB.  

I also had her verify that she  didn't have other generic backups that might have grabbed the catalog file and she does not.  She does still have the Catalog from which the WAL and Lock files were copied, but as she said, this catalog was prior to doing a large amount of image folder moving and import from another catalog operations intended to consolidate several catalogs into a single catalog and migrate her scattered images into a single folder structure on a single drive.

If we take her back to that prior catalog, she'll have to relink the moved image folders and probably some randomly moved images as well and then repeat all the other work.  

Over the years she e has done a large amount of image edits which would be bad to lose, so I'm having her check to see if she has  XMP files.  I'm pretty sure she doesn't as I don't recall seeing any as we poked around her image folders.   If she did have them it would open the option to  just start a new catalog and import everything again.

However, before jumping into less than ideal secnario's I suggested she see if Victoria or one of her contacts could fix the damaged catalog (eternal optimist, but if you don't shoot you can't score).

Dan


----------



## mega789 (Mar 22, 2020)

Califdan said:


> I've been working with Mega789 on this corrupt catalog problem and based on emails we've traded, and as she said above, she inadvertently copied a WAL file form an older catalog folder to her new catalog folder.  I'm guessing that the WAL file she copied had pending Write Ahead entries from the old catalog that were then applied to the new catalog.  But, as the new catalog had different content (index numbers point different places, etc) when it applied the pending WAL instructions it caused internal inconsistencies in the DB.
> 
> I also had her verify that she  didn't have other generic backups that might have grabbed the catalog file and she does not.  She does still have the Catalog from which the WAL and Lock files were copied, but as she said, this catalog was prior to doing a large amount of image folder moving and import from another catalog operations intended to consolidate several catalogs into a single catalog and migrate her scattered images into a single folder structure on a single drive.
> 
> ...



Thank you Dan for adding the additional info here


----------



## clee01l (Mar 22, 2020)

Califdan said:


> she inadvertently copied a WAL file form an older catalog folder to her new catalog folder. I'm guessing that the WAL file she copied had pending Write Ahead entries from the old catalog that were then applied to the new catalog.


The only way that might happen is if the catalogs associated with the  WAL file has the same name which was embedded in the WAL file name.   Anyhow. I gave Victoria a heads up soil the file is in her mailbox the Adobe expert can work on it.


----------



## mega789 (Mar 22, 2020)

clee01l said:


> The only way that might happen is if the catalogs associated with the  WAL file has the same name which was embedded in the WAL file name.   Anyhow. I gave Victoria a heads up soil the file is in her mailbox the Adobe expert can work on it.



Yes both catalogs did have the same name.  I guess now we wait and see if they can fix it.


----------



## Victoria Bampton (Mar 24, 2020)

Got it and forwarded it on. I'll let you know as soon as I hear back.


----------



## Samoreen (Mar 24, 2020)

Hi,

After lesson #1 from *clee01l, I would add this one : if the XMP files had been generated for all images either automatically or manually (Select + Ctrl-S), the catalog could have been rebuilt rather easily.*


----------



## PhilBurton (Mar 24, 2020)

clee01l said:


> I guess you now have learned the valuable lesson of the importance of backups.
> I hope you can come up with a copy of your original corrupt catalog before everyone started tinkering with the SQL tables.
> 
> If you can’t provide that, I won’t offer any hope that Victoria’s Adobe contact will be able to do any more than those before him.
> ...


Folks,

Cletus is _absolutely, completely _on target here.  I want to repeat, for emphasis, that backups are critical.  

*BACK UP EVERY SINGLE TIME YOU EXIT LIGHTROOM*.  

Sorry to be repetitious, but a few minutes waiting for Lightroom to optimize the catalog, important in its own right, and then do the backup, is "cheap insurance" against the loss of the catalog or hours spent on recovery.

Phil Burton


----------



## mega789 (Mar 25, 2020)

PhilBurton said:


> Folks,
> 
> Cletus is _absolutely, completely _on target here.  I want to repeat, for emphasis, that backups are critical.
> 
> ...



Yes I definitely learned my lesson! *Everyone please learn from my mistake and DO BACKUPS!* In the past I have done backups of my catalogs, but of course I decided not to do it with such a critical catalog and of course it was the first time I ever damaged a catalog and actually needed the backup...I will also make copies and put them on different hard drives in addition to regular backups.


----------



## clee01l (Mar 25, 2020)

mega789 said:


> Yes I definitely learned my lesson! *Everyone please learn from my mistake and DO BACKUPS!* In the past I have done backups of my catalogs, but of course I decided not to do it with such a critical catalog and of course it was the first time I ever damaged a catalog and actually needed the backup...I will also make copies and put them on different hard drives in addition to regular backups.



Both are important and necessary. Lightroom makes a backup on exit. This is a snapshot copy. It should be saved on a different disk from the master catalog. 
Nothing can replace a System Backup app the back up all of your critical data including catalog, backup catalogs and original images 


Sent from my iPad using Tapatalk


----------



## Victoria Bampton (Mar 25, 2020)

It's not great news I'm afraid. He said:


> This one looks messy. The repaired catalog is 1/3 the size of the original. I am guessing there is little of value in this catalog repair but the customer can give it a try and see if there is something salvageable.


It's on its way back to you.


----------



## mega789 (Mar 25, 2020)

Victoria Bampton said:


> It's not great news I'm afraid. He said:
> 
> It's on its way back to you.


Ugh I had a feeling  When I tried to repair it, I was only able to get 64,000kb out of the over 200,000kb and couldn't open it still. Guess I'll take a look and see if it helps me somehow.  Thanks a lot for trying! Hard lesson learned!


----------



## jjpgds (Aug 24, 2020)

Hi everyone,
I am new here!

I found this thread and I also need help with a corrupt catalog.
Lightroom opens the catalog but after a few seconds gives me the corrupted error message.
I have tried several methods I found online but no luck...
Last back up doesn't have what I need... so I also learned from that mistake. Backing up every time I close Lightroom ever since!
I am wondering if anyone can offer help with this.
By the way...since the last upgrade, I noticed that Lightroom is much slower!

Cheers,
Joe


----------



## Paul McFarlane (Aug 25, 2020)

jjpgds said:


> I found this thread and I also need help with a corrupt catalog.


Hi Joe

If you'd like to send it to us we'll take a look, see if something can be done. Send to [email protected] and we'll let you know.


----------



## Paul McFarlane (Aug 26, 2020)

We're looking at it and will involve Adobe, will let you know once we hear.


----------



## Paul McFarlane (Aug 26, 2020)

Hi Joe

Sorry, we tried, Adobe tried, can't repair that one. Back to backups I'm afraid!


----------

