• Welcome to the Lightroom Queen Forums! We're a friendly bunch, so please feel free to register and join in the conversation. If you're not familiar with forums, you'll find step by step instructions on how to post your first thread under Help at the bottom of the page. You're also welcome to download our free Lightroom Quick Start eBooks and explore our other FAQ resources.
  • Stop struggling with Lightroom! There's no need to spend hours hunting for the answers to your Lightroom 6 questions. All the information you need is in Adobe Lightroom 6 - The Missing FAQ!

    To help you get started, there's a series of easy tutorials to guide you through a simple workflow. As you grow in confidence, the book switches to a conversational FAQ format, so you can quickly find answers to advanced questions. When you upgrade to subscription, there's also a Lightroom Classic version available.
  • It's Lightroom update time again! Color Grading and improved zoom across the whole Lightroom family, plus graphical watermarks for the cloud-based Lightroom apps, as well as the usual new cameras, lens profiles and bug fixes. See this blog post for Lightroom Classic and this blog post for the Lightroom Cloud Ecosystem changes.

Repair of corrupted catalogs

djeebah

New Member
Joined
Apr 29, 2013
Messages
2
Lightroom Experience
Intermediate
Hello,

Having the same problem with the lrcat catalog.
I've tried: sqlite> echo .dump | sqlite3 dbase.lrcat > TempLRCatName.sql and nothing happens, only ...>
How could I email it to you to have a try?
Many thanks!
HURRAY!!!
It was a space in front of the "echo" command :rolleyes:
After converting the lrcat into sql , I tried to convert it back to lrcat, but after two errors
Error: near line 7895330: PRIMARY KEY must be unique
Error: near line 7895580: PRIMARY KEY must be unique
it saved a zero bytes lrcat file.

So what I did was, I opened the sql file in notepad and modified the last line from
ROLLBACK; — due to errors
with the line:
COMMIT TRANSACTION;
And THEN do the
C:\SQLite>sqlite3 -init tempdbase.sql dbaseRecovered.lrcat
and... SUCCESS!!! :cool:
 
Joined
Jun 20, 2009
Messages
16,802
Location
Houston, TX USA
Lightroom Experience
Power User
Lightroom Version
Cloud Service
Djeebah, Welcome to our forum. I am glad to see more SQL literate users in this forum. And I am glad that you were able to repair your own corrupted catalog.
I would like to emphasize one important point for many LR users that may find themselves in this situation and be tempted to resolve it with this solution. Always before attempting any SQL user spawned updates to the catalog make a copy of the catalog file as a fall back just in case you make things worse instead of better.
 
Joined
Sep 29, 2007
Messages
22,684
Location
Isle of Wight, UK
Lightroom Experience
Power User
Lightroom Version
Cloud Service
Welcome to the forum Djeebah, glad to have you here!
 

greener1

New Member
Joined
Oct 24, 2013
Messages
1
Lightroom Experience
Intermediate
Lightroom Version
please help! I'm a college student and really nervous because my Lightroom catalog is corrupt and i dont know how to use SQL and have no script writing ability. can someone please help me out! i have tried all they other ways people have suggested and i dont seem to have any effect on recovering the catalog
 
Joined
Sep 29, 2007
Messages
22,684
Location
Isle of Wight, UK
Lightroom Experience
Power User
Lightroom Version
Cloud Service
Hi Greener, welcome to the forum. Do you not have any catalog backups? And do you know what happened to your catalog to cause it to become corrupted.
 
Joined
Jun 20, 2009
Messages
16,802
Location
Houston, TX USA
Lightroom Experience
Power User
Lightroom Version
Cloud Service

miglio

New Member
Joined
Nov 23, 2013
Messages
4
Lightroom Experience
Intermediate
Cattura.JPG Thanks i do it, but my original lrcat was 18Mb now is 323Kb and it's empty :(

nobody can help me?
thanks
 
Last edited:
Joined
Jun 20, 2009
Messages
16,802
Location
Houston, TX USA
Lightroom Experience
Power User
Lightroom Version
Cloud Service
I'm afraid it is beyond help. I tried opening it several different ways including a file dump. The size difference between the file you posted on dropbox and it's former size should give you an indication that most of the file is missing. If it is not there, then there is nothing you can do to bring it back.

