I have a MacBook Pro which I regularly dock to an external monitor.

I have my mouse, keyboard, and iPhone dock, and an external hard drive connected via a USB hub so that I only have to make one USB connection when docking.

The external hard drive is used for Time Machine backups. Every time I undock, I simply unplug the single USB cable. Unfortunately this causes a warning message that says that I should remember to eject the external hard drive before unplugging it.

What I would like to know is if there is a way that I could have it automatically eject the external hard drive each time after Time Machine runs.

I usually undock and redock at least once a day so the next time it is docked, the drive will be re-mounted and then Time Machine could run while the system is docked.

  • Seems like this defeats the purpose of Time Machine since it is meant to backup at regular intervals so long as the drive is mounted. – fideli Jul 15 '10 at 17:33
  • Yes, but it usually gets docked once a day so it is still able to backup periodically. I'm not sure what the default interval is but it seems to back up once a day or so. – Avalanchis Jul 15 '10 at 17:45
  • Once an hour. It might remove hourly backups from the backup disk to preserve disk space, though. – Daniel Beck Jan 23 '11 at 18:06

I found a free and useful downlaod that does this:

Time Machine Scheduler

It mounts and unmounts the drive automatically on schedule (and when you boot up, if you ask it to). Also allows a custom schedule other than every hour. It installs a new pref panel to control this. Only downside is that the old TM pref panel does not display everything exactly right anymore -- timestamps are off by a few minutes, it says Time machine is Off even when backups are happening -- but it completely solves the pesky improper ejection issue.


I have the exact same setup as you, and had the same problem. I would suggest trying SuperDuper, a backup system for Mac's. The paid version includes scheduling, scripting, backup on connect, eject after copy, and more. It also has the ability to work alongside Time Machine, and can create bootable backups.


You could do a backup using the terminal and eject using the terminal. Then put the commands into a script.

  • I would upvote this answer if you repeated the details in your answer. It's fine to link to other sources, but other sources have a habit of going away... – Dannid Aug 8 '17 at 16:22

Assuming you are doing this unplug while the Mac is asleep, you could use Sleepwatcher from this page, combined with the command:

diskutil eject <disk name>

which can run when the machine goes to sleep. Thus, whenever you sleep your Mac, you will eject the drive.

On the other hand, if you've been unplugging this drive while the machine is awake...is ejecting it really so hard?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.