Stop Spotlight from Indexing Time Machine Backup Volumes & External Drives
The default behavior for Spotlight is to start indexing any drive as soon as it’s connected to a Mac, a task that can take a very long time with larger volumes. The problem is that for larger external backup drives and Time Machine volumes, you don’t necessarily want it indexed by Spotlight. This is particularly true if the drive gets used on multiple machines, where indexing on each Mac isn’t necessary.
Preventing Spotlight from indexing a Time Machine volume, or any other external drive, is quite easy, however, which is what we’ll detail in this walkthrough.
Preventing Spotlight from Indexing Time Machine Backups & External Disks on a Mac
The solution is simple enough, the same method used to exclude something from Spotlight can also be used to stop Spotlight from indexing a Time Machine drive or other external volume:
- Connect the volume you want excluded to the Mac, even if Spotlight is currently indexing
- Launch “System Preferences” and click on “Spotlight” followed by the ‘Privacy’ tab
- Drag the drives icon into the Privacy window
Even if the drive is currently being indexed by Spotlight, this will cease the indexing process and prevent the drive from being reindexed again on that Mac. You’ll have to redo this process on each Mac that the drive is connected to.
If a drive is removed from the privacy list, it will automatically start a rebuild of the Spotlight index for that volume, however.
Stopping Spotlight from Indexing Backups & External Drives from the Command Line
If you’d rather prevent a drive from being indexed from the command line, you can do that with mdutil and the following syntax:
mdutil -i off /Volumes/VolumeName
When the command has executed properly, you’ll see something like this:
$ mdutil -i off /Volumes/MediaCenterMovies
Indexing and searching disabled.
Be sure to specify a full volume path, because if you just use / or don’t use proper syntax you could wind up disabling Spotlight systemwide.
Reversing this and reenabling indexing on a per volume basis is just a matter of changing the flag from off to on:
mdutil -i on /Volumes/VolumeName
Again you’ll get a message, this time confirming the path and “Indexing enabled.”