What kind of system wide backup of your critical data do you have in place? It is time to go to that for recovery.
 

miglio

New Member
Joined
Nov 23, 2013
Messages
4
Lightroom Experience
Intermediate
Thanks Clee

i'm using Iskysoft data recovery in advanced mode
 
Joined
Jun 20, 2009
Messages
16,802
Location
Houston, TX USA
Lightroom Experience
Power User
Lightroom Version
Cloud Service
Thanks Clee

i'm using Iskysoft data recovery in advanced mode
This is data recovery software not backup software. I understand that you are trying to recovery the data on the WD corrupt HD, but that is not the question that I asked. If you primary HD is damaged or destroyed, then you need to fall back to your data backup plan to restore the files that were lost. So what is/was your backup plan?
 

miglio

New Member
Joined
Nov 23, 2013
Messages
4
Lightroom Experience
Intermediate
This is data recovery software not backup software. I understand that you are trying to recovery the data on the WD corrupt HD, but that is not the question that I asked. If you primary HD is damaged or destroyed, then you need to fall back to your data backup plan to restore the files that were lost. So what is/was your backup plan?
Thanks,

It's not the primary HD damaged, but an external drive I was working with. I've found everything with this software: the raw files, the folder, the catalogue and also the folder "LIGHTROOM previews.lrdata".

Is it ok if I copy this stuff to the primary hd, or should I work with the same configuration?
-The external Hard Disk linked to the Mac
-The Folders in the same path
etc etc
 
Joined
Sep 29, 2007
Messages
22,684
Location
Isle of Wight, UK
Lightroom Experience
Power User
Lightroom Version
Cloud Service
Hi rudenc, welcome to the forum! You don't have a recent backup you can revert to? Do you still have a copy of the corrupted catalog that you haven't messed around with?
 

blue

New Member
Joined
Mar 28, 2014
Messages
1
Lightroom Experience
Beginner
Lightroom Version
Need help - having same catalog problems

Hi guys

I've read through this thread, and have emailed Dan, as I'm not confident enough to mess with SQlite.

I also read through the posts, and I don't think any of it can help me - unless anybody can have a look please?

My main catalog I've been using for my Photography course all year is corrupt and having problems opening since a couple of weeks ago. The only thing I can think of that caused it was hibernating my laptop while the catalog was still open in LR several times (i.e. not exiting LR and/or ejecting the external HD the catalog's saved on).

I have a couple of other catalogs on the same HD, and they open fine.

My teachers tried to help me with this catalog in what little time they could spend at the end of class this week, but to no avail.

  • One teacher tried to optimize the catalog, this didn't help (I think LR stopped responding and shut down).
  • the same teacher opened a backup from 11 March 2014 of said catalog, but now the backup date is set to 26 March 2014, and it is also corrupt.
  • The second teacher tried to rename all instances of the catalog file name in the folder and in the text file (I think there were 4 instances all up). This didn't work.

The catalog went through the typical array of integrity, repair, corrupt, etc error messages, and stopped opening on my laptop. I tried opening it in the labs at college after I first encounctered the problem, and it opened fine, but I have never been able to import this catalog into another catalog - and IF I have been able to successfully open this corrupt catalog on another machine, and attempt to import it into another catalog, I can no longer successfully open it on that machine.

