PDA

View Full Version : How to make SD wait till I've powered up ext drive?


davec
07-12-2006, 04:51 PM
Hi there,

Happily using SD for mirroring my system drive to an external USB2 HD every day.

Problem is, to save wear and tear I power down the External HD when not in use.

This then means that when SD powers up for a scheduled backup and finds the drive isn't mounted or that it can't mount it, it gives up and reports an error.

So... What I REALLY want it to do is to start the scheduled backup by popping up a dialog asking me to mount the missing drive AND STAY THERE, until I either tell it 'no thanks, don't do a backup' or I mount the drive then say 'OK go ahead now'.

I get the feeling I could write a 'shell script' to do this, but it's a bit out of my league, so can anyone help?

Thanks

Dave

N.B. if you run the backup manually it does EXACTLY this - waits till you mount the drive or say cancel. That's what I want - it prompts me to make the backup and hangs around till I tell it not to.

DRC

dnanian
07-12-2006, 04:53 PM
Sorry, Dave, we can't do that right now: scheduled backups are designed to work unattended, and thus we don't want to block other scheduled items with a sheet.

Instead, have you considered simply ejecting, but not powering off, the drive? It'll then spin down, which will save wear and tear, and we'll automatically mount and unmount it when we're done.

livemixer
07-18-2006, 01:33 PM
How about this as a workaround?

1) Write an AppleScript that first checks for the presence of the desired external drive. If not, have it pop up a display dialog with the appropriate reminder text & cancel & OK buttons. Then have the script run SuperDuper with the desired settings document.

2) Schedule this AppleScript with iCal. Set the iCal event to repeat on the desired backup schedule.

It would take a little work but would be easily customizable ....

dnanian
07-18-2006, 01:49 PM
Indeed, you could do that -- I didn't want to suggest anything that might involve coding... :)

sjk
07-20-2006, 04:40 PM
I use diskutil to mount/unmount backup volumes and eject FW devices they're on. Here's a one-line shell script to mount /Volume/Backup:

diskutil mount `diskutil list | awk '/ Backup / {print $6}'`(diskutil list will spin up the drive if it's ejected)

And a one-liner to unmount /Volume/Backup and eject the device (if it's not busy):

diskutil eject `diskutil list | awk '/ Backup / {print $6}'`