PDA

View Full Version : What is UnmountAssistant?


ctucker10
08-29-2010, 11:46 AM
I have a backup regimen that uses Time Machine for versioned backups, SuperDuper for a weekly bootable duplicate of my entire hard drive, and Carbonite for offsite storage of my most important stuff. This is setup for my Mac mini (Mid 2010).

The Time Machine and SuperDuper backups reside on a 1TB external hard drive that has 3 partitions: one for Time Machine hourly backups, one for SuperDuper weekly backups, and another, very small, partition that has a duplicate of my Mac OS X Install DVD (which is needed if I want to restore from Time Machine). The external hard drive is connected to the Mac via USB.

I wanted this backup regimen to be as automated as possible. With Time Machine and Carbonite the automation is a no-brainer. The automation with SuperDuper is also pretty simple by using the built-in scheduler. My problem was that I didn’t want to have the SuperDuper partition normally mounted. (I don’t normally keep the Mac OS X Install DVD partition mounted either). What I needed was a way to mount the SuperDuper partition before the SuperDuper schedule activated its weekly backup.

I found an applescript that mounts a volume on Dae’s blog...

http://dae.cyberic.eu/blog/applescript-to-mount-unmount-a-drive/

...that I modified slightly to fit my needs. (I inserted my volume’s name into the myVolumeLabel variable, and commented out the “else” branch that unmounts a drive.) After compiling the modified script and making sure that it worked the way I wanted, I saved it as an application to my...

/etc/periodic/weekly

...folder. Next, I inspected the...

/System/Library/LaunchDaemons/com.apple.periodic-weekly.plist

...file with BBEdit to see when weekly scripts are normally run by the operating system. I used that time, plus 5 minutes, as the scheduled time for my weekly SuperDuper backup.

I have run this setup now for a couple of weeks and it works great but, there is one part of the setup that has taken on a life of its own: after the SuperDuper backup completes the volume is automatically unmounted by something that is apparently part of the operating system (since I commented out the part of the script that unmounts the drive).

I looked in the SupeDuper log and noted the time that my most recent backup completed. Next, using Console.app, under Diagnostic and Usage Information => Diagnostic and Usage Messages, I searched for the word “unmount” and found an entry for UnmountAssistant with a timestamp about 10 seconds after the SuperDuper backup completed. I found the same thing last week when I first tried out this setup.

I consider this “unintended unmounting” of a volume a good thing but, I’m still curious. What is UnmountAssistant and what invokes it after my weekly SuperDuper backup completes? Any thoughts?

dnanian
08-29-2010, 01:03 PM
The SuperDuper! scheduler automatically mounts, copies and unmounts. Nothing special need be done - it's all automatic.