Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Only works where Spotlight is enabled' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Only works where Spotlight is enabled
Authored by: bankshot on Jun 21, '13 11:02:53AM

First, a little addendum to this hint: to find all files and folders that have been excluded this way, the following command works (perhaps there's a way to do it in the Spotlight gui, but just typing the term into the search box didn't work):

mdfind "com_apple_backup_excludeItem = com.apple.backupd"

The above finally helped me figure out an issue with this tmutil hint that has been plaguing me for several weeks. On one of my volumes, I would consistently get the following error message when doing tmutil addexclusion /path/to/file:

Insufficient privileges to change exclusion setting.

I tried running the tmutil addexclusion command as root (using sudo) and tried some other things, but no matter what, it got the same unhelpful error anywhere on that volume. I had resorted to manually adding the com.apple.backup.excludeItem attribute using the xattr command.

Fast forward to today when I was investigating another Time Machine error - I discovered that it had been randomly failing to backup or stopped backing up large portions of my iPhoto library (my iPhoto library resides on a large external disk - the same volume in question). I used the mdfind command to verify that the affected files/folders weren't being excluded, and noticed that no exclusions on the affected volume showed up at all - not even ones that I had manually added.

The lightbulb went off, and I remembered that I had disabled Spotlight on this volume (figured it wasn't worth it since I was going to be mostly storing large, non-searchable data on it). I reenabled Spotlight and suddenly the tmutil addexclusion command worked. Additionally, the next Time Machine backup finally included my entire iPhoto library for the first time (good thing I didn't need that backup before now!).

So the moral of the story is, never disable Spotlight on a volume you want to backup with Time Machine. It will prevent the tmutil addexclusion command from working, but more importantly, it will prevent Time Machine from making a complete backup of that volume (perhaps I should submit a separate hint about this second part since it's pretty important!).



[ Reply to This | # ]