Stop Spotlight from Indexing Time Machine Backup Volumes & External Drives

Jan 24, 2012 - 7 Comments

Stop Spotlight from Indexing Time Machine 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.

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:

  1. Connect the volume you want excluded to the Mac, even if Spotlight is currently indexing
  2. Launch “System Preferences” and click on “Spotlight” followed by the ‘Privacy’ tab
  3. 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
/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.”

Enjoy this tip? Subscribe to the OSXDaily newsletter to get more of our great Apple tips, tricks, and important news delivered to your inbox! Enter your email address below:

Related articles:

Posted by: Paul Horowitz in Mac OS X, Tips & Tricks

7 Comments

» Comments RSS Feed

  1. landoncube says:

    When I drop the external hdd Mac mini Time Machine into the Privacy tab of Spotlight, I get the message:

    “Mac mini Time Machine” is a Time Machine backup.
    Spotlight will continue to search Time Machine backups but will not search other items on the disk.

  2. iGnome says:

    Great tip, Shame there could not be footnote on the privacy page within Spotlight preferences to make it obvious that this was the way to do it because I did look there before googling for this answer. All they need to do is add two words so that it reads “Prevent Spotlight from searching OR INDEXING these locations”

  3. jeff6times7 says:

    You cannot disable indexing of Time Machine backup locations in Lion. The commands you mention just don’t work. Well, at least when the backup location is an external drive like my USB drive.

    I tried disabling indexing system wide and got a backup error shortly thereafter. Not sure if one caused the other.

  4. Adele says:

    Ok, so I have disabled the indexing function of spotlight on my external hard drive but surely I should still be able to search that hard drive for something or I am being thick here.. does indexing =searching?

  5. Clint Modien says:

    Wanted to drop a hint… if you get an error saying that you cannot resolve path /Volumes/TimeMachine … you need to run the command with sudo… (e.g. sudo mdutil -i off /Volumes/TimeMachine)

Leave a Reply

 

Shop for Apple & Mac Deals on Amazon.com

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates