Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
    
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
add comment

4 Answers

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.

share|improve this answer
add comment

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

share|improve this answer
add comment

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.

share|improve this answer
add comment

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?

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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