9 Replies Latest reply: Sep 11, 2008 3:11 PM by Tohu
Tohu Level 1 Level 1 (90 points)
Hi. Im trying to disable spotlight indexing for my back up volume wich is located on an external firewire drive. I type the command for disabling spotlight in terminal and get the message that indexing is disabled but that is nox true. Every new file shows up in spotlight search. What do i wrong?

mdutil -i off /Volumes/External\ Back\ Up

Mac OS X (10.5.2)
  • doug pennington Level 3 Level 3 (815 points)
    sudo mdutil -i off /Volumes/External/Back\ Up/
  • doug pennington Level 3 Level 3 (815 points)
    I believe I read the title of your HD wrong. If in fact it is External Back Up then do, what I think is easier and use: sudo mdutil -i off /Volumes/"External Back Up"
    Also pull icon(HD) from Dtop w/cursor to terminal screen for correct path/title. Sorry about misread earlier.
  • Tohu Level 1 Level 1 (90 points)
    None of that helps. I tryed it with sudo and it tells me even too "indexing disabled" but it is not!
    Thanks so far.

    @ Apple: Why you cant implement an tiny little button to spotlights privacy systempreferences that allows the user to mark an volume to "never indexing". I have to delete my Back Up volume completly before i start cloning the whole system. Always after that i have to put this volume in spotlights privacy because i dont wont my search results twice. That nerves!
  • orangekay Level 5 Level 5 (4,085 points)
    You should also remove the indices with the -E option. There's also Spotless

    http://www.fixamac.net/software/spot2/

    Also, if you're going to quote a path you need to do it from the beginning, not just at some arbitrary location in the middle. The above examples are not something I'd emulate.
  • Tohu Level 1 Level 1 (90 points)
    I dont know who you meant with "quote a path from beginning". I provided the whole path that terminal shows me.

    The -E Option doesn't help, i tryed it. The app you linked to costs money. I dont even think to pay a cent because of this bug. Also i cant find a clue in the discription that it will well and truly solve my problem. I think it stops indexing like the shell command should do and the only difference is that it has a gui. Am i wrong?
  • Clea Rees Level 4 Level 4 (1,245 points)
    Do you mean the command fails completely or that it doesn't "stick"?

    If you disable indexing and then delete the index, do you still get results for that volume?

    I suspect that erasing the volume is always going to set things back to square one, though. Depending on how you're cloning, though, you might be able to build in the disable-indexing-and-delete-index so that it is done automatically if the commands do work temporarily.

    The only reasonable configuration I've found (on Tiger) is disabling Spotlight completely, though, which obviously isn't the solution you're looking for.

    I'm sure there are free/open source alternatives to Spotless if you look, though. And I suspect all it is doing, as you say, is putting a fancy gui on things.

    Are you really using 10.5.2? If so, maybe updating would help? (Since I don't have access to Leopard and have never used it, this is merely a suggestion - I've no idea whether Apple's updates have affected this or not.)

    - cfr
  • Tohu Level 1 Level 1 (90 points)
    Hi Clea Rees.

    The command to disable spotlight indexing seems to work in terminal but as i said the spotlight search will find the files on that volume further on. Also it finds files that i add to this volume after executing the command so that what terminal tells me ("indexing disabled") cant be true. I tryed to delete the index with the mdutil -E command but that doesnt help.

    Youre right with the suspicion that earasing a volume will reset spotlights privacy settings. I had then the same idea like you. Thought i can erase the volume, restore the privacy setting and copy the spotlights hidden directory from that volume somewhere else so i can copy it back next time i delete the volume. But that do not help and i think this is because of spotlight saves the privacy information additionally on the startup volume and i dont know wich file it is.

    Sorry for my forgetfulness, i have the latest updates installed. I will update my profile.
  • Clea Rees Level 4 Level 4 (1,245 points)
    Tohu wrote:
    The command to disable spotlight indexing seems to work in terminal but as i said the spotlight search will find the files on that volume further on. Also it finds files that i add to this volume after executing the command so that what terminal tells me ("indexing disabled") cant be true. I tryed to delete the index with the mdutil -E command but that doesnt help.

    If you look for something *right after* deleting the index, does it still find it?
    Youre right with the suspicion that earasing a volume will reset spotlights privacy settings. I had then the same idea like you. Thought i can erase the volume, restore the privacy setting and copy the spotlights hidden directory from that volume somewhere else so i can copy it back next time i delete the volume. But that do not help and i think this is because of spotlight saves the privacy information additionally on the startup volume and i dont know wich file it is.


    Hmm... I don't think that would work anyway. Just guessing but if Spotlight identifies volumes using their UUIDs, then nothing like that would work as you'll get a new UUID each time you erase. You'd have to incorporate the commands to set the privacy up into your backup routine somehow. For example, I used to do this with a script derived from (an earlier version of) Carbon Copy Cloner.

    Like you, I found indexing tended to get re-enabled though I did find the delete and disabling scripts worked temporarily. As I say, it is easy to kill Spotlight completely but I'm assuming you want it to run for your main drive.

    But my work around requires the basic disable/delete commands to work so that doesn't help you much...

    - cfr
  • Tohu Level 1 Level 1 (90 points)
    Clea Rees wrote:
    If you look for something *right after* deleting the index, does it still find it?


    Unfortunately yes.