My LR trial expired today, and I bought a copy. The said catalog opened in a fresh install of LR, but again, I tried to import it to another catalog, then it stopped opening (and tried to open it on another laptop with fresh LR install - didn't open).

Any ideas??

I'm bemused by the fact that Adobe hasn't been able to create a solid fix for this problem since LR 1!
 

Jknights

Active Member
Joined
Mar 18, 2014
Messages
135
Location
Oliva, Valencia, Spain
Lightroom Experience
Advanced
Lightroom Version
How many images are in your catalog ?
How do you hold you catalog ?
Do you import images into the catalog or just reference them in a hard disk location ?

FYI:
I have 120K images in my catalog (845MB) and it is references my images which are on the same disk but in a file directory structure. I think this is a safer long term route as I can back up bot the LRcat file and the file directory structure onto other disks and restore from these in the event of a catalog corruption or disk drive failure.
 
Joined
Sep 29, 2007
Messages
22,684
Location
Isle of Wight, UK
Lightroom Experience
Power User
Lightroom Version
Cloud Service
Corrupted catalogs are pretty rare these days, especially ones that the built in routines can't fix. You're probably right about it being left in an inconsistent state by removing the drive while LR was still open, so definitely one to watch out for. Dan said a while back that almost all of the corrupted catalogs he sees that can't be fixed automatically are due to hardware issues of one kind or another. If you don't hear back from Dan, let me know as I have another contact at Adobe who may be able to help. If you want to zip it up (just the lrcat) and send it to me via www.wetransfer.com to [email protected] I'd be happy to take a quick look too.
 

Orwell

New Member
Joined
May 2, 2014
Messages
4
Lightroom Experience
Intermediate
Lightroom Version
Just updated to L5.4: No problems before update. Have had escalating problems with 5.4 locking up, slowing down, not responding. Related? installed critical MS update that stopped from slowing down/not responding. Norton 360: no virus. Norton Power Eraser found nothing. Malewarebytes Pro finds no issues. Now L5.4 Corrupts catalogs leaving them unrepairable when saving them. Corrupted back up catalogs. Wiped some catalogs of all content. Reinstalled L5.4. Still corrupts them. Run multiple tests with old catalogs and ones created just for this problem. Win7 Home premium, quad core processor, 16GB RAM. Thinking it might be space problem? 1.79 TB drive: 1.5 TB used, 293GB free. Sweating bullets.
Catalog: 740 Mb, on main drive with program. Backups on external hard drive.
 
Last edited:

imagemaker

New Member
Joined
Mar 14, 2015
Messages
2
Lightroom Experience
Advanced
Lightroom Version
Another busted catalog! Importing to a new catalog doesn't work, I get an error message for the last several backups and then encountered some blank backups. usual problems, won't optimize, shuts down during optimization attempt, etc. V. 5.7.1, Windoz 7. Anybody know where I can buy one of those SQLite vacuums? :surprised:
 
Joined
Sep 29, 2007
Messages
22,684
Location
Isle of Wight, UK
Lightroom Experience
Power User
Lightroom Version
Cloud Service
Hi imagemaker, send me the catalog using the instructions a couple of post's back, and I'll pass it on to the wizard at Adobe.
 

imagemaker

New Member
Joined
Mar 14, 2015
Messages
2
Lightroom Experience
Advanced
Lightroom Version
Hi imagemaker, send me the catalog using the instructions a couple of post's back, and I'll pass it on to the wizard at Adobe.
Thanks so much. I did clean out my C Drive this AM and that seemed to solve the issue but I'll double check my backups for a few days to make sure it works.
 

Samuel Cochrane

New Member
Joined
Jun 23, 2015
Messages
2
Location
London, United Kingdom
Lightroom Experience
Intermediate
Lightroom Version
Lightroom Altruists,

Last week I did the unthinkable and mistakenly deleted a crucial folder on my computer.
Of the many things I've lost, I'm most distraught about my Lightroom 5 library; it's essential for both my work and personal projects.
I've spent three years building and maintaining this library, last week I not only lost it's backup drive but also deleted the original catalogue.
I've been able to revive a degree of my lost content through recovery software, including several .lrcat files, they no longer open however.

I've followed b_gossweiler's very concise instructions to no avail, If anyone has any additional advice or would care to take a look at one of the files I would be extremely grateful.

I am so so angry with myself.
Thank you for your time.
 
Joined
Sep 29, 2007
Messages
22,684
Location
Isle of Wight, UK
Lightroom Experience
Power User
Lightroom Version
Cloud Service
Hi Samuel, welcome to the forum! Oh dear, sorry to hear that! I assume you've also checked the trash, etc.

Recovery software's not great at recovering databases, but if you want to zip up the catalogs and use www.wetransfer.com to send them to me at uploads [at] lightroomqueen [dot] com (fixing the at and dot, of course), I'll see if my database magician at Adobe can do anything with them.
 

Samuel Cochrane

New Member
Joined
Jun 23, 2015
Messages
2
Location
London, United Kingdom
Lightroom Experience
Intermediate
Lightroom Version
Victoria,

Thank you so much for having a look at these for me.
I've sent the files through to you, I'm very patient so just let me know.
 
Top