Thursday, October 19, 2017

You Can’t Turn Off Spotlight on Your Time Machine Backup

Howard Oakley:

It used to be that you could exclude your Time Machine backups from Spotlight’s indexing. Not only does this save a great deal of time with the mdworker background service chundering through your backup drive making indexes, not only does it save all the resulting disk activity, but it also saves a lot of space. And the space which it saves inevitably grows as your backups grow.

Try adding your Time Machine backup folder to the files excluded from Spotlight indexing, though, and you will be told that you cannot. If you add the whole volume to the Privacy list, then Spotlight will ignore your wish, as regards the backup folder. Not that it will admit to that, of course.

I ran into this recently because of a noise problem that I traced to Spotlight activity on my Time Machine drive. I never need to search my Time Machine drive, so why not save all that noise, CPU time, space, and energy and just turn off indexing? Terminal showed that it succeeded:

$ sudo mdutil -i off /Volumes/imac17\ Time\ Machine\ 2/
/Volumes/imac17 Time Machine 2:
2017-10-19 13:52:13.060 mdutil[69677:5509896] mdutil disabling Spotlight: /Volumes/imac17 Time Machine 2 -> kMDConfigSearchLevelFSSearchOnly
	Indexing and searching disabled.

And it seemed to be off:

$ sudo mdutil -s /Volumes/imac17\ Time\ Machine\ 2/
/Volumes/imac17 Time Machine 2:
	Indexing and searching disabled.

But I still saw lots of indexing activity. It turns out that indexing is still enabled for the backup folder:

$ sudo mdutil -s /Volumes/imac17\ Time\ Machine\ 2/Backups.backupdb/
/Volumes/imac17 Time Machine 2/Backups.backupdb:
	Indexing enabled.

And it’s apparently not possible to change this.


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.

1 Comment RSS · Twitter

Murray Eisenberg

This does *not* work in macOS Catalina 10.15.3! The "sudo mdutil -i off /Volumes/[TimeMachine_vol_path]" just gives an error that indexing cannot be turned off on a TimeMachine volume and says that indexing there is enabled.

Leave a Comment