brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: tmutil isexcluded tells you if Time Machine skips a file or folder

macOS
~/tips/tip-macos-tmutil-isexcluded

tmutil isexcluded ~/Projects/app/node_modules

Reports whether a file, folder or volume is excluded from Time Machine backups.

I add exclusions to Time Machine and then forget which ones stuck. Checking with a command beats opening System Settings and scrolling a list.

tmutil isexcluded ~/Projects/app/node_modules

For each item you give it, tmutil prints [Excluded] or [Included] followed by the path. You can pass several items at once, and -X gives the result as an XML property list for scripts.

It only reports, it changes nothing. To add an exclusion you use tmutil addexclusion. A plain exclusion is sticky and travels with the item when you move or copy it. With -p it is tied to the path instead, and -p needs root and Full Disk Access.

The man page also says tmutil may need access to private application data on the backup disk. If a verb complains, add your terminal app under Full Disk Access in the privacy settings.

It also works on volumes. A volume exclusion is tracked by file system UUID, and the man page says tmutil addexclusion -v is the only supported way to exclude a volume. After setting one, isexcluded on the mount point is a quick way to see whether it took.

Further reading: tmutil man page (ss64 copy)

More macOS tips System Settings > Accessibility > Hover Text > When using the pointer A Smart Folder in Notes collects notes by tag, checklist or date Type # in a Mac note to tag it, then filter by tag in the sidebar Crop an image in Preview by dragging a frame and clicking Crop Always All macOS tips (99) All topics

Link