Skip to main content
Known Participant
February 12, 2018
Question

You may not know your Classic CC catalog is corrupt!!

  • February 12, 2018
  • 4 replies
  • 6691 views

If you regularly tick "test integrity before backing up" when backing up your catalog upon LR exit, you may be in for a nasty surprise. 

Short version: If the integrity test fails, LR backs up the catalog anyway, but it doesn't inform you that your backup is corrupted.   At least, that's what's happening to me.

For the last few days, I've been struggling to recover from Lightroom declaring that my catalog is corrupt.  I did the usual - replaced the catalog with a recent backup in order to start from there.   That's always worked for me, but not this time!  That backup was also corrupted, as were all of my recent backups.  All LR attempts at repair fail. 

There are two ways to test catalog integrity:   (A) If you have LR set to prompt you for a catalog when starting (Preferences->General), you can tick "Test integrity of this catalog" at the lower right of the catalog-selection pop-up.  (B) The other way is to tick "test integrity before backing up" in the LR exit dialog that results when LR is set to back up every time LR exits (Catalog Settings->General). 

Here's the rub:  If test integrity fails on startup (method A), a pop-up tells you so, LR exits, and it remembers that the catalog is corrupt.  But if the integrity test fails on backup (method B), you never know it - no pop-up, no email, no nothing.   What you do have is a backed-up catalog that won't pass the integrity test when restored!  This problem might might be a local hardware/software issue, but I do know that others have encountered it. (See Lightroom Classic CC Backup Catalog Corrupted - I'm in that thread, but when I realized the underlying problem, I thought it best to start a new thread). 

The obvious question is how could you be backing up a corrupt catalog if LR was working properly on it before exit?   Unfortunately, just because LR is running on a catalog doesn't mean that the catalog is clean.  Apparently, there are forms of corruption that are benign until certain operations trip up LR.   I know this from experience.  With some of my backups, LR will start OK with them (when restored), but sooner-or-later it crashes with words to the effect "LR can't read something in the catalog and has to exit."   It doesn't seem to be predictable when or how the crash happens - just like some software bugs.  

Hmm, maybe this is a Classic CC bug - wouldn't that be nice!. 

So what likely happened to me is that, at some point in the past, my catalog became corrupted in a way that didn't result in a crash until the just the other day.  In the meantime, I've been backing up that corrupted catalog, feeling completely safe since I always tick "test integrity before backing up".   I haven't yet had time to see how far back I have to go to find a clean catalog, but I already know it's months.  

I hope this isn't a universal problem (well, in a way I do, since then Adobe would jump on it!), but I would appreciate any advice and also knowing if there are others dealing with this. 

As an aside: 

It's too bad you can't completely regenerate a catalog by exporting everything and importing to a new, clean catalog.  That works, of course, for  image folders, but I don't know of any reasonably easy way to export/import collections and published collections.  You can export a collection as a folder and import it to the new catalog, but this is very laborious if you use collections extensively.   Regardless, I don't think LR facilitates moving published collections from one catalog to another (you can treat them as regular collections, but no publishing info is carried over).  I don't understand why Adobe can't provide a tool for complete export/import. 

Thanks.

js

    This topic has been closed for replies.

    4 replies

    Inspiring
    June 14, 2018

    My guess is that many people have corrupt Lightroom catalog databases and may not know it. I have a catalog that shoots me some obscure SQL error when accessing certain folders at random times. Won't see the error very often but when you're in Lightroom all day every day, I will see it every few months when accessing the folders that are corrupted in the sql database. It may or may not be hindering the performance of rest of the catalog, I am not sure.

    HenryCHWong
    Participating Frequently
    February 13, 2018

    Have you used 3rd party software, like Sqlite, to check the integrity of LR database?

    Just Shoot Me
    Legend
    February 12, 2018

    A corrupted catalog is caused by some type of fault in the system. LR is not corrupting its own catalog file.

    Yes there have been a few threads on this topic. But compared to the number of LR installs that number of corrupted catalogs is probably something like .00000000000001% of all LR installs.

    johnshoreAuthor
    Known Participant
    February 12, 2018

    Just Shoot me (sorry, don't see the quote button) - 

    I don't doubt that a system fault caused the corruption.   But apparently, LR can run fine on a corrupt catalog (I'm sure of this - many experiments) until something trips it up - meanwhile, I was backing up a catalog that had become corrupted. 

    js

    Legend
    February 12, 2018

    But if the integrity test fails on backup (method B), you never know it - no pop-up, no email, no nothing.   What you do have is a backed-up catalog that won't pass the integrity test when restored!

    How do you know this is true? What is your evidence?

    Just because you never received a notification at that time of a corrupt catalog, that doesn't rule out hard disk malfunction as the possible (and very likely) cause of the corruption. Your catalog was find when it was backed up, and then something went bad on the hard disk, and now you have a corrupted catalog file.

    johnshoreAuthor
    Known Participant
    February 12, 2018

    Hi dj_paige - The answer is because this happens with numerous different backups, restored to different disks, and on different computers.  The catalog was not fine when I backed it up - there was a corruption lurking in it - one that is caught by the integrity test on startup. js