Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

todd2000

macrumors 68000
Original poster
Nov 14, 2005
1,631
31
Danville, VA
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 :)
 
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 :)

Add a blank file called ".metadata_never_index" to the root of the drive you don't want Spotlight to index.
 
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.
 
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.

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.
 
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.

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.
 
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.

Yeah, but out of curiosity why didn't adding it the privacy section of the prefs work?
 
Add a blank file called ".metadata_never_index" to the root of the drive you don't want Spotlight to index.

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 :(
 
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 :(

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
 
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

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?
 
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?

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.
 
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.

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.
 
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.

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.
 
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.
 
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.
 
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.

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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.