Mac – How to force Spotlight to stop corrupting the external hard drive and destroying the time machine backups

backupexternal-diskspotlighttime-machine

I am at my wits end with this horrible technology.

I've been through this cycle over and and over again.

I explicitly tell spotlight not to index my external hard drive.

It ignores my wishes and indexes it anyway.

I am unable to eject my hard drive because the OS thinks that some program is still using it.

Spotlight leaves a gazillion file open and never closes them.
Eventually the file system gets completely corrupted and time machine backups stop working altogether.

Not wanting to lose my backup history, I copy my backups to a separate external hard drive.

I then completely reformat the external hard drive that I use for backups and copy my backup files back to it.

Time machine is able to start making backups again. Hooray.

But wait. I cannot eject my disk again.

enter image description here

Why?
Because Spotlight is indexing the damn external drive AGAIN.

enter image description here

Even though I have explicitly added the external drive to the DO NOT INDEX list.

enter image description here

This is so incredibly frustrating.

When Steve Jobs was alive, Apple used to actually CARE about the user experience.

Does anyone know how to safely neuter Spotlight so that it will stop corrupting my backup drive?

Best Answer

Spotlight is mandatory for Time Machine volumes. You cannot fully disable it other than disabling Spotlight completely.

If you add a Time Machine backup disk to the privacy list, you will continue to see messages that Spotlight is indexing your backup disk. This indexing is necessary for Time Machine to function properly and can’t be disabled. Spotlight does exclude from searches any items you store on your backup disk that are not part of a Time Machine backup.

As for disabling Spotlight/ejecting your drive safely, there are various solutions here, where the necessary command appears to be

sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist