Mastodon

How to Backup large Photos Library from iCloud with Advanced Data Protection

Owning multiple Apple devices, I use the Apple ecosystem to create and maintain personally important photos and videos. This happens in the form of taking pictures and videos on my iPhone, storing them directly in the Photos app, using iCloud as sync to all my other Apple devices, and using Time Machine to create backups. This works wonderfully, but for two reasons, this is not sufficient anymore:

  1. I want to create vendor-independent backups, meaning real files stored on my NAS in my own basement.
  2. Handling the ever-growing huge number of photos and videos gracefully. Recently, I reached an important tipping point: I cannot store my whole Photos library on my MacBook without having to delete work stuff that actually belongs there.

For these two reasons, I searched for an additional backup solution, complementing the existing Time Machine backup.

Apple themselves recommends having a backup: Apple Photo User Guide

“Even if you use iCloud Photos, it’s important that you always back up your photo library locally”

However, this advice is surprisingly hard to follow with

  1. Activated advanced data protection (ADP) that encrypts iCloud content so that it can only be accessed from an Apple device and not directly from the cloud and
  2. A somewhat large number of files (several hundred GBs).

I researched and tried out several rather technical approaches that did not work and decided to follow a non-optimal but practical way.

What Doesn’t Work

Time Machine is a great backup system that is tightly integrated into the Apple ecosystem and easy to use. It allows browsing snapshots and restoring them easily.

However, for a full backup of a large Photos library, the whole library has to be downloaded to the device backed up with Time Machine. In my case, this is my MacBook I’m also developing software and doing film editing with, hence I do need disk space and cannot store huge numbers of images just for the backup.

There is no support for browsing the library on photo-level. You can only restore the library completely or not.

Long-term storage will use a lot of disk space because the time machine backup will also include other files that may not need such a long retention time. Apple’s approach focuses on ease of use by sacrificing features for power-users. This is fine in general, but it just is not enough for me.

Time machine is excellent for disaster recovery, not for archival access or curation.

The next intuitive approach is to manually copy the “Photos Library.photoslibrary” file to an external storage device.

However, copying a huge file like this is impractical and can easily be disrupted by network failures.

There is no support for practical incremental backup at photo-level, only for filesystem-level snapshots of the entire library bundle.

To back up all files via copying the library, all files have to be downloaded to the computer. In the case of a huge number of photos and images, having the full versions on a production computer is not an option as it will use up a lot of disk space.

Import Into New Photos Library Elsewhere

Another approach is to import the library into a new Photos library on an external storage device, for example, via SMB to a Netwok Attached Storage (NAS).

However, this is not only discouraged by Apple, but downright impossible because Apple doesn’t allow importing from system libraries:

“The selected photo library is synced with iCloud Photos and cannot be imported”

Apple blocks importing from iCloud-synced libraries to prevent duplication, conflicts, and partial state corruption, which is a valid reason for this system design decision. Again, they value stability and usability higher than power-features, which works most of the time for most of the users.

Downloading the images from iCloud directly is also not an option, as there is no supported bulk or API-based access because of activated advanced data protection (ADP).

What is Working

After researching and trying out the mentioned approaches, I settled on the following approach.

In the Photos app, search for a specific year in the search box in the upper right corner. Click the calendar entry in the appearing dropdown box to find all files created in this year.

Export via File -> Export -> “Export unmodified originals” + “Export IPTC as XMP”

Do this once for every year present in your library.

Repeat the process for new files, for example, at the end of every year.

Trade-offs and Limitations

This simple approach works for both videos and photos, allowing you to export the original image files from the Apple ecosystem to your own infrastructure.

Although some data like EXIF and camera data is embedded in the image, some meta-data like GPS is stored in additional xmp files that have the same name as the images. I read about GPS data being stored in the image files, but the export decided to put them in the xmp files for me.

Apple’s live photos will be exported to one (still) image in HEIC format plus a .mov movie file (plus the xmp file for the meta-data from the previous bullet point). This not only results in way more files than one could expect, but those could also use more disk space than the optimized Photo library.

There is no support for exporting crops, color corrections, or rotations. Only the “unmodified originals” are backed up, just as the menu item states.

There is no support for exporting albums, smart albums, and face recognition.

Some manual work is necessary. Therefore, it is transparent, predictable, and straight-forward.

“Honorary Mentions”

I also researched some approaches that don’t fit my setup that I want to briefly mention here.

There’s a ton of photo management software out there that also can connect to iCloud. Because I activated ADP, these are not an option for me.

I could have set up a second Apple computing device like a Mac mini only to download the complete Photo library and store it away periodically. This seems to be complete overkill, both in complexity and in financial investment.

(Image Public Domain, https://pxhere.com/en/photo/356686)