gerdemb
a month ago
HN disclosure: I’m the author of Photos Backup Anywhere, but this thread mirrors the exact issues that pushed me to write it.
One thing that surprised me when digging into Apple Photos is how much state isn’t represented by just files-on-disk. Albums, Live Photos (paired assets), bursts, slo-mo, edits, and even “simple” things like adjusted capture dates are all tracked separately, and most export/backup tools end up flattening or partially reconstructing that on restore.
The approach I took was to treat Photos as the source of truth and verify restored items against it, rather than assuming filesystem metadata is enough. As far as I know, this is the only tool that restores albums and correctly round-trips all Photos item types while preserving location data, creation dates, and modification dates when restoring back into Photos.
Project page is here if it’s useful: https://photosbackup.app/
Happy to explain details if anyone’s curious — there are a lot of sharp edges in Photos once you go beyond “export originals”.
open_
a month ago
My current process for offloading photos off the iPhone is to copy them in subsequent batches of '0-9999' from the 'Image Capture' app.
This is because I usually have far more than 10K photos and apple starts renaming the files after 9999 as 00001(1) for the rest. This is pretty undesirable.
Is there a way for me to export unmodified raw/jpeg/live/videos off the iphone to an external drive without a macbook with a large enough ssd, and wanting to use icloud as an intermediate bottleneck?
m463
a month ago
I use libimobiledevice on linux
plug iphone into usb. lsusb should show it.
I backup my photos with:
sudo ifuse -o allow_other /mnt
rsync -a /mnt/DCIM <photos-dir>
sudo umount /mnt
Actually, I backup all of /mnt not just DCIM, but that answer
is for you. I also backup the entire phone with: sudo idevicebackup2 backup <backup-dir>
but in this form it either does the photos as data files, or
doesn't back them up. I think it is a complete backup.yardstick
a month ago
Do you take into account the iPhone not holding the original images of every photo? It will offload originals and just keep thumbnails if the library is too large.
Mine is approaching 1.5TB, I’ve got no hope of keeping that all on an iPhone, and also no guarantee that any given photo is fully available locally.
cyberpunk
a month ago
Aren't there hooks on the filesystem layer that downloads them when you access them? E.g I can browse via terminal to my iCloud Drive somehow and cat etc works on files which aren't local (after locking to download them first).
thw_9a83c
a month ago
> Do you take into account the iPhone not holding the original images of every photo?
If you have enough storage space on your iPhone, you can select "Download and Keep Originals" in the photo app settings.
m463
a month ago
I think the originals and edits are both there.
I don't know about space-optimized storage on-phone. I know one setting for transfer to mac or pc - I have it set to "keep originals" instead of "automatic". There might be other settings I'm not aware of.
EDIT: actually, there are other directories (under /mnt but outside DCIM in my example) that seem to have other photo stuff, maybe edits? ymmv
thw_9a83c
a month ago
> My current process for offloading photos off the iPhone
I'm not sure about Linux, but my workflow on Windows and MacOS is to frequently back up my iPhone locally (which you should do anyway because few incorrect PINs can security lock your phone [1]) and use utility like backup extractor (e.g. [2] but there are many others) to extract all photos from the backup. This effectively removes the need to use iCloud.
[1]: https://support.apple.com/en-us/105090?device-type=iphone
zerkten
a month ago
Does the PhotoSync app permit that? I use it to copy files to my NAS but it has some USB-related options I never explored. I used to use Image Capture but heard of PhotoSync and have never looked back.
user
a month ago
darknavi
a month ago
With Photosync I have our photos export to my NAS and have it update the file names with the timestamp + original file name, which makes it so much more sane to sort through.
Example:
Original: IMG_9999.JPG
Server-side file: 2015.01.15__IMG_9999__.JPG
open_
a month ago
That looks like it might do the trick. I feel like this should be something possible only using first party apps but I'll take it! Thanks.
kccqzy
a month ago
I use and like PhotoSync but I thought it doesn’t export unmodified originals but your edited versions. Personally I like this behavior better but that might not be what you want?
I’m not sure Apple allows any third party app to access the unmodified originals. Imagine you crop a photo to remove some embarrassing part. A third-party app can just recover that? What a privacy risk.
Of course this won’t matter if you don’t do any photo editing on iOS.
zerkten
a month ago
It's right to question this. I had taken https://www.photosync-app.com/support/basics/answers/does-ph... ("PhotoSync transfers the original, unaltered images including all EXIF and GPS data") on face value without thinking of all of the iCloud behavior. Even limited copies would suffice in my case, but that's insufficient for others.
giancarlostoro
a month ago
I did it on Linux once I extracted them all as-is in the strange storage way that iOS stores them but I dont recall steps to make it mount the drive.
open_
a month ago
That would be perfect, I might chase down this path again. It's been a while since I've tried to directly mount the iphone as a drive on linux.
hackeman300
a month ago
If you manually edit the date on a photo, is that also stored separately from the image file itself? Wondering because I've noticed photos I've backed up to Immich from iOS photos don't respect that edited date and reflect whatever the original date was.
I've been thinking about looking into a fix for this since it's bugged me a bit.
gerdemb
25 days ago
Yes — in Apple Photos the manually edited date/time is not written back into the image or video file. It’s stored separately in the Photos library database, which is why tools like Immich usually fall back to the original capture date in EXIF / QuickTime metadata.
Photos Backup Anywhere does handle this case: it reads the adjusted date from the Photos library and stores that modified timestamp in its own SQLite database, linked to the backed-up file, so the edited date isn’t lost even though the file itself isn’t rewritten.
hackeman300
23 days ago
Thanks for the reply, I appreciate it. Does Apple provide any APIs for interacting with this metadata or was this something you had to implement yourself with lower level DB lookups?
rhettbull
25 days ago
> As far as I know, this is the only tool that restores albums and correctly round-trips all Photos item types while preserving location data, creation dates, and modification dates when restoring back into Photos.
My free open source tool osxphotos [1] does this. In addition to an "osxphotos export" command to create archival exports with all metadata, it also has an "osxphotos import" command that can restore all metadata including albums (with exception of named persons/face regions, though persons can be converted into keywords on import). It can also read XMP sidecar files to restore metadata from those. It's a CLI and definitely a power user tool.
It also includes an "osxphotos sync" command that can sync metadata between two libraries. Some people use this to sync metadata like favorites from iPhone library to the Mac library. (can't go the other way unfortunately)
giancarlostoro
a month ago
I have taken time to slowly extract photos from old androids and its such a nightmare, and if you cant get a meaningful interface to load you have to resort to tooling that scrapes the whole drive and hope it grabs everything.
s4mbh4
a month ago
My current workflow for this is to install the 'simpleSSHD' app on the android phone and rsync the files off at full network speed.
The sshd running on the phone also supports key based auth , so it's pretty simple to automate.
giancarlostoro
a month ago
Yeah but for some phones the storage is full ;) I had to figure out how to remove just enough to root it and then just adb in for one phone then I learned that if I extract too quickly it gives up the ghost so I have to add a delay
torarnv
a month ago
Awesome! Thanks for posting, I've been looking for exactly this kind of project that takes end to end pristine restoration seriously.
The FAQ states you back up the originals as plain images files in YYYY/MM/DD format, which is great for integration with other tools. What about metadata? Is it in a format that lends to integration with other tools, say if you stop developing/supporting your app for some reason?
darkteflon
a month ago
This is a great app! Thanks, I bought it. I'm backing up to a network share over SMB. Just wanted to let you know that the error message in the event that the share becomes unmounted during a backup is a bit obscure: it just says "pdb.sqlite" doesn't exist. Stopping and restarting the backup fixes it. Might be helpful to provide some clearer error handling / messaging and guidance for disappearing network shares?
gerdemb
25 days ago
Thanks or the detailed feedback.
You’re right about that error message. What’s happening is that when the SMB share gets unmounted, the app can no longer access its SQLite database (pba.sqlite), and the resulting error isn’t very user-friendly. I agree it would be much clearer to explicitly detect a missing or unmounted network share and provide guidance.
I’ve added this to my list of things to improve. Thanks again for taking the time to report it — feedback like this is super helpful.
darkteflon
24 days ago
My pleasure - much appreciated and thanks for being so responsive.
I’ll just add in here a sneaky humble request for graceful automatic pausing and restarting as network shares (or other volumes?) (dis-)appear - although I imagine that one’s a bit trickier to implement.
All the best! Very satisfied user. Great replacement for the script + cron job I was using before.
wappieslurkz
a month ago
Thanks for creating this amazing tool. A requirement for it to work is disabling "Advanced Data Protection". What are the implications of doing this?
BeastMachine
a month ago
Pretty severe -- ADP allows users to store data with e2e encryption.
Disabling ADP is a pretty serious* thing to do -- and pretty disappointing since I was interested in the product. Since it's OSS though this might be something that can be worked around in the future.
wappieslurkz
21 days ago
Thanks for confirming my hunch. I'd be surprised if it would be possible to work around this.
gerdemb
a month ago
That’s a good question. To be completely honest, I don’t know much about Advanced Data Protection myself, and I didn’t do anything specific in the app to detect or interact with it.
I’m actually curious: how did you discover that it doesn’t work when Advanced Data Protection is enabled? Was it through an error message, incomplete backups, or something else you noticed?
wappieslurkz
a month ago
I did not discover it, disabling ADP is listed under "iCloud Prerequisites" on the/your GitHub page.
klausa
a month ago
The app that the person you're replying to ('gerdemb) created (Photos Backup Anywhere) is different than the open-source CLI tool that is the HN submission (icloud_photos_downloader).
wappieslurkz
21 days ago
Aha, thanks. That's good to know.
supermatt
a month ago
Is the app bound to the purchasers iCloud, or can I also use it to download my partners images?
gerdemb
25 days ago
Yes — Photos Backup Anywhere supports Apple Family Sharing
If the app is shared via Family Sharing, each family member can install and use it on their own Mac with their own iCloud Photos library. The app works with whichever Photos library is signed into macOS on that machine, so you can absolutely use it to back up your partner’s images as well.
bunnyfoofoo
25 days ago
Hey @gerdemb, just wanted to say thank you. Bought this because of your comment and this worked perfectly for backing up my 1TB photo library.
ubermonkey
a month ago
I'm extremely interested in any process that would allow me to create file-system-level backups of individual photos. Will your tool do that?
gerdemb
25 days ago
Yes — that’s exactly what Photos Backup Anywhere is designed to do.
The app creates file-system-level backups of each individual photo and video from your Photos library. Every asset is exported as a real file on disk (HEIC, JPEG, MOV, etc.), not a database blob or package, so you can browse, copy, verify, and back them up with standard tools.
In addition, the app keeps a small SQLite database alongside the files to track metadata (including edits, albums, and relationships like Live Photos), which allows accurate restores and verification while still giving you transparent, plain-files access to your media.
ubermonkey
24 days ago
That's awesome. I've been low-key looking for something like this, so I just bought your tool. Thanks for creating it!
scoot
a month ago
This looks interesting. Can I use it to back up photos from one (old) photo library, and restore them into another (newer) one?
gerdemb
25 days ago
Yes — that’s exactly what it’s designed for. You can back up photos from one Photos library and later restore them into a different Photos library. The restore process recreates the items in the target library using the data stored in the backup.
scoot
19 days ago
Thanks. I'll give it a go
toomuchtodo
a month ago
Thanks for commenting, do you support S3 compatible targets? Backblaze B2, for example.
gerdemb
a month ago
Not directly, no. If you can mount the S3 target as a drive, it can be used as a backup destination.
snorlax100
a month ago
Love this app! Kudos
SSLy
a month ago
have you looked at parachute backup? they also boast ability to backup the more mercurial types of iPhotos data.
gerdemb
a month ago
Backing up “mercurial” Photos data is only half the problem. The tricky part is restoring it in a way Photos actually recognizes as equivalent to the original library state. Photos Backup Anywhere restore works by re-importing items while explicitly reapplying Photos-level attributes: paired assets for Live Photos, burst membership and picks, slo-mo metadata, edits, locations, adjusted capture dates, and then reconstructing albums after the items exist again in the library.
In other words, the filesystem copy isn’t treated as the source of truth. The restore verifies items against what was backed up and only then rebuilds higher-level structure like albums. That’s the piece I didn’t see addressed elsewhere, and what originally motivated me to build it.