Another tiny macro:
It excludes files/folders from Time Machine Backup
- Select one or more items in the Finder
- Run the macro
- The selected items will be excluded from the Time Machine backup
You can also exclude items via System Preferences > Time Machine > Options…, but if you just want to exclude temporary huge files (videos, graphics, etc.) this method is more convenient.
The command attaches the
com.apple.metadata:com_apple_backup_excludeItem: com.apple.backupdExtended Attribute to the file. That is, you can move the item around without loosing the no-backup property.
CrashPlan also respects that Extended Attribute
Backup: Exclude.kmmacros (2.2 KB)
Not to forget, if you want to re-include an item for backup, use this macro;
Backup: Include.kmmacros (2.2 KB)
Oh, yes, and not to forget also:
Once you have entirely lost track of which files are excluded from backup, and which not, this macro comes to help:
Just run the macro and it will…
- Create a folder “Items Excluded from Backup” on your Desktop
- It will populate that folder with symlinks to all files that are excluded from backup (i.e. that have the ‘com_apple_backup_excludeItem’ Extended Attribute)
- The symlinks will be named with the path of the item, so it’s easy to see where the files are located. You can also right-click the symlink (Show Original) to get to file.
The macro will delete any existing folder named “Items Excluded from Backup” on the Desktop. So if you have an important folder with that name, please modify the script before running it.
The macro will take a while (maybe 20s or more) to complete, since it searches the whole disk (via Spotlight).