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!