How do I make Spotlight stop indexing my Backup drive?
Solution 1:
Create an empty file on the root of that drive, named .metadata_never_index
. This Mac OS X Hints article says more.
Solution 2:
Apply it to the volume, not a directory:
sudo mdutil -i off /Volumes/TimeMachine/
Substitute TimeMachine
with the name of your backup volume, of course.
For example...
Johns-iMac:~ john$ sudo mdutil -i off /Volumes/Time15/
Password:
/Volumes/Time15:
2015-10-27 12:37:18.436 mdutil[56686:26121199] mdutil disabling Spotlight: /Volumes/Time15 -> kMDConfigSearchLevelFSSearchOnly
Indexing and searching disabled.
Which does leave the subdirectory reporting as "enabled", but (until proven wrong I understand) the setting at the volume level will override.
Solution 3:
I finally found you cannot disable Spotlight to index Backups.backupdb
.
Apple Support. OS X El Capitan: Spotlight preferences
If you add a Time Machine backup disk to the privacy list, you will continue to see messages that Spotlight is indexing your backup disk. This indexing is necessary for Time Machine to function properly and can’t be disabled. Spotlight does exclude from searches any items you store on your backup disk that are not part of a Time Machine backup.
Solution 4:
Do it from Terminal via sudo (info courtesy this page):
sudo mdutil -a -i off
You'll also need to supply your admin password.
Similarly, to turn back on:
sudo mdutil -a -i on
Note: Set the items for Spotlight to show at Prefs > Spotlight