Phil Burton asked an excellent question on the forum today. He noted that there are numerous catalog corruption threads, and asked “what tends to cause catalog corruption?” and “how can we prevent or minimize this corruption?”
Phil’s right, there are a lot of threads about corrupted Lightroom catalogs. So does this mean your catalog is likely to spontaneously combust? No! Reports of catalog corruption are relatively rare compared to the number of people using Lightroom, but people visit the forums when disaster strikes. To save you worrying though, it’s worth learning a little more about preventing issues.
What causes catalog corruption?
The Lightroom catalog is an SQLite Database, and like every other database, it can become corrupted.
In almost all cases, corruption results from a hardware or OS-level problem. These can include the computer crashing due to a kernel panic, hardware fault, or power outage, any of which can prevent Lightroom writing to the catalog safely.
Catalogs also become corrupted if the connection to the drive cuts out while Lightroom is writing to the catalog, for example, as a result of an external drive being accidentally disconnected or the catalog being stored on a network drive (via an unsupported hack).
How do I prevent catalog corruption?
A little bit of common sense goes a long way in protecting your work.
- Back up regularly, and keep older catalog backups.
- Always shut your computer down properly.
- Consider using a UPS to avoid unexpected power outages.
- Don’t disconnect an external drive while Lightroom is open.
- Keep the catalog on an internal drive unless you have a good reason to store it externally (e.g. a small laptop hard drive, sharing between 2 machines, etc.)
- Enable Test integrity and Optimize catalog in the Backup dialog. If they have trouble running, it’ll give you a clue that something may be wrong.
My catalog’s corrupted – how do I fix it?
If Lightroom warns that your catalog is corrupted, it also offers to try to repair it for you. In many cases the corruption can be repaired automatically, but it depends on how it’s happened.
If Lightroom can’t repair the corruption, you’ll need to restore your backup catalog. That’s why we make frequent backups, after all!
Leifur Hakonarson says
I know this is an ancient thread – but since it spans two years already, maybe adding one more isn’t so bad 🙂
Since installing Windows 10 update 1903 some three days ago, Lightroom refuses to open ANY catalog. This is not caused by catalog corruption, I have tried multiple backed-up versions to no avail.
I have tried all recommended solutions (well, those I’ve found) – running as Admin, re-installing Visual C runtimes, fixing file attributes, nothing works. I have also tried creating a new catalog but although no error is reported, no file is created either (I tried both with and without adding the “.lrcat” extension in the dialog box).
A large part of the problem is of course the blanket refusal of the program to start at all – it just posts this error window offering to retry or create a new catalog (which doesn’t work). I suspect that in fact this situation can be caused by all manner of errors, thus some solutions work for some people, other solution for other people. For me nothing works 🙁
Any brilliant insights? 🙂
Cheers
Paul McFarlane says
Hi Leifur
Which version of Lightroom? What is the error message?
Creating a new catalog – you don’t need to enter the file extension, Lightroom does that when creating the catalog. Is it exactly the same error message?
Gerri Whitley says
Hi Victoria,
I have a corrupted catalog and spent 30 min with Adobe Help telling me that the version saved on my nightly Mac time machine backup isn’t safe to use, that I might lose images if I try to use it. Is that really a risk? My backup is 8 days old, which isn’t the end of the world but it’s a lot of work to reproduce.
Victoria Bampton says
No, your TM backup is probably fine. See if you can find the most recent one that doesn’t have an .lrcat.lock file next to it. That one is your best bet, as it was captured when Lightroom was closed. The others are unlikely to lose the actual image files, but may not include those usages, because they haven’t been written to the main database yet.
Laurie Johnson says
I cant install LR on a MacBook Pro…just says error encountered. I cant install Adobe cloud either….Suggestions please…or I just have to cancel the order and find something else to use
Victoria Bampton says
That’s a little vague I’m afraid. My best guess, without additional information, is that the operating system is too old, so check the system requirements. Cancelling your order seems a little extreme – Adobe’s customer services would help get you up and running.
Laurie Johnson says
Your kidding…What customer service.
Ive been hours trying to find a phone number and all I get is the same pages again that offer nothing. But don’t worry I sorted it, And no it wasn’t old operating system. Just ma king sure ALL of the remnants ion the uninstalled failed copy have been dealt with. Then it will install safely. Adobe are the worst in Mother Earth to get assistance from…My opinion. But thanks anyway
Victoria Bampton says
Ah well done. Yes, it can be tricky to find the phone number, particularly out of hours. The trick is to go through their Contact Page (https://helpx.adobe.com/contact/support.html) > Creative Cloud > Installation issues. Many of the others redirect back to the forums, but that one usually offers phone or chat support when they’re available. Due to the time of year, I’d guess their hours are more limited right now.
Laurie Johnson says
Sorry…But no it doesn’t….It’s extremely annoying and one could be excused for thinking they are dodging the support responsibility.
Victoria Bampton says
Very strange, as I’ve just tested it here and it’s coming up ok. Perhaps try it with these options selected?
Michael Sharp says
I personally can’t see it as a hardware problem but ….. After the inevitable ‘force quit’ the catalogue opens OK. I have just uploaded some photos that I took yesterday with basic modifications and that saved OK on closing LR. I have removed all LR cataqlogue entries that are void just in case that was impeding a proper closing out.
Victoria Bampton says
I’ve seen cases in the past where the catalog was on a part of the hard drive that was throwing intermittent errors, or a couple of cases where the RAM had limited damage that it was hitting. It may not be hardware, but it would be worth ruling out.
Michael Sharp says
Right I have updated to 6.4 and can save my catalogue as I have been used to. But the work done since the original 6.3 to 6.4 update is lost but at least it is back working. Thanks for your support.
Victoria Bampton says
So the catalog that includes the work you’ve done on Tuesday and Wednesday can’t be opened? Or doesn’t pass the integrity check?
Michael Sharp says
Yesterday when I open Lightroom after reloading 6.4 the work I did Tuesday/Wednesday wasn’t there (mods to existing images) so I assume I lost it. Now I have open lightroom this morning and tried to modify a few images and then save on shutdown and I have the same thing. Stuck on ‘checking catalog integrity’. So whilst it work yesterday (admittedly without any work changes) now it doesn’t. I am at a loss. Any clues. It has been stuck going nowhere for 10minutes now.
Victoria Bampton says
I wonder whether you have a hardware problem there somewhere. If you force quit, then run through the open/test integrity step at the beginning again, does that complete ok?
Michael Sharp says
Both catalogues the original from 22 Feb and the one I saved today to desktop work and save OK. But I have lost all of my work from Tuesday and Wednesday. So now I am going to update to 6.4.
Michael Sharp says
In the browser. I am trying to use my original download from 6.1 which works but it still will not save the catalogue on shutdown. Now I am going to check the lrcat integrity as you said.
Michael Sharp says
As a follow-up to the above post re my failed upgrade fro 6.3 to 6.4 I now believe the upgrade was corrupted during the download which part way through I got a message saying it was interrupted. So now the questions become: a) how do I ‘roll-back’ to 6.3 and b) are the *.dat files stored in the folder Library/cache/Adobe Camera Raw/ the ones that are unsaved changes?
I still retain the old LR 5.7 so I could update that again.
Thanks
Victoria Bampton says
Hi Michael
I would uninstall then reinstall back to 6.3 https://www.lightroomqueen.com/how-do-i-roll-back-to-lightroom-2015-1-1-or-lightroom-6-1-1/
Then I’d try restoring a catalog – just double-click to unzip it, copy it to a temporary location like the desktop. Then open Lightroom and go to File menu > Open Catalog and navigate to the restored catalog and check the Test Integrity checkbox. If that completes, try the same with your normal working catalog, to determine whether it’s perhaps a problem in your main working catalog.
At that point, I’d try updating to 6.4 again, as it’s possible that the update download was damaged.
The *.dat files are just cache files – they won’t help with anything. All of your settings are stored in the catalog file.
Michael Sharp says
Thanks, I will try that. So the changes I made since the last catalog save that worked (Monday 22/2) is where? I thought until the catalogue was saved these files (that with the RAW file make the image I most recently created) were in a cache somewhere and accessible. Just trying to save having to redo my work.
Victoria Bampton says
They’ll be in your current working catalog. You can check the location in the Catalog Settings dialog. They’re saved as you go along, and the backup catalog is just a duplicate of that working catalog.
Michael Sharp says
So far the LR6 download keeps coming uop ‘Failed’. So try it for the 4th time
Victoria Bampton says
The download itself is failing (e.g. in the browser)? Or the installation?
Michael Sharp says
I have been a Lightroom user since LR2. My operating system is Mac OS currently using El Capitan 10.11.03.
I installed LR6 last month progressively getting to 6.3. I experienced no problems with 6.3.
On Monday 22 Feb I noticed there was an upgrade to 6.4. I backed up my catalogue and downloaded the upgrade and installed it.
Yesterday LR6.4 worked fine until I came to back-up on shutting down. The action progress bar would not advance beyond ‘checking the catalog integrity’. So currently whilst I can use Lightroom (6.4) I cannot save any work. Opening LR5 (last version) doesn’t see the changes I have made so the amendments to my workflow could not be saved that way.
So please what do I do to either go back to 6.3 or reinstall 6.0/1 again to recover my catalog changes?
Thanks
norm hanson says
A while Back I ran into a number of lightroom corruption issues, in a relative short time. The main problem was I did not recognize the “corruptions”, which was mainly loosing the details of recent uploads and/or processing steps, until it was too late and those omissions where getting writen back into subsequent backupsl. Things where mostly backup somewhere but the challenge of figuring where and when was a nightmare. I used collections a lot and these where really decimated. It was all too hard so I wrote about having too many mistresses
http://imageo.blogspot.com.au/2013/12/too-trusting-lightroom-is-high.html
I’m pretty certain now the cause was leaving lightroom open overnight. Then having the computer restart because of power outages and/or overnight updates from microsoft. Whilst i could tell the computer had restarted I didn’t think to check the lightroom catalogued was ok.
So I have three simple steps I implemented to avoid this situations arising again. They have worked for me (ok I did catch another problem when I forgot step 1)
1) I never leave lightroom running unattended any more, and make sure I see backup of catalogues being completed before I shutdown
2) I have set up to automatically write the XMP side care files whenever I edit a raw photo, or add metadata or a ranking.
3) I write a special collection tag into my metadata starting with a ~ sign that identifies which collection(s) a photo should be in.
http://imageo.blogspot.com.au/2015/04/letting-lightroom-regain-her-dignity.html
Victoria Bampton says
Thanks for sharing your experience. The issues you describe are very very rare, so I would guess that it’s not actually Lightroom that’s causing the problem, but something external like the drive connection dropping or a sync problem. Where’s your catalog stored?
Juan gutierrez says
That contact at Adobe is probably using a similar technique – LR could not repair my catalog at all, whereas the steps I described above worked for me – hope they help somebody else too!
BR
Juan gutierrez says
Hi,
I’ve had a catalog corruption before that lightroom couldn’t fix, along with a too old backup.
I solved the problem using a different tool to fix the catalog: sqlite3
Basically, what you do is: download the sqlite3 executable (depending on your operating system), and put it along with your corrupted catalog.
Then launch the following in the commandline (cmd.exe in windows)
sqlite3.exe catalogname.lrcat .dump | sqlite3.exe newcatalogname.lrcat
and try to open the new catalog – hopefully it will work (it did for me!)
as a bonus, you can also try to save all the work done on the preview generation, which in my case was a lot of computer-hours of preview rendering.
For this you need to align the name of your new catalog, with the name of your previews folder (make a copy of both first, just in case!). If all goes well, lightroom will pick the name of the previews folder and use it, saving you from re-rendering the standard previews (thousands in my case).
Also, you might have corruption in your previews catalogs. There are two files, both located within the previews folder. Those are root-pixels.db and previews.db . Just like the catalog .lrcat file, those are also sqlite3 databases. As such, you can try to repair them if they become corrupted using sqlite3.exe, in the same exact way as you can repair the catalog – just change the file names/locations.
Thanks to this, I only lost like 10 minutes of my work, instead of many hours
Just my two cents – good luck with your repairing!
Victoria Bampton says
That’s good news that you didn’t lose much. If anyone wants to try that, it would be worth working on a duplicate catalog.
I also have a contact at Adobe who is able to rescue some catalogs that can’t be repaired using the automated repair process.
Holly says
Hi Victoria,
Sorry, this question isn’t about catalog corruption, but hope you might have an answer. When I’m in the import dialog view, I always have sort by capture time selected, however once the images are importing they aren’t always sorted by capture time. Sometimes they are, but often they are sorted by ‘Added Order’, which I don’t find helpful at all. I often realize it as I am working through my files and I notice a sequence that is not in proper order (i.e. someone walking out of frame, over the course of a few photos), or I’ll notice it when I edit a file in PS and when it’s added back to LR, it’s now at the end of the images. This is while viewing images in the ‘Previous Import’ catalog. How to I set the default to always be to sort by capture time? Thank you!
Victoria Bampton says
You can’t change the default for Previous Import – that always defaults to Added Order so that the view doesn’t keep shuffling while the import is running – but if you select any other folder or collection, they’ll default to Capture Time order.
Holly says
If the import is finished, does it still default to Added Order? I’ve noticed that sometimes it is by Capture Time in the previously imported catalog area… Thanks for the answer! (I’ve been searching the web trying to figure this out! Your answer makes sense. :-))
Victoria Bampton says
Yes, the Previous Import collection always defaults to Added Order.
Jarrett says
I’ve been hearing of a lot of people going back to using the sidecar option. Would this help to rebuild the catalog if you had to restore from backup?
Victoria Bampton says
If you have a backup catalog, XMP sidecars won’t help but they won’t hinder either. They can be helpful if you don’t have a backup, although it’s worth noting that they’re missing things like flags, virtual copies, collection membership, Develop History, Develop panel switches, and a few other things like that, so a proper backup is still a better choice.
Berlin Bailey says
Hi Victoria.
Lr will always ask if you want to back up your files which I do. How do I go about backing up my files every time I open Lr and work on any files? Why wait for Lr to prompt me?
Thanks,
Berlin Bailey
Victoria Bampton says
Hi Berlin. If you go to Catalog Settings (under Edit menu on Windows, or Lightroom menu on Mac), you can change the backup frequency to “Every time Lightroom quits”.