de/activate and Time Machine

René J.V. Bertin rjvbertin at gmail.com
Thu Apr 28 07:26:53 PDT 2016


On Thursday April 28 2016 08:38:35 Daniel J. Luke wrote:

> 
> IIRC there is some metadata that you can set to exclude a file from backup (a little googling says it's probably 
> com.apple.metadata:com_apple_backup_excludeItem) 

I think the safest way to set or unset this is via the TM commandline utility (addexclusion/removexclusion); see man tmutil and the discussion of the 2 types of exclusion.

> - it might be interesting to patch base to set this (along with possibly adding some sort of 'restore' action which will do the deactivate/reactivate dance).

Yes, it certainly would. I was thinking of a script that would handle this, which would have the benefit of easier updating, but one could of course also set the sticky exclusion bit on every file during activation. In fact, that might resolve the whole question of how to filter files that *should* be backed up from those that are already backed up via the software image archive.
It'd probably still be a good idea to do a directory-level exclude of those directories that shouldn't ever hold files that aren't part of a port, esp. if they can contain huge numbers of files (share/doc, share/locale, include).

Annoyingly the metadata bit set by `tmutil addexclusion foo` doesn't show up with `mdls foo`.

R.


More information about the macports-users mailing list