I’ve mentioned this topic in several previous posts, now I’m devoting this entire article to the critical issue of Lightroom database backups and, to a larger extent, the nature of the .lrcat and databases in general. (Admittedly, this isn’t sexy stuff, but you need to treat your Lightroom Catalogs with loving care!) This article will help you understand the Lightroom Catalog and to develop healthy workflow habits for maintaining the Catalog in optimum condition.
Note: in official Lightroom-speak, the database is referred to as the Catalog. In this article I will use the two terms interchangeably… Catalog = database.
Data at the Core
The database/Catalog is one of Lightroom’s great strengths. Not only does it make finding and organizing things easier, it’s what allows the wonderful flexibility of non-destructive editing using metadata. The unlimited History maintained by Lightroom is one example; another is Virtual Copies – also one of Lightroom’s greatest features – made possible by the database.
Lightroom Catalog databases are contained in what appears as a single file on the hard disk. If you don’t know the location of your main Lightroom catalog, take the time to find it. If you are using the default name, it’s called Lightroom Catalog.lrcat. You can use more than one Lightroom database, but only one can be open at a time.
If you use Lightroom for your photo editing, you need to protect this database file at all costs!! And understand that keeping it clean is only half the battle: maintaining at least two recent backups is an absolutely essential workflow practice.
The Lightroom Catalog uses a database engine called SQLite, based on the industry standard MySQL. Your operating system (Mac or Windows) works with Lightroom to handle the data transfers in the background. So it’s natural that we’re not often aware of everything going on in the database. But it’s easy to see how occasional problems can arise within a database containing hundreds of tables and potentially hundreds of thousands of individual records.
Corruption in the database can occur at any time. In my work training clients in Lightroom since it was released, I have seen a half dozen cases of corruption in the Lightroom database. In some cases, the client had good backups; only minor loss and nuisance. Other cases were complete losses requiring a new database to be created. Imagine rebuilding your image library and redoing all the editing you’ve done for the past year. This can be avoided; I’ll tell you how in a moment.
First, we need to understand a few basic facts about computer databases. A typical database contains multiple tables, which in turn are made up of records. A Lightroom Catalog file for version 1.4.1 has nearly 200 tables, each containing a specific kind of data. There are tables that contain your image edits, others that hold information about your workspace and preferences, and other tables for keywords, etc. Each record in the database is an entry in the table and contains the actual data, such as the value of a specific slider or the location of a file on the hard disk.
*Note that the images themselves are not contained in the database; only references to the pixel data in the actual image file.
There are signs that appear when there’s trouble somewhere in the database. Lightroom running slowly and becoming unresponsive, a Missing Files collection in the Library panel, or files that mysteriously disappear are all indications of data corruption somewhere in the database.
(Interestingly, one of the more common database problems I’ve seen makes itself known with an error when switching from Develop to Library. As this demonstrates the database really has a huge effect on all aspects of working within Lightroom.)
So what’s a photographer to do?
Take care of your database. Prune it. Clean it up. Maintain it. Nurture it. And Back Up Obsessively.
Here are my top tips for taking good care of your Lightroom Catalogs (and protecting yourself from complete disaster when something goes wrong, as it inevitably will).
1. In the Library, keep an eye out for these signs of broken links and possibly corrupt files/bad data and correct the problems as soon as possible:
a. Folder List – Folder Names in Red are no longer accessible by Lightroom and the files cannot be edited. Update the folder locations or remove them.
b. Library Panel – the Missing Files collection indicates malformed records for file locations in Lightroom’s database. If possible, remove and re-import these files.
**IMPORTANT – Whenever you’re removing files and intend to bring them back in, you need to keep all the changes made in Lightroom, including Stacks, Virtual Copies and editing data. Export to Catalog… the Missing Files before removing them. Then do Import from Catalog… and everything will be ship-shape.
c. Grid – thumbnails for files that have question marks in their upper right corner cannot be located by Lightroom. Find and relink them or remove them from the catalog.
2. The equivalent of every 15 full work days or so, run the Relaunch and Optimize command (under Catalog Settings).
3. Back up your Lightroom catalog/database files every work day!!
Option A. Set the preferences for Lightroom to back up automatically. (LR must be launched for this event to occur)
Option B. Manually back up your database using drag and drop or backup software
I do both. The Lightroom automated backup is especially good because it optionally also tests the database for problems. Even if you don’t complete the backup, this Test is a good thing to let run frequently.
Keep a minimum of 2 recent backups. Be careful about backups when you’re having problems; there’s not much point in backing up a corrupt database. Make backups at critical points where things are OK and you’re about to do a bunch more work.
Some days I might make 10 backups of my Lightroom database. These are days where I am making major changes and I want to have recent backup points just in case.
Also, I make sure that the changes I make to the files are saved into the files constantly. Losing all my Lightroom database capability is a minor worry compared to that of maintaining current versions of my files and not having to redo my work.
There is no doubt that effectively managing your Lightroom catalog is time consuming and sometimes frustrating. We all know computers can be unpredictable and that problems will arise. The key to overcoming obstacles is to have a good system in place and maintain it religiously. If you start today, work on it regularly and maintain good work habits, it’s possible to achieve and maintain a very reliable Lightroom database.
If you want to see the inner working of the .lrcat, open it with a SQLite browser. You can also use the browser app to optimize the database. Just be careful…
Get Photography tips, techniques and tutorials FREE to your inbox!
We respect your privacy and will never share your details with anyone.