boot-clj / boot

Build tooling for Clojure.
https://boot-clj.github.io/
Eclipse Public License 1.0
1.75k stars 180 forks source link

Stop temporary directories from being backed up by Time Machine on macOS #628

Open danielcompton opened 7 years ago

danielcompton commented 7 years ago

I noticed recently that Backblaze and Time Machine were backing up Boot's temporary files. This is probably not necessary or desired by most users.

Apple provides an API CSBackupSetItemExcluded to mark directories as excluded by Time Machine, and other Mac backup software respects the same markings. There is also a command line tool tmutil which lets you accomplish the same task with tmutil addexclusion <file path>.

You can check the backup status of a directory with the following command

$ tmutil isexcluded ~/.boot/cache/tmp/
[Included]    /Users/danielcompton/.boot/cache/tmp

Is this something Boot is interested in accepting a patch for?

martinklepsch commented 6 years ago

I think that's a great idea and at least I am open to this kind of change.

Obviously it would be important that this quietly fails if tmutil is not available for some reason (Linux, Windows, ...).