PDA

View Full Version : Automount and unmount


raf
04-20-2007, 01:33 PM
Sorry if this has been covered ...

SuperDuper is working great for me and is faithfully backing up each evening. Now I would like to tweak my setup so SD can automatically mount and unmount the required volumes.

Here are the 2 scenaria that I would like to address:

1- scheduled backup to an external disk connected via firewire. This is a smart clone of the entire partition.
2- scheduled backup to a network disk. This is a smart clone to a disk image located on the network volume.

Part of the issue I suspect will have to do with permissions. SD requires the disk to be mounted in order to set up the scheduled backup. Should I mount the required volume as an admin user? Will it matter who is logged on when SD runs? Does SD run as an admin user?

Thanks,
Martin

dnanian
04-20-2007, 01:46 PM
SD! already does automount/unmount external disks.

Network disks are also mounted, and the image is mounted and unmounted, but the network disk is not unmounted...

raf
04-20-2007, 01:53 PM
SD! already does automount/unmount external disks.

Network disks are also mounted, and the image is mounted and unmounted, but the network disk is not unmounted...
Thanks.

So this means that I need to use an "after" script to unmount the network disk?

On the permissions question, what user does SD run under?

dnanian
04-20-2007, 01:59 PM
You can use an after script, but you have to delay the "after" by throwing the task into the background and waiting 30 seconds or so (since the image is still open when the after script runs).

SD!'s UI runs as the user, and the copy process runs as "root".

raf
04-20-2007, 02:09 PM
You can use an after script, but you have to delay the "after" by throwing the task into the background and waiting 30 seconds or so (since the image is still open when the after script runs).

SD!'s UI runs as the user, and the copy process runs as "root".

Do you mean the following:
- the script should spawn a process and immediately exit
- the spawned process should wait 30 sec before attempting to unmount the network drive

Also, how should I set up the scheduled copy in terms of mounting the volume manually? What I mean is: if I authenticate the mounting of the drive with an admin user (perhaps not the same as the currently logged on user) will SD remember this authentication and use it when running the scheduled backup?

Thanks again for the very speedy response!

Martin

dnanian
04-20-2007, 02:54 PM
I mean the script should spawn a process and immediately exit: that process should sleep 30 seconds or so and then eject.- I believe I've posted examples of this elsewhere on the forum.

You'll need to add the authentication to the keychain, and that should be remembered (I'm assuming that the alias manager, which handles this, will know what to do -- we don't "remember" it ourselves, it does.)

afragen
05-09-2007, 06:51 PM
In this thread (http://www.shirt-pocket.com/forums/showthread.php?t=2378), I wrote about a script I did to unmount network AFP drives. It does this when the script notices a router change but it can be adapted to run as Dave describes.

afragen
05-10-2007, 08:44 PM
See this thread. (http://www.shirt-pocket.com/forums/showthread.php?p=12047#poststop) In it I wrote a script that will do exactly this.