How the heck to I stop Spotlight from indexing my External HD? (Privacy doesn't work)

Discussion in 'macOS' started by todd2000, Jun 1, 2007.

  1. todd2000 macrumors 68000

    Joined:
    Nov 14, 2005
    Location:
    Danville, VA
    #1
    Ok let me set this up first, I use Carbon Copy Cloner to clone my internal HD to my External 3 times a week. I have CCC set to erase the external, and copy everything over each time it backs up. The only problem im having is I can't stop Spotlight from indexing/searching my external drive. Adding the drive to the Privacy tab in the Spotlight Prefs works, but only until the next backup, after the next backup, and a restart Spotlight indexes my External drive again. It's annoying cause when I search for files I get 2 of everything. How the heck do I stop spotlight from searching my external?

    Hope that made sense it was a bit of a ramble :)
     
  2. hanschien macrumors 6502

    hanschien

    Joined:
    Oct 2, 2006
    Location:
    Houston, TX
    #2
    Add a blank file called ".metadata_never_index" to the root of the drive you don't want Spotlight to index.
     
  3. todd2000 thread starter macrumors 68000

    Joined:
    Nov 14, 2005
    Location:
    Danville, VA
    #3
    Alright, just tried it, now to run a backup and see what happens after a restart
     
  4. Anonymous Freak macrumors 601

    Anonymous Freak

    Joined:
    Dec 12, 2002
    Location:
    Cascadia
    #4
    The problem resides in the fact that he has CCC erase (aka format) the external drive every time, so Spotlight sees it as a 'new' drive each time. (Spotlight stores its 'exclude' as the hidden file you mentioned on each drive, and this file gets erased along with everything else on the external drive each backup.)

    The only way to guarantee that Spotlight never indexes it would be to put that file on your main hard drive, which would, of course, cause Spotlight to not index your main drive, either.
     
  5. todd2000 thread starter macrumors 68000

    Joined:
    Nov 14, 2005
    Location:
    Danville, VA
    #5
    Actually the option in CCC is "Delete Directories Before Overiding" It doesn't format the drive. I just tried hanschien's solution, and it worked perfectly. Why it wouldn't work using the Privacy tab in the Spotlight Prefs is beyond me.
     
  6. Anonymous Freak macrumors 601

    Anonymous Freak

    Joined:
    Dec 12, 2002
    Location:
    Cascadia
    #6
    Sorry, I figured you were doing a true 'format and clone'. Yeah, if you're just deleting directories, then his method, as you have found, works fine.
     
  7. todd2000 thread starter macrumors 68000

    Joined:
    Nov 14, 2005
    Location:
    Danville, VA
    #7
    Yeah, but out of curiosity why didn't adding it the privacy section of the prefs work?
     
  8. ntbohl macrumors newbie

    Joined:
    Mar 22, 2009
    #8
    Hi there, i'm not terribly mac literate, could someone explain how to do this? I tried googling it three of the first 10 hits lead me here and the others didn't help :(
     
  9. Signal-11 macrumors 65816

    Signal-11

    Joined:
    Mar 23, 2008
    Location:
    2nd Star to the Right
    #9
    The cleanest way to do this is to use the touch command in terminal. For example, if I were creating this on a drive named "Hiro," I would type the following into a terminal window.

    Code:
    touch /Volumes/Hiro/.metadata_never_index
     
  10. ntbohl macrumors newbie

    Joined:
    Mar 22, 2009
    #10
    i typed that in and it's still doing it. I think i'm missing a step cuz i'm dumm.

    Right now I have terminal up and it says "Macintosh:~ username$"
    I typed it in right after that with and without a space between the $ and touch, but nothig works. I'm kind of savvy with a pc, but i've never been a command or terminal type of guy. is there some kind of pretext i should be typing in?
     
  11. Signal-11 macrumors 65816

    Signal-11

    Joined:
    Mar 23, 2008
    Location:
    2nd Star to the Right
    #11
    Hrm. It shouldn't take more than a split second. Did you get an error? If it didn't spit an error at you, it probably worked. You can confirm if the file is there by typing into terminal:

    Code:
    ls -a /Volumes/****/
    There is a space after the touch.

    Remember to substitute the name of your volume into where Hiro was in the first command line and where **** is.

    What is the name of the volume? Are there spaces?

    It will help to learn a few basic command lines so try it one more time. If you're having a hard time, post on this thread again and I'll give you a GUI alternative.
     
  12. ntbohl macrumors newbie

    Joined:
    Mar 22, 2009
    #12
    this is what I got:

    Last login: Sun Jun 21 22:10:14 on ttys000
    Macintosh:~ nickbohl$ Is -a /Volumes/Untitled/
    -bash: Is: command not found
    Macintosh:~ nickbohl$ touch /Volumes/Untitled/.metadata_never_index
    Macintosh:~ nickbohl$

    the volume is named "untitled". I didn't really care about naming the thing haha.

    btw, thank you for the help i really appreciate this.
     
  13. Signal-11 macrumors 65816

    Signal-11

    Joined:
    Mar 23, 2008
    Location:
    2nd Star to the Right
    #13
    No problem. We were all newbies once, right?

    Anyway, that's a lower case L, not a capital I in the "ls -a"

    Looks like the touch worked. Generally in Unix type CLIs, for simple commands such as this, if you don't get an error, it means things worked. If you want to be sure, you check. That's why you're doing the "ls". "ls" is your "dir" if you're familiar with that from DOS/Windows.
     
  14. ntbohl macrumors newbie

    Joined:
    Mar 22, 2009
    #14
    hmm seems like i have a bigger problem on my hands then, because i'm still stuck in preparing state. this attempt is just under the three hour mark. crap.
     
  15. ntbohl macrumors newbie

    Joined:
    Mar 22, 2009
    #15
    Macintosh:~ nickbohl$ ls -a /Volumes/Untitled/
    . Instructions
    .. Library
    .0017f22e4094 Optional Installs
    .DS_Store System
    .Spotlight-V100 Volumes
    .Trashes bin
    ._Instructions dev
    ._Optional Installs etc
    .com.apple.timemachine.supported mach_kernel
    .fseventsd private
    .metadata_never_index sbin
    .vol tmp
    Applications usr
    Backups.backupdb var
    Install Mac OS X.app
    Macintosh:~ nickbohl$

    that's what I got when i typed in the correct ls -a command. not sure what any of it means hahaha.
     
  16. Signal-11 macrumors 65816

    Signal-11

    Joined:
    Mar 23, 2008
    Location:
    2nd Star to the Right
    #16
    See that bolded item? You now have used the "touch" command to create a blank file and you have used "ls -a" to see if you were successful.

    Eject your drive and plug it back in. You should be done.
     
  17. ntbohl macrumors newbie

    Joined:
    Mar 22, 2009
    #17
    u=aweshum.

    thanks a lot. works perfectly. woo hoo!!
     

Share This Page