Facebook Twitter Flickr Pinterest RSS

Fixing Lightroom Catalogs Migrated from Windows to Mac

Generally, Lightroom Classic catalogs can be migrated and shared between Windows and Mac. However, since the OSs reference networked folders differently, you’ll have to match the necessary directories up, every time you want to work with them on the other operating system. Worse, if networked folders are referenced in Windows as UNC paths, under macOS, Lightroom Classic will yield an error when trying to match those folders to a valid folder. Since I was unable to find anyone else reporting this problem I had to fix it myself.

If image files are kept on a network drive, each time the catalog is opened on a different operating system from the previous, the images will not be found since network folders are referenced and mounted differently, between Windows and macOS. While Lightroom previews will show the images, editing or exporting them will not work without valid references to the backing image files. The solution is to right-click on the folder (or its parent) and select Find Missing Folder… or Update Folder Location… and match the folder to the location recognized by the currently used operating system.

In Windows, network folders can be referenced by Universal Naming Convention (UNC) path names. These are paths which start with a double backslash (\\) followed by the server name and its share name, then the path to the sub-folder, if any. For example, if I have a network server named NAS_server and it shares my folders with the name, Photos, where my image folders reside. I can add a folder, \\NAS_server\Photos\Party pics to Lightroom.

MacOS does not recognize UNC network paths (not so universal is it?); so opening the catalog on macOS and attempting to update the folder location for an UNC folder, you’ll see,

I was not able to find a way (or even a mention) about this problem. Most users may reference their network folders by first mapping their network folders to a drive letter so that their folders would be referenced as, for example, P:\Party pics—macOS allows updating of those network paths.

Since I couldn’t fix the program, I fixed the data. Procrastinating on doing my taxes, I discovered that the .lrcat file is a SQLite database file. So, I used SQLite utilities to fix the issue. The short story is that I was able to update the absolutePath column of the AgLibraryRootFolder table to a non UNC pathname—it could either be a correct path or any, even invalid, path, recognized by macOS. If the latter, the normal process of right-clicking on the folder and selecting Find Missing Folder… or Update Folder Location… to associate it with the alternate folder location.

The ugly details

For a catalog file, BillLeePhoto-v12.lrcat,

  1. To be safe, make sure that Lightroom is not open with the catalog you are about to change
  2. Backup the file, before making any manual changes (in case you break something or my advice, here, is bad)
  3. Get a list of absolutePath‘s and their unique id_local value

    echo ‘SELECT id_local,name,absolutePath,relativePathFromCatalog FROM “AgLibraryRootFolder”;’ | sqlite3 -header -box BillLeePhoto-v12.lrcat
  4. Note the id_local value for the absolutePath you want to update and, as a check, select just that record:

    echo ‘SELECT id_local,name,absolutePath,relativePathFromCatalog FROM “AgLibraryRootFolder” WHERE “id_local” = 123456;’ | sqlite3 -header -box BillLeePhoto-v12.lrcat
  5. Now, update the record’s absolutePath column:

    echo ‘UPDATE “AgLibraryRootFolder” SET absolutePath = “/Volumes/Photos/Party pics/” WHERE “id_local” = 123456;’ | sqlite3 -header -box BillLeePhoto-v12.lrcat
  6. As, in step 4., output the record to ensure that it was updated properly

Now it’s safe to reopen the catalog with Lightroom Classic.

Home Uncategorized Fixing Lightroom Catalogs Migrated from Windows to Mac