Amazing question with nobody really answering your question 100%.
The answer is : it's hard. If you only have a iphone and more photos on your icloud than can fit on your phone, you're kinda screwed if you don't know what you're doing.
AFAIK Apple makes it very difficult to get all your icloud photos bulk downloaded, original quality off icloud.
Google is no better.
It's much easier to start backing up from the beginning but once you're stuck on icloud it's hard.
If you have a Mac with sufficient storage, you can just enable iCloud to store photos locally, then export them. That could miss some data (I think descriptions you set for a photo were not exported the last time I checked), but it is most of the data.
I did not try it, and I am nervous the day I need to - but I think there are some solutions to export photos from the Apple technology stack using open source software [1,2,3].
I remember seeing a longer blogpost re the topic of retroengineering the Apple phot sync story, but I could not find it.
Yup. Only reason I'm on OneDrive is that they don't mess with photos and their metadata. For now, at least.
I guess it's because the core offering is still some version of "a folder that syncs", and the photo gallery is just a view bolted on top.
I steer clear of any solutions scoped to photos only, as it always turns out they either screw you up by reducing quality and throwing away the originals, or trying to lock you in by only offering metadata they keep in a database they will not let you export.
It's not iCloud Photos, in my case it's Google Photos. But I keep a copy of all my photos in a self-hosted instance of Immich [1], which I then back up to a Hetzner Storage Box using Backrest [2].
So I end up with 3 copies of all my photos, on 3 different providers (I mean... 2 different providers plus my homelab disk).
It's mainly just rsync. When the phone was plugged in, the photos were accessible at a path like "/run/user/1000/gvfs/gphoto2:host=Apple_Inc._iPhone_abc123/".
Now I use Time Machine, but I still need to check whether it includes iCloud photos.
While I haven't tested for that myself, the script should keep pretty much everything including image metadata. I just made a small change so that it also keeps extended attributes in case any image-related metadata is there.
The script currently requires changing one or two folder paths at the top (more details in the script).
I have a weird setup lol.
I use a shared photos library with my partner (so that we have all family photos together) and have a MacBook Air that has Photos being download in raw quality and backups then via Time Machine on a Synology NAS.
Plus, Synology photo sync on my iPhone (backing up on my NAS separately from Time Machine) AND Google Photos on my partner’s (syncing on Google Photos).
Yes it’s horrible, just never had time to clean I up properly but I prefer to have them in multiple cloud locations and locally for now than optimise for having a clean setup.
That's tedious. Can't believe nobody mentioned Parachute Backup yet. It had a moment in the sun earlier this year or last year when it first started getting traction.
I have a Mac, so not just an iPhone, so I use Arq there, it materializes the iCloud stuff as necessary for backup. But if all you have is an iPhone or iPad along with an external disk, NAS or whatever, Parachute Backup will do backups to a variety of destinations.
The answer is : it's hard. If you only have a iphone and more photos on your icloud than can fit on your phone, you're kinda screwed if you don't know what you're doing.
AFAIK Apple makes it very difficult to get all your icloud photos bulk downloaded, original quality off icloud.
Google is no better.
It's much easier to start backing up from the beginning but once you're stuck on icloud it's hard.