PhotoStructure and backup software

I’ve had a couple users wrestle with their backup software and PhotoStructure.

Quick summary

  1. You may want to consider configuring your backup software to exclude the .photostructure/previews directory in your PhotoStructure library.

  2. If you’re using backup software that does bi-directional synchronization, like Dropbox, OneDrive, or Google Drive, you should enable configure the database directory to be “mirror”, not “sync”, to prevent buggy sync software from fighting with SQLite. You may also want to set forceLocalDbReplica=true.

  3. Make sure you exclude your cacheDir, which defaults to /ps/tmp on Docker, ~/Library/Caches/PhotoStructure on macOS, and $LOCALAPPDATA/PhotoStructure on Windows.

Why exclude .photostructure/previews?

This previews directory contains a handful of down-sampled images for every asset in your library. My test library with 100k assets has 500k files in the previews directory, for example.

Backing up all these preview files wastes your cloud storage space, wastes your network bandwidth as it uploads these files, and slows down your computer (as your backup software tries to follow all the updates that PhotoStructure is making).

Some backup software will actually crash due to “too many” files.

What happens if I don’t back up previews?

If you lost your previews directory, but still had a backup of your original photos and videos, PhotoStructure will automatically rebuild all those files for you the next time sync runs. Depending on the speed of your computer and the size of your library, this may take some time, though.

How do I exclude .photostructure/previews?

Some backup software (like DropBox) is flexible enough to support “selective sync,” or specific folder exclusions.

If you’re using Microsoft OneDrive, unfortunately, their “exclude” setting deletes the folders that you want to exclude.

After you un-select the previews directory, you’ll need to run rebuild to rebuild your previews.

What happens if I don’t back up any part of the .photostructure directory?

The .photostructure directory contains…

Your library database

This is where PhotoStructure stores

  • what files are in your library,
  • what files are variations of other files, and
  • a bunch of cached metadata for the UI, and
  • indexes that power search

If you lost your library, you’d just “re-import” your files. They will aggregate into the same groups of assets, but they will be given different “asset IDs”, so if you shared URLs to specific photos or videos, those URLs will point to different assets after your library re-imports everything.

Your PhotoStructure license

If you subscribe to PLUS, a license file that encodes your current subscription details will be stored in .photostructure/licenses.

If you lost your library, you’d just re-authenticate on the second part of the welcome screen, and a new license file will be created and added to your library in the background.

Your PhotoStructure previews

As discussed above, this directory is large (~1GB per 1,000 assets), and makes browsing your library fast (even over limited network connections)

And as discussed above, if you lost your library, PhotoStructure would rebuild these previews for you, which would take a while, but it’s automatic and happens in the background.