Tips

iCloud Photos Backup Guide

Export iCloud Photos Locally

The recommended way is to backup all your original iCloud media using the iCloud Photo Downloader Python utility icloudpd. It downloads all photos from your iCloud account via the CLI. This means all photos as well as all videos (so make sure you have enough hard disk space!):

brew install icloudpd

mkdir icloud-photos
icloudpd -d icloud-photos -u YOUR-ICLOUD-EMAIL-ID@icloud.com

… then follow prompts.

Default Photos Library Location

Alternatively, you can just reference macOS’s default Photos Library, which is located at ~/Pictures/Photos Library.photoslibrary/

This single package contains:

Important: Do not copy individual subfolders inside the package. Always copy the full .photoslibrary package.

Backup Strategy

Use rsync to copy your library to an External Drive.

Assuming your external backup drive is mounted at /Volumes/bak and contains a Pictures/ subfolder, you can back up the library as follows:

# Close Photos app before running
rsync -avh --perms --delete ~/Pictures/Photos\ Library.photoslibrary/ /Volumes/bak/Pictures/

Explanation of options:

This creates an exact copy of your Photos Library in /Volumes/bak/Pictures/.

Restore Strategy

To restore the library:

  1. Copy the backed-up library back to ~/Pictures:
rsync -avh --progress /Volumes/bak/Pictures/Photos\ Library.photoslibrary ~/Pictures/
  1. Hold Option while opening Photos and select the restored library.
  2. Photos will open exactly as it was, with all albums, edits, and metadata intact.