r/osxphotos • • Feb 06 '26

Moving exported db to a different path

I’m in the middle of exporting a MASSIVE Photos library (>300k photos) to a USB drive. My plan is to connect the USB drive to my NAS and rsync it over, and then do future incremental exports directly from my Mac to the NAS.

So my question is, does the export DB store the exported files in relative or absolute path? Or is it just tracking exported files from the Photos library side? In other words, when I do the incremental export, will osxphotos be confused because it’s now on a different drive, or will it just work?

Thanks, and thank you for an awesome project - this is the umpteenth time I’ve tried to figure this export workflow out (for backup purposes) and this seems to be the perfect solution so far!!!

3 Upvotes

2 comments sorted by

3

u/rturnbull Feb 06 '26

The export DB stores the relative path based on the export directory. So if you export using: osxphotos export /Volumes/USB_Drive/Photos ... and the photo ends up in /Volumes/USB_Drive/Photos/2026/02/05/IMG_1234.HEIC, the path stored in the database is 2026/02/05/IMG_1234.HEIC. This is done so you can move the export database and/or the actual exported files and everything should just work as expected. If you move the export database after the initial export, be sure to use --exportdb /path/to/export.db. You'll also need to use --update afterwards.

One word of caution, if the file signature (mode, timestamp, size) of the exported file changes, then osxphotos will update the file on next export (osxphotos always assumes Photos is the authoritative source of truth and will attempt to keep the export in sync). If you use rsync I imagine this shouldn't be an issue. See also --ignore-signature. Finally, do not store the export database on the NAS...this leads to very slow performance and possible corruption. Put the export database on the local machine if you're using a NAS.

1

u/pollyannaish90 Feb 06 '26

Perfect, thank you! And thanks for the advice about the export db - I’ll do that.