Remix.run Logo
jval43 3 days ago

I run a separate Mac Mini that has the full iCloud Photos library on a massive external drive, set to "Download originals". I then rsync that filesystem to a separate Linux box. This works but you must not ever disconnect the external drive.

I don't have a solution for iCloud Drive, as there wasn't a keep offline setting last time I checked. So use it only ephemerally.

NaOH 3 days ago | parent | next [-]

At least as of Sequoia, the Settings > iCloud > Drive > Optimize Mac Storage option enables iCloud Drive files to be stored offline. Likewise, right clicking any iCloud Drive files in the Finder includes a Keep Downloaded option. Since I minimally use iCloud Drive, in the past (older OSes) I also had Hazel make copies of iCloud Drive files so they were certain to be in backups.

unsnap_biceps 3 days ago | parent | prev | next [-]

Arq [1] has an option to "materialize" dataless files, basically forcing them to be locally available. The only issue is if it's a large file and it gets pushed off device often, you can burn a lot of bandwidth re-downloading it over and over again.

1. https://www.arqbackup.com

wrxd 3 days ago | parent | prev | next [-]

For iCloud Drive have a look at rclone. You can run it straight from your Linux machine

QuiEgo 2 days ago | parent | prev | next [-]

Time Machine backups to a samba share on the Linux box would get you both the Photos library database and the iCloud Drive stuff. It also means you don't need to bother with the external drive.

There is a keep all files offline setting for iCloud Drive (turn off "Optimize Mac Storage" in Systems Settings).

4jck 3 days ago | parent | prev [-]

I'm not familiar with the "Photos Library.app", but I have an m4 mini with my photos in a Photo's Library. I'd love to know your script to rsync the photos into a separate drive/directory

jval43 3 days ago | parent [-]

The Photos library "file" is just a big folder, I just sync the whole thing.

#!/bin/sh rsync --iconv=utf-8-mac,utf-8 -avh --delete-after --partial --progress /Volumes/myExternalDrive/Photos\ Library.photoslibrary myuser@mylinuxmachine.local:"/srv/myExternalDriveBackup/"

(note: tested with brew rsync, IIRC the default rsync is outdated on macOS)

Somewhere in the directory structure is a folder /originals/ which has all the actual files.

Note that this is only a last resort backup. Restoring the library as a whole requires a Mac with a compatible OS version. Restoring without a Mac would only get you the originals, so only the out-of-camera files (jpg, heic, raw), with no edits or metadata changes from Apple Photos applied (Apple Photos doesn't touch the EXIF data). You'd probably also lose the video part of all live photos, as the live video files stored as separate files and not part of the .heic files. They're there, but not very usable.

An alternative to this workflow is to export all photos (with edits applied) from the Photos app, but honestly I'm not sure if that even works and how long it would take for multi-TB libraries.