Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the '10.5: Run a Time Machine backup then shut down' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.5: Run a Time Machine backup then shut down
Authored by: RecordingArts on Jun 27, '08 09:47:35AM

Is there a script that would simply unmount the time machine volume after backup is complete? If not, would you please consider writing one?

My parents are older, and I've got them to attach the time machine volume to their MacBook, but I think they usually unhook it without unmounting it first.

[ # ]
10.5: Run a Time Machine backup then shut down
Authored by: wallybear on Jun 27, '08 02:53:43PM
It's fairly simple: in the script, just replace the lines

	ignoring application responses
		tell application "loginwindow" to «event aevtshut»
	end ignoring
with this single line

	tell application "Finder" to eject disk "YourTimeMachineVolume"
(obviously replace YourTimeMachineVolume with the real name of your Time Machine disk)
Moreover, if you want the script not to launch the backup (because you prefer to launch it by TM menu) but only unmount the volume when Time Machine has finished, remove the following line from the script:

   do shell script "/System/Library/CoreServices/backupd.bundle/Contents/Resources/backupd-helper > /dev/null 2>&1  &"

[ # ]