Time Machine running slow after OS X 10.7.5 update
Disabling and re-enabling Spotlight indexing of the drive may help.
After installing the latest OS X 10.7.5 update for Lion, a number of users are finding their Time Machine backups are taking forever to complete. In some cases the backups only run at a few kilobytes per hour, with text claiming that the backups will take between days to weeks to complete. People report this issue occurring with a variety of Mac models and backup setups, including backing up to local drives and to Apple's Time Capsule devices.
In addition to Time Machine running slowly, those experiencing this problem have noticed Spotlight also takes forever to update its index of the hard drive.
A few people have tried reverting to OS X 10.7.4 by restoring a backup of their system, and noticed Time Machine and Spotlight immediately started working at expected speeds, suggesting the issue is with the OS X 10.7.5 update.
In addition, others who have played around with the problem have noticed the slow activity with both services appears to be primarily when Spotlight indexing is active, suggesting the problem is specific to that service instead of to Time Machine.
And in fact, users have found that at least for now you can get Time Machine backups to work by disabling Spotlight indexing of the drive, so if you are having troubles with Time Machine being slow then you might try one of the following approaches:
- Remove the Spotlight index
This issue may simply be a fault with the existing Spotlight index on the hard drive, so you might first try removing it to see if upon rebuilding the index the system will respond faster when both indexing and backing up. To do this, open the Terminal utility (in the /Applications/Utilities/ folder) and run the following command (provide your password when prompted):
sudo rm -rf /.Spotlight-V100
NOTE: copy and paste this command to make sure its structure is intact. There should be absolutely no spaces after the slash in this command.
- Spotlight privacy lists
Another approach to removing the Spotlight index is to make use of the Spotlight privacy list, which will prevent a specific drive or folder from being indexed and included in search results. Open the Spotlight system preferences and click the Privacy tab, then drag your hard drive and any other local hard drives to the list. When finished, have Time Machine back up to see if it runs faster, and then remove the drives from this list to see if the Time Machine performance remains high.
- Disable indexing on a per-drive basis
You can also disable Spotlight indexing to prevent the service from running, and do so on a per-drive basis. To do this, open the Terminal and type "sudo mdutil -i off" followed by a single space. Then drag your hard drive to the Terminal window and press enter to execute the command. After this is done, repeat this process for other drives on your system.
In addition to using this method to turn off indexing, you can run the same command to delete the spotlight indexes on the specified hard drive by including the "-E" flag in the command, similar to the following (the first will delete the index, the second will additionally disable further indexing):
sudo mdutil -E off /Volumes/drivename
sudo mdutil -E -i off /Volumes/drivename
To re-enable indexing using these commands, repeat them but change the word "off" to "on."
- Unload the Spotlight daemon
A last option is to manually unload the background services (daemons) that are responsible for maintaining the Spotlight index. This approach may be better than the first two in that it will keep the current Spotlight index intact and allow you to search, but only prevent updating of the service. To disable Spotlight indexing, open the Terminal utility and run the following command:
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
To re-enable Spotlight indexing, you can repeat the above command and change the word "unload" to "load," as in the following:
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist