Ask HN: Can you exclude ~/Library except for your iCloud Drive in macOS backups?

2 amichail 2 5/6/2025, 11:53:24 PM
There seems to be no easy way to do this.

Comments (2)

TowerTall · 11h ago
No, if you exclude a folder its children will also be excluded. You could Exclude everything else in ~/Library but that means that you have to maintain a long list of exclusions; any new folder you or macOS adds later will start getting backed up until you exclude it.

You can also mark sub‑folders with the "do not backup" xattr

xattr -w com.apple.metadata:com_apple_backup_excludeItem com.apple.backupd ~/Library/Caches (Time Machine picks this up automatically).

or you can switch to Carbon Copy Cloner. It allows you to build positive include rules

solardev · 11h ago
Can you exclude that folder but symlink the subfolder elsewhere and back that up instead?