Lightroom: LR 4 Catalog Data Deleted During Backup

  • 1
  • Problem
  • Updated 5 years ago
  • (Edited)
I performed a backup of my Lightoom 4.2 catalog, which was 1.2 GB in size, upon exiting an editing session. No errors were reported. The next time I opened Lightroom it said the catalog was invalid. Upon checking via Windows Explorer I found both the catalog and it's backup to be totally empty -- 0 bytes in size. It appears to have deleted the data in the catalog during the integrity checking/optimization process and then the resulting empty catalog was backed up. Adobe support concurs with this judgement but has no explanation as to how it could have happened. I have no recourse but to revert to an earlier backup which will cause me to lose a week's worth of work. An error as catastropic as this should not occur.
Photo of Larry Dean

Larry Dean

  • 2 Posts
  • 0 Reply Likes

Posted 5 years ago

  • 1
Photo of Steve Sprengel

Steve Sprengel, Champion

  • 2586 Posts
  • 323 Reply Likes
Optimizing the catalog could truncate it if there was major corruption but this is not done until after the backup so he backup should be untouched.

Testing the integrity shouldn't cause any corruption since it should be a readonly operation, so it is likely that something else that also happened that is unknown.

Losing your catalog like this is a reason to enable XMP writing where you wouldn't have your history but you should have the state of each master photo as of your last edits when you re-imported into the older backup.
Photo of Jeffrey Tranberry

Jeffrey Tranberry, Sr. Product Manager, Digital Imaging

  • 13968 Posts
  • 1664 Reply Likes
I checked with the catalog engineer for Lightroom:

The fact that both the original and the backup got set to 0 bytes makes me suspect disk issues/failure.

Some background: Backup is accomplished by reading data from the existing catalog and writing it to the backup catalog. At no point do we move files. That rules out backup as the culprit. The worst backup code can do is fail to back up, it would never write over or move the original catalog.

Couple of questions:

1) Is this on an external or internal drive?

2) Is the drive in good shape? It would be a good idea to run the disk diagnostic tools for Windows.
Photo of Larry Dean

Larry Dean

  • 2 Posts
  • 0 Reply Likes
Thanks, Jeffrey. To answer your questions:
1. The catalog and its backups are on an internal drive. The image files are on an external RAID configuration.
2. As far as I know the internal drive is in good shape. The computer is only 8 months old. Are you referring to chkdsk as a disk diagnostic tool? I'll try running that.

It would appear that something caused the data in the catalog to be deleted. And then Backup backed up an empty catalog. That seems more likely than the data in both the original and the backup catalogs being deleted. I could imagine the catalog file being deleted somehow but it still exists, it just has no data in it (size = 0 bytes).

Would enabling writing XMP sidecar files help to reduce the impact of such a problem if it should occur again? I've converted my Canon CR2 raw files to DNG files on import. Will the XMP sidecar files work with DNG files?
Photo of Steve Sprengel

Steve Sprengel, Champion

  • 2586 Posts
  • 323 Reply Likes
Enabling the setting to automatically write XMP data to files would help.

CR2s can have separate XMP sidecar files, and DNGs can contain the XMP data within themselves, but neither will have the current settings unless you have auto-write-xmp enabled (and wait for it to finish) or explicitly write the XMP data to the files, yourself, using the menu option(s).

If the XMP data is current in a CR2's separate sidecar file or is current in the XMP-area of a DNG, then importing those files, again, to a new catalog would have them come in as they were in LR when the XMP data was last written to them.