automator script to eject time machine disk

In OS X, once a disk has been used by Time Machine, it doesn’t release it.

On my desktop, I see the disk, but can’t eject it (I get a disk is in use message)…

On my boss’s laptop, you don’t even see the disk.

But if you turn Time Machine off, the disk reappears!

So I used Automator to create a little script to disable Time Machine, unmount the Time Machine backup disk, and then re-enable time machine.

In searching, I found a command line to enable/disable time machine, because automating the actual GUI stuff wasn’t working for me.


1. Open Automator and choose a Custom workflow
2. In Actions, select Library -> Utilities and “Run Shell Script”
3. Change “cat” to “defaults write /Library/Preferences/ AutoBackup -bool false”
4. In Actions, select Library and “Get Specified Finder Items”
5. Select “Add” and select your Time Machine disk
6. In Actions, select Library and “Eject Disk”
7. Click on the “Run Shell Script” you’ve already made, and copy it, then paste it to the end of workflow
8. Change the 2nd “Run Shell Script” to be true instead of false
9. Save your Workflow in case you need to make other changes
10. Save the workflow as a application (FIle, Save As, choose “application” instead of workflow)

Try it out with the “Run” function (upper right corner)!