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

2 pointsposted 21 hours ago
by amichail

Item id: 43910856

2 Comments

TowerTall

17 hours 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

17 hours ago

Can you exclude that folder but symlink the subfolder elsewhere and back that up instead?