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
148
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,482
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,482
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,482
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,482
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,482
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,482
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.
 

cfl

New Member
Joined
Oct 16, 2018
Messages
3
Lightroom Experience
Intermediate
Lightroom Version
CC Cloud
#20
Hi Lightroom Queen,

First off all, sorry if my english isn't perfect (not my native language) :) Well I have a similar issue, yesterday I wanted to move my external HD from one computer to another, and when I opened LR on the second computer I got this message (see attached picture) I have tried to use a backup of the catalog, but same problem. I also tried with SQLite, I managed to get a new LR catalog file but it wouldn't work. Any chance you guys knows what to do?

Thanks in advance, Christian from DK
 

Attachments

Victoria Bampton

Lightroom Queen
Staff member
Administrator
Moderator
Lightroom Guru
Joined
Sep 29, 2007
Messages
20,482
Location
Southampton, UK
Lightroom Experience
Power User
Lightroom Version
CC Cloud
#21
That looks like proper file corruption. Does the catalog still look ok on the first computer?
 

cfl

New Member
Joined
Oct 16, 2018
Messages
3
Lightroom Experience
Intermediate
Lightroom Version
CC Cloud
#22
Hi,
No sorry to say, it's the on both computers
 

Victoria Bampton

Lightroom Queen
Staff member
Administrator
Moderator
Lightroom Guru
Joined
Sep 29, 2007
Messages
20,482
Location
Southampton, UK
Lightroom Experience
Power User
Lightroom Version
CC Cloud
#23
You're going to need to restore from your last good backup. I'd suspect a problem with the hard drive or its cable.
 

cfl

New Member
Joined
Oct 16, 2018
Messages
3
Lightroom Experience
Intermediate
Lightroom Version
CC Cloud
#24
I tried that also, and it's the same problem. I have copied some of the files to another hard drive and into a new catalog, the files are fine there, but of course all the edits are gone :(
 
Top