How do I backup my iCloud files and data using Duplicacy

It might seem weird, but I don’t 100% trust iCloud and apple - so I’d rather want Duplicacy to backup all my iCloud files and data.

How do I setup the duplicacy web gui on my mac to backup my iCloud files and folders?

While your reasoning for backup is flawed — apple losing your data is far less likely (just to avoid saying “impossible”) than any other solution you may come up with, including duplicacy to other clouds; this is not the reason why you should backup: you may accidentally delete files, damage or corrupt them. User error and software/hardware failure is much more likely to occur silently locally than commercial datacenter failure and that’s why you want to deploy backup with long version history. This is where duplicacy comes in.

iCloud Drive files are located under ~/Library/Mobile Documents/…; the best approach on a Mac would be to backup entire home folder. Stuff that can be skipped is already marked for exclusion by special extended attribute; duplicacy honors that by default in the current version. You might want to confide to sync all files locally; otherwise your backup won’t be deterministic.

1 Like

I didn’t elaborate on my reasoning as to why I want to backup, but I do agree to this.

Where is the home folder located? Is it the same as /Users/<username> or is it different?
So far, I was backing up individual folders like Desktop, Dropbox, Downloads, etc.
Backing up /Users/<username> should include all of them, right?

I didn’t understand this at all, sorry for being a noob - could you elaborate?

Thank you!

Yes, it’s /Users/username. The Library folder is hidden there, you can see it along with other hidden files if you press Command+Shift+period in Finder.

I didn’t understand this at all, sorry for being a noob - could you elaborate?

Sorry, there was a typo — confide -> configure.

By default iCloud is configured to “optimize Mac space” or some similarly sounding mode, where only recently used files are downloaded locally as you use them, on demand. This makes sense if you have 2TB iCloud Drive and only 512GB local SSD. But this also means that your local backup will only backup those locally synced files, and most of the cloud data will be unversioned. This is mot a problem if you only access that data from one Mac, but if not — changes to other files made from other machine that are not synced to local one where duplicacy runs will not be backed up.

Actually, now that I typed that I’m not so sure about it: maybe missing files will be downloaded on-demand as duplicacy tries to read to backup them. I have never tested this because on the machine that runs duplicacy in the iCloud settings I disabled “optimize Mac space” and this forces all files to be always downloaded locally. That’s the option I meant above.

And lastly, don’t forget to add duplicacy to Full Disk Access in Security settings in System Preferences, otherwise it will be unable to read sensitive folders like Documents and Mail.

1 Like

@saspus did you end up seeing if duplicacy will backup all iCloud files with ‘optimize Mac space’ for iCloud enabled?

I’d like a solution to backup mine and other family members iCloud data. Especially for human error in deletion and outages. Having a seperate cloud storage would be great piece of mind.

I have duplicacy running on an Unraid media sever. Adding iCloud as a storage would be great. But it’s not listed and I can’t see anything in the forum about it.

Looking at the discussion above I assume I’d could run a spare mac as a server. I have a 128GB SSD MacBook I could potentially use. If the ‘optimize Mac space’ for iCloud didn’t work, I could use external storage.

I’m not sure If I could backup also from multiple MacOS user accounts while logged into a single account MacOS user. The other MacOS user accounts would be other family members iCloud accounts.

Or does anyone have any other suggestions for a cross-platform cloud backup tool that has good encryption and support?

Running a windows VM with iCloud storage might also be an option. I think the latest windows iCloud utility even supports their latest iCloud advanced data protection.

Just to add my experience with “optimize storage”. I recently started seeing the occasional backup failure due to unreadable files under ~/Library/Mobile Documents/.... I actually have “Optimize Storage” turned off, so I think Sonoma has a bug, but I found that I could resolve this by accessing each file just prior to running the backup.
find ~/'Library/Mobile Documents/' -type f -print0 | wc -c --files0-from=-
This may not be ideal, but it does work to retrieve every file so it’s available before duplicacy starts up.

Heads up to anyone experiencing this, Arq Backup has the option to materialize cloud-only files when doing the backup, which resolves this. I’ve had to resort to using Arq to backup my MacBook to resolve this issue. Once it’s set, it’s easy and painless even when optimize storage is enabled in MacOS.