Lightroom catalog corrupt and cannot be repaired (Beta)

Rescue a Lightroom Classic catalog that Lightroom cannot open or repair: a repaired catalog, and every photo's edits, ratings and keywords as XMP sidecars.

Opens: LRCAT, ZIP, LRDB
Saves: XMP, XLSX, CSV, TXT, JPEG, LRCAT

Open catalog

Lightroom catalog
Choose files… or drop them here
.lrcat, .zip, .lrcat-wal, .lrcat-journal, .lrcat-shm, .lrdb · up to 10240 MB each, 6 files max
    Add more files

    The catalog file (.lrcat) from the catalog folder, with its .lrcat-wal file if there is one, or a ZIP of the whole catalog folder (with the Previews.lrdata and Smart Previews.lrdata folders to get the previews), or a Lightroom backup ZIP. A ZIP of the Previews.lrdata folder alone also works. Lightroom 4 to Lightroom Classic 15.

    Options

    IMG_0001.xmp is the name Lightroom, Camera Raw, Capture One, ON1 and darktable read. IMG_0001.CR2.xmp is digiKam's default and gives virtual copies darktable's duplicate names.

    Your files are deleted after processing.

    When Lightroom says the catalog cannot be repaired

    Lightroom Classic shows "Lightroom has encountered problems reading this catalog", offers to repair it, and then reports that the catalog "is corrupt and cannot be repaired". Its own repair handles only some kinds of damage. That does not mean your edits are gone: usually most of the file is still readable.

    What happens to your catalog here

    1. A copy is opened, never the original, together with the .lrcat-wal file if you add it (it holds the changes Lightroom had not yet saved into the catalog).
    2. SQLite's integrity check finds what is damaged. If only indexes are broken, they are rebuilt and nothing is lost.
    3. Otherwise every row that can still be read is copied, page by page, into a new catalog with the same tables, indexes and triggers. Rows that lost their place in the file are matched to the table they belong to.
    4. The new catalog is compared with a real catalog of the same Lightroom version (for most versions) and gets back what it lost of the structure; its version and the counter Lightroom numbers new photos from are put back if they were lost, and it must pass the integrity check.

    What you get back

    • The repaired .lrcat, to put in the catalog folder in place of the damaged one and open with File > Open Catalog.
    • XMP sidecars with each photo's develop settings, rating, label, flag and keywords, so the edits are safe even outside the catalog.
    • A spreadsheet of every photo, the edit history list, the keyword list and the collections.
    • A report counting what could not be recovered: photos whose file record is gone, photos without develop settings, keyword links to lost keywords.

    Typical causes

    A full disk during a save, a catalog in a network or cloud-synced folder (Dropbox, OneDrive, iCloud), a crash or power cut while Lightroom was writing. A file cut short loses what was in its missing end; a file with a few overwritten pages loses only the rows on those pages.

    Before you start

    Keep the damaged catalog and its -wal file as they are. Upload the .lrcat and the .lrcat-wal together, or a ZIP of the whole catalog folder. If there is a backup ZIP in the Backups folder, it can be uploaded as it is too.

    More about what this tool reads and writes: Lightroom Catalog Rescue and Export (.lrcat to XMP).