Offline backup of iCloud Photo Library

I am fully invested in the Apple Ecosystem. I subscribe to Apple One Premier and have a total of 4 TB of iCloud storage shared across my family. Both my wife and I use iCloud Photo Library and have numerous of Shared Albums and share a Shared Photo Library.

I did have a thought tho, what if all of my iCloud data got catastrophically erased?

So my photos are the most precious of my data as they include all the photos we have ever taken of my daughter from the day she was born. What would be the best way to download and have an offline backup of all the photos in my iCloud Photo Library and (if possible) the Shared albums too? What would be the best solution for the initial back up and incremental backups afterwards?

Thanks for your help in advance.

Copy the whole Photos package which holds your library onto another drive and unplug it.

Update it regularly and potentially put a copy on a 3rd drive and store it somewhere else away from your home

I recommend encrypting any backup drives

Oh and any form of Online backup will work too

With Google search “backup icloud photo library” I found

Archive or make copies of the information you're storing in iCloud – Apple Support (UK).

Whatever you pick try and fully test to confirm it works as you expect.

I recommend you do not backup to iCloud as it unreliable for any backups. And what would be the point of backing up to the same place the source is at.


And then test your backups from time to time to insure you can recover your photos if necessary. Data loss is caused by human error.


Just to emphasize the details - make sure you have at least one Mac that downloads full copies of all your iCloud photo library. (That might take some planning on hard drive capacity/options.)

Then you can choose your method to backup locally.

Some folks just duplicate the local Photos library, others open the package and extract all the photos to a separate file/folder structure.

In the past, I had a utility that could do that with incremental updates, but the app long ago was discontinued/unsupported.

1 Like

I would be all over an app that would auto-export even JPEG backups of each photo to a YYYY/MM/DD structure or something like that. It’d be awesome if it would incrementally update too.

This python program looks like an interesting option, especially if you want to automate the backups.

1 Like

Went searching and found it. Unfortunately no longer available, someone else should do a utility like this:

That was my preferred method until Apple started renaming the files in the “originals” folder.

Now instead of the original name IMG_1234.jpeg, images inside the .photoslibrary file are named something like 3A157FBE-A746-4FE5-A672-9BBA4411326E.jpeg

This is what I use to rename exported files using the embedded exif data. - ExifRenamer

One word: Imazing. This should be in anybody’s arsenal if you have a Mac or PC and iOS devices.

I’m the author of the free open-source app osxphotos (linked in another post in this thread) which can export all your photos from while preserving metadata and the original file names. It does require some level of comfort with working in the terminal as it’s a command line application but is quite powerful and gives you full control over the naming scheme, etc.

I built this to backup my Photos library and it works well. A few key points:

  1. You must have at least one Mac set to “Download originals” (Photos | Settings | iCloud | Download Originals to this Mac) otherwise if you delete a photo in the cloud or on one device, it gets deleted on all of them and thus potentially no backup, even if you’re using something like TimeMachine.
  2. If the disk your Photos library is on is using APFS (all modern Macs are) then osxphotos will take advantage of a feature called “copy on write” which means that if you create a Photos backup (“export” in osxphotos parlance) on the same disk volume, the files don’t actually take up any extra space unless one copy of the file gets changed. This means export is very fast and takes little extra space. But if you then use TimeMachine to backup that drive, TimeMachine does see an extra copy of the photo and creates a full backup of the exported photos. This is different than how TimeMachine works for a normal Photos library where it doesn’t really backup the entire thing. Apple does some behind the scenes magic to backup only a snapshot of changes in TimeMachine when backing up a Photos library. I use this feature to keep a “local backup” that’s easily browsable and also have it backed up to TimeMachine and offsite (backblaze).
  3. You could also have osxphotos export to an external disk and use that as the backup. osxphotos has a --update feature to export only new or changed files. This means you always have an up to date backup including files that were deleted in Photos. If you want to delete the photos from the backup set that were also deleted in photos you can add the --cleanup flag which deletes any photos not included as part of the backup.
  4. You can set this to run automatically but it takes a little bit of work (I’m working to automate this). See the discussion here

