Skip to content

Instantly share code, notes, and snippets.

@peterbraden
Last active August 29, 2015 14:09
Show Gist options
  • Save peterbraden/b0a13390c50e25e1b4da to your computer and use it in GitHub Desktop.
Save peterbraden/b0a13390c50e25e1b4da to your computer and use it in GitHub Desktop.
Lightroom Corruption Post-mortem

I use Lightroom heavily to process my images. I have 400gb of pictures, so there really isn't any other option to manage such a large collection.

Because my photos are very important to me, I've invested serious thought and time into their backups. Even still, last night I realised that Lightroom had crashed, and the catalog had reverted to its state from around a month ago.

This means that I lost a huge amount of categorisation, sorting, and processing from the last month (conservative estimate, 20 hours work).

It appears that the images are intact, however the catalog that stores all 'collection' level metadata has gone.

I have several layers of backup. The first, Google Drive, was useless, as it had backed up the 'backed up' catalog. Because I had designed the backup system for loss, rather than corruption, I didn't have any versioning here, and Google Drive's versioning didn't have a working catalog.

I therefore reverted to my fallback backups - in Amazon Glacier, with ARQ. This takes a long time to retrieve (4 hours if the request doesn't time out, as it did twice - negative points to ARQ for this experience...)

It seems that the backed up catalog was also incomplete, which leads me to conclude that the collections were never persisted into the catalog file.

My assumption is that Lightroom didn't persist it's database to the catalog. I had left it open for around a month (because I was working on photos on and off in the evening) and in that time it had not backed up (Lightroom prompts when you close). I assumed that it was at least saving to the catalog file, but after looking at the filesystem logs, it seems it was only writing to a journal file.

So the data was never saved to the file, therefore never backed up, therefore gone.

Lessons:

  • I'd like to get rid of a dependency on Lightroom, but due to the lack of options this is infeasable. Screw the Adobe developers for writing this sort of code. My trust in Lightroom is gone, and I'll be closing it and checking backups of the catalog regularly.

  • Closed metadata SUCKS. Thankfully the photos are still there, but all of the processing is gone. DNG promised to store this sort of data internally so I'm very unimpressed with Lightroom for this too.

  • Even if you back up for a certain scenario, something unanticipated can throw a spanner to your plan. I guess, like a security threat model, it's necessary to model backup threats too - I hadn't allowed for a program crash in my backup plan, although tbh, with the way that Lightroom was behaving, there is very little I could have done, short of stopping the application every night.

  • I wasn't using sidecar files for my formatting. I have no idea why this isn't on by default, but fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment