Why can't I eject the destination volume after the backup task has completed?

Printer-Friendly Version

The disk Backup wasn't ejected because one or more programs may be using it.

Occasionally this annoying message comes up when you're trying to eject your destination volume. If CCC is currently using that volume as a source or destination, then CCC will effectively prevent it from being unmounted gracefully. If your backup task isn't running, though, CCC isn't preventing the volume from being unmounted. But what application is?

If this occurs within a minute or so after the backup task completes, it's probably caused by macOS's "kextcache" utility — that utility rebuilds a cache file on the destination that is required for startup. That usually finishes after a minute or two, and usually the destination can be ejected after that. If this turns out to be the case, you can ask CCC to unmount the destination after the backup task completes. CCC will wait for kextcache to finish, resulting in a more reliable (and automated!) ejection of the destination at the end of the backup task:

  1. Open CCC and select your backup task
  2. Click the Use Advanced Settings button at the bottom of the window
  3. Choose the option to unmount the destination volume after the backup task completes
  4. Save and run your backup task

If the disk cannot be unmounted several minutes after the backup task has completed, or if CCC is also unable to eject the destination, use the Console application to track down the culprit.

  1. Open the Console application (in /Applications/Utilities)
  2. Click on system.log in the sidebar
  3. Go to the Edit Menu > Find > Find... (or press Command+F) to search for messages from the UnmountAssistantAgent application. Avoid using the Search field in the toolbar for this search, because that will hide important context.

Use the Console application to search for the culprit

In the example above, we can see that an application named mds_stores is preventing the Backup volume from being ejected. mds_stores and mdworker are Spotlight helper applications, so the issue here is that Spotlight is preventing the destination from being ejected. We have received numerous reports showing the same culprit since El Capitan was introduced. To resolve the conflict caused by Spotlight, you can disable Spotlight on the destination volume:

  1. Open the Spotlight preference pane
  2. Click on the Privacy tab
  3. Drag the backup volume into the Privacy table

Disabling Spotlight in this manner only affects the destination volume, and it's reversible — you can remove your destination volume from that list should you decide that you want to re-enable indexing.

Remove any duplicate keychain entries in the Keychain Access application

Sometimes references to the keychain files on your backup volume can show up in the Keychain Access application. As a result, any application that leverages Keychain Services (e.g. Safari) will maintain a open file handle on the keychains on your backup disk, thus preventing that disk from unmounting. To resolve this, open the Keychain Access application (in /Applications/Utilities) and look for any duplicate keychain references in the sidebar. If you see duplicates, hover your mouse over those item until a tooltip appears revealing the path to the keychain file. If the keychain file is located on your backup disk, click on the keychain, then press the Delete key. When prompted, remove the references to the keychain file, not the file.