I posted a long detailed response to how to do this but someone flagged it and hid the post. (This happened to several posts I just made answering similar questions here…not sure I care for this forum if that’s how new members are welcomed) but anyway, the osxphotos app mentioned elsewhere in this thread can create a full incremental backup that exports all the metadata, including some that doesn’t even give you access to. You’ll have to search for the link as I don’t want to post it here and get this flagged again. The software is 100% free and fully open source.

1 Like

Sorry people are doing that. Probably a reading comprehension issue (thinking it was a commercial link.) Welcome, thanks for explaining osxphotos and please stick around!


Rhet, welcome to the community and sorry your post got flagged! I agree with @cornchip and also apologize on our community’s behalf.

I’ve been looking for something like this for a while. While we are discussing its feature set, can you organize the files by their metadata when you do the export?

Edit: I’ve read through your documentation and get it now. This looks fantastic and I can’t wait to start using it. I presume, since it works with any photo library, that it would also work with the shared iCloud photo libraries?

1 Like

Thanks for the welcome! Yes, you can use pretty much any metadata field you’d like as part of the exported path or filename using a very rich templating system. For example, to append the keyword as part of the filename, you’d do:

osxphotos export /path/to/export --filename "{original_name}_{keyword}"

It’s also easy to filter by any metadata so only certain photos are exported.

Of course, if you’ve got more than one keyword, you’ll get more than one copy of the file in this case.

I presume, since it works with any photo library, that it would also work with the shared iCloud photo libraries

Yes it should work fine though I have not been able to test this since I don’t use the new shared library feature. osxphotos was built by reverse-engineering the Apple Photos library and I think I understand how they’re implementing the new shared library and that osxphotos will work but have not been able to test this yet. If you run into any issues, let me know!

1 Like

Thanks for the welcome cornchip!

Hi @Rhet_Turnbull. Thank you very much for your suggestion. Just a couple questions (forgive me as I have not been able to fully read through all the documentation of your app).

  1. Will this work with iCloud Photo Libraries that are set to “Optimize”? Will your app fetch the originals? or will it just pull what is stored on the Mac?
  2. I read that your app does support NAS drives, provided the network connection is reliable. With the retry attribute that you can add, would it retry the entire process or just try and pick up where it left off?

I’m asking because currently my Photos library contains over 60,000 photos and 3,100 videos and is taking up about 1.4 TB of iCloud storage, which I can assume are the originals as I have all my devices setup to Optimize storage.

Thanks in advance for your input and your efforts on making your app!

Hi @tech_lwo

  1. Yes, it will work with “Optimize Mac Storage” libraries if you use the --download-missing flag but this is not the ideal use case especially for such a large library as nearly 1.4TB of data would need to be downloaded.
  2. With --retry, only the photo which caused an error is retried and the rest of the export continues as expected. This makes for reliable backup even over an unreliable network connection.

With such a large library that is not on the Mac, I suggest an alternate workflow:

  1. Procure an external drive (preferably SSD) that will hold the entire library and connect to the Mac.
  2. Create a second account on the Mac.
  3. Switch to the new account and set it up to use the same iCloud credentials as your primary account.
  4. Create a new Photos library on the second drive (hold down Option while starting Photos) and designate this as the system library. In Photos | Settings, configure the new library to “Download originals to the Mac”
  5. Allow iCloud to sync the new library (you can switch to your normal account but leave the second account logged in)

This will create a full clone of your library on the external drive as a backup. I still suggest using osxphotos or another tool to export the library for backup outside the Photos ecosystem so you have a backup in case you delete something from iCloud etc. but at least you’ll have a full offline backup. You can do this for your wife’s account as well and periodically login to the secondary account so the library can sync (with the external disk plugged in). This way you can still use the internal Optimized storage library as your primary.