• Welcome to Lightroom 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 register and post your first thread under Help on the menubar above. You're also welcome to join our newsletter, download our free Lightroom Quick Start eBook and explore our other FAQ resources.
  • You may have noticed this website was offline on Saturday 22nd September. Our web host suffered what is known as "a perfect storm". Everything that could go wrong, did go wrong. As a result of restoring backups, we appear to have lost about 18 hours of posts, but hopefully nothing more. If your post seems to have been affected, please do repost, and we look forward to helping. If you have any questions, you're welcome to use the Contact Webmaster link on the page footer.
  • Lightroom Classic 7.5 and Lightroom CC 1.5 have just gone live, and there's some exciting mobile updates to follow. And the big news... my Lightroom CC - Edit Like a Pro book has just been released too!

Lightroom database is corrupt

wazzels

New Member
Joined
Jul 10, 2017
Messages
3
Lightroom Experience
Advanced
Lightroom Version
#1
We have been using LR for a year now, and today suddenly it says "The lightroom catalog is corrupt and cannot be used or backed up until it is repaired".

If I repair it, I end up with nothing, 10,000 edits are gone.
Then, I went to a backup from last week. SAME ERROR!
Then I went to a backup from 2 weeks ago, SAME ERROR!

This isn't funny. My wife has put in over 16 hours a day for about 12 months working on projects and now it is totally lost?

Please tell me what to try next.
 

Wernfried

Active Member
Joined
Jan 31, 2017
Messages
144
Lightroom Experience
Intermediate
Lightroom Version
Classic 7
#2
Got to this page SQLite Downloads and download sqlite-tools for your system.

Ensure your Lightroom does not run while you execute these commands.
After download and unzipping you can verify your catalog (i.e. LR Database) with this command:

Code:
sqlite3 "<full path to our .lrcat catalog file>" "pragma integrity_check"
In order to repair execute

Code:
sqlite3 "<full path to our .lrcat catalog file>" .dump | sqlite3 "<new .lrcat filename>"
Afterwards you can rename repaired file <new .lrcat filename> like original file name and try to start LR again.

Best Regards
Wernfried
 

Victoria Bampton

Lightroom Queen
Staff member
Administrator
Moderator
Lightroom Guru
Joined
Sep 29, 2007
Messages
20,359
Location
Southampton, UK
Lightroom Experience
Power User
Lightroom Version
CC Cloud
#3
Wazzels, welcome to the forum!

Wernfried's solution may well work, but just be aware it's not supported by Adobe, so keep good backups etc.

Otherwise, zip up the catalog (just the lrcat bit) and send it to me using www.wetransfer.com to [email protected] and I'll pass it on the one of the engineers at Adobe to take a look. Might be worth sending the last backup too.
 

wazzels

New Member
Joined
Jul 10, 2017
Messages
3
Lightroom Experience
Advanced
Lightroom Version
#4
Thank you both. I tried Wernfried's suggestion but it created a zero byte catalog.
I couldn't get WeTransfer to work so I used my own file hosting system and sent a notification to Victoria.
I hope Adobe can look at this soon, pro-photographer is in a real bind now.

Thanks.
 

wazzels

New Member
Joined
Jul 10, 2017
Messages
3
Lightroom Experience
Advanced
Lightroom Version
#5
Update:
Wernfried, I looked closer at your suggestion. I took the text output of the dump (5 gigs), edited it, added an "END TRANSACTON;" to it, and reimported it.

That seemed to work. I have been spot-checking stuff and so far all the data seems to be there! Over 50,000 images.
Thank you so much for the suggestion.
 

Bailante

New Member
Joined
Apr 23, 2018
Messages
2
Lightroom Experience
Advanced
Lightroom Version
6.x / CC 2015.x
#6
Dear @Victoria Bampton and @Wernfried !
Sorry for a post into old thread. But I am in the exact same shoes as Wazzels...

My wife lost her months of work yesterday due to catalogue being corrupted. Backups are corrupted as well. And it is a little tragedy here...

Are you around to help?
I’ve done the Sqlite steps to the letter, and it does create a new lrcat catalogue from the dump file. But when I try to open it - I get “this is not a valid Lightroom catalogue” error...

Would be much grateful for any hints or help...
 

Victoria Bampton

Lightroom Queen
Staff member
Administrator
Moderator
Lightroom Guru
Joined
Sep 29, 2007
Messages
20,359
Location
Southampton, UK
Lightroom Experience
Power User
Lightroom Version
CC Cloud
#7
I got your wife's catalog Bailante and I've forwarded it to Adobe to see if they can rescue it.
 
Joined
Dec 6, 2015
Messages
8
Lightroom Experience
Intermediate
#9
Dear Lightroom Queen,
I am in the Galapagos at the moment and my catalogue is not working and cannot be repaired. Help!!
Jerry
 

Victoria Bampton

Lightroom Queen
Staff member
Administrator
Moderator
Lightroom Guru
Joined
Sep 29, 2007
Messages
20,359
Location
Southampton, UK
Lightroom Experience
Power User
Lightroom Version
CC Cloud
#10
No problem Jerry:

(I've switched to adding this as an image to reduce the amount of spam I get!)
 

Victoria Bampton

Lightroom Queen
Staff member
Administrator
Moderator
Lightroom Guru
Joined
Sep 29, 2007
Messages
20,359
Location
Southampton, UK
Lightroom Experience
Power User
Lightroom Version
CC Cloud
#12
Try again? It's ok here. Or use Dropbox or Creative Cloud space or some other large file transfer.
 
Joined
Dec 6, 2015
Messages
8
Lightroom Experience
Intermediate
#13
Thanks for the help. Unfortunately the upload via satellite will take 123 days for the zipped file. I guess my catalogue will need to wait until I get home.
Jerry
 

Victoria Bampton

Lightroom Queen
Staff member
Administrator
Moderator
Lightroom Guru
Joined
Sep 29, 2007
Messages
20,359
Location
Southampton, UK
Lightroom Experience
Power User
Lightroom Version
CC Cloud
#14
Oh boy, yes, that's a bit slow. Note that I'd only need the lrcat file zipped, not the previews.
 
Joined
Dec 6, 2015
Messages
8
Lightroom Experience
Intermediate
#15
Lrcat file is 140MB and the satellite is too slow to send this. Will try once at home. Thanks for your kindness and efforts.
Jerry
 

Bonsaihunk

New Member
Joined
Dec 6, 2015
Messages
8
Lightroom Experience
Intermediate
#16
Hi Victoria,
Back home and I sent you a Dropbox zipped file. Hope it can be repaired. Interesting that I have a recent backup which also shows a corrupted file while one from 4-6 weeks ago is intact.
Thanks again for your kind help.
 

Victoria Bampton

Lightroom Queen
Staff member
Administrator
Moderator
Lightroom Guru
Joined
Sep 29, 2007
Messages
20,359
Location
Southampton, UK
Lightroom Experience
Power User
Lightroom Version
CC Cloud
#17
Try again Bonsaihunk? That zip is corrupt, so I can't even open the zip to get to the lrcat. You could try without zipping, if that helps.
 

Bonsaihunk

New Member
Joined
Dec 6, 2015
Messages
8
Lightroom Experience
Intermediate
#18
Very puzzling. Today I noted an uncorrupted database file in the Lightroom folder and it works!! Appreciate all the hard work Victoria. Thanks.
 
Top