I am using Time Machine with a Western Digital MyBook World, and had the hardest time getting it to make backups (even incremental ones of only a few megabytes) with reasonable speed. Apart from having to turn off any virus scanner, Spotlight tried to index the backup drive, which made it unbearably slow. I was not able to add the backup mount to the Privacy tab in the Spotlight System Preferences panel -- neither with the preferences pane, nor with any mdutil commands.
So I had to turn it off whenever I was doing the backup with this command:
launchctl unload /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
After the backup had finished, I then reloaded the daemon. If you want to use Spotlight and scheduled backups, this is not really practical. So I found a blunt force method that works to me.
First, a daemon runs a script every minute to check if a process with backupd (the Spotlight process) in its name is running. If it is, it stops the Spotlight process, then turns it back on when it no longer finds the backupd process. Here's the script:
#!/bin/sh
pn=`ps -e | grep backupd | wc -l`
flagfile="/full/path/to/some/flagfile"
if [ $pn -gt 1 ] ; then
if [ ! -f $flagfile ] ; then
launchctl unload /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
date > $flagfile
fi
fi
if [ $pn -eq 1 ] ; then
if [ -f $flagfile ] ; then
launchctl load /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
rm -f $flagfile
fi
fi<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/
PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.acme.disablespotlightonbackup</string>
<key>OnDemand</key>
<true/>
<key>ProgramArguments</key>
<array>
<string>/full/path/to/shell/script/created/above</string>
</array>
<key>StartCalendarInterval</key>
<dict>
<key>Munute</key>
<integer>1</integer>
</dict>
</dict>
</plist>Mac OS X Hints
http://hints.macworld.com/article.php?story=2008102417143197