PDA

View Full Version : Feature Suggestion: automount/unmount


polymathic
04-09-2005, 02:17 PM
Hi,

First, thanks for creating this great cloning app. It's very nice and easy and reliable.

Aside from greater scheduling features (including wake from sleep) that I hope to see in 2.0, I was hoping for an automount/unmount feature. Many of us use partitioned firewire external drives as part of our backup strategy, and to avoid unnecessary access to the firewire drive, and to further protect my clones, using Disk Utility I unmount my partition after the clone is done, then I remount it (with Disk Utility) before updating my clone.

Couldn't SD2 automatically mount a selected partition, do a smartupdate, then unmount it? This in conjunction with a more advanced scheduling feature with wake from sleep would make SD absolutely ideal for me.

Thanks!

dnanian
04-09-2005, 05:30 PM
Thanks for the suggestions, polymathic. I can't guarantee that wake from sleep is going to be in v2.0, actually: it's possible, but not guaranteed. (You can, of course, use Energy Saver's own feature to achieve this, should it be critical to you.)

Mounting/unmounting is something that we've looked at. We automatically mount disk images, but don't yet unmount; the Alias Manager -- which we use to achieve this -- seems to have bugs in it and it doesn't mount local drives. But, setting the drive to spin down should achieve what you want in terms of 'wear and tear': why actually unmount it?

polymathic
04-09-2005, 09:54 PM
Why actually unmount it?

An unmounted drive won't be accessed or tinkered with accidentally, adding more security. But my main reason is, when these drives are mounted, sometimes simply using the Finder, or opening Disk Utility, kicks the firewire HD into a new spin. Once unmounted, however, I don't hear from the drive again -- which means there is less wear and tear (and less noise). So, in my dream setting, my clone would only mount for smartupdates, then unmount.

dnanian
04-09-2005, 09:57 PM
Understood. I haven't found this to be a problem here, but I understand the concern.

We'll see what we can do as things progress. Thanks for the suggestions & support!

kbradnam
04-11-2005, 01:47 PM
Hi,

The lack of mounting/unmounting external drives was a bit of an issue for me too. I fixed this by amending the backup applescripts to automatically mount the backup drive if it was not mount and then unmount it when finished.

To do this I prepend the following to the start of my daily bakck up script (assumes your backup disk is called 'local backup'):

----------------------------------------------------
property diskname : "local backup"

tell application "Finder"
if not (exists the disk diskname) then
do shell script "diskutil mount `disktool -l | grep 'local backup' | sed 's/.*\\(disk[0-9s]*\\).*/\\1/'`"
delay 1
end if
end tell

delay 2
----------------------------------------------------

Then I add the following at the end of the script.

----------------------------------------------------
tell application "Finder"
if (exists the disk "local backup") then
eject "local backup"
delay 2
end if
delay 2
----------------------------------------------------


Hope this helps.

Keith

sjk
04-12-2005, 02:46 AM
Also see this post (http://www.shirt-pocket.com/forums/showthread.php?p=1031&highlight=diskutil#post1031) for a simplified example of using diskutil instead of disktool to get the device node for a volume.

For reasons like polymathic described, I cast my vote in favor of adding an option to automatically detach/eject volumes after a success cloning. Hopefully that qualifies within the KISS philosophy for adding SD! features. :)

macfeller
04-12-2005, 12:41 PM
I wrote a standalone script to unmount my backup because I just feel better knowing it's gone. Said volume is a partition on a two partioned external forewire drive. I don't do automatic/scheduled backups. I do backup daily, at least, but am on a PowerBook and often don't have the drive mounted at all. And then when it is I'd rather not have the BU partion mounted.

So, for me, under Options>Upon completion, merely having to tick Unmount ______ Volume would suffice.

I gotta get a handle on this scripting thang! Tiny standalone stuff in Script Editor works fine.

NickSloan
02-06-2006, 07:58 AM
[QUOTE=kbradnam]

To do this I prepend the following to the start of my daily bakck up script (assumes your backup disk is called 'local backup'):

----------------------------------------------------
property diskname : "local backup"

tell application "Finder"
if not (exists the disk diskname) then
do shell script "diskutil mount `disktool -l | grep 'local backup' | sed 's/.*\\(disk[0-9s]*\\).*/\\1/'`"
delay 1
end if
end tell

delay 2
----------------------------------------------------

Then I add the following at the end of the script.

----------------------------------------------------
tell application "Finder"
if (exists the disk "local backup") then
eject "local backup"
delay 2
end if
delay 2
----------------------------------------------------
[/QUOTE=kbradnam]

I had a couple of problems with these script additions. In the first place, I think there is a missing "end tell" in the second one, no?

More confusingly however, the first one would not compile for me, complaining about beginning with "property": 'Expected "end" but found "property".' If I take out the first line (property diskname : "local backup") and just replace both "diskname" and "local backup" with the name of the actual disk I want to mount/unmount, it seems to work fine. What am I missing here?

Syzygies
02-08-2006, 10:20 AM
I posted this a couple of weeks ago: A strategy for managing SD! jobs via AppleScript (http://www.shirt-pocket.com/forums/showthread.php?t=985)

There's a tension in any similar question to this: It is very appealing to say "use this line", so most posts on any forum are of such a form, but then one ends up with a solution that for various reasons works only 90% of the time. A 50 line solution such as my post stands a far better chance of working all of the time, with all the gotchas ironed out, but such solutions generally scare most people off.

There are several reasons to want to unmount backup volumes. The delays in spinning them back up for every "open" or "save" command from an application are very annoying. Sure, this is terrible OS code, the OS should cache enough information about spun down drives to implement "lazy" access, only spinning them up if the user explicitly visits one. But, hey, the OS isn't written that way.

Another reason is security: An unmounted drive can't get hosed as easily.

http://www.math.columbia.edu/~bayer/sig/DaveSD283.gif

dnanian
02-08-2006, 10:51 AM
Ah, don't be discouraged (I see that you edited the post to remove that part, but still) -- people tend to not search... and I didn't respond to point to it because, frankly, I thought you would! :)

Julia Truchsess
04-01-2006, 01:42 PM
I also keep my backup drive unmounted for noise and integrity reasons. I don't want an Applescript solution, I have enough gizmos and processes running on this machine, the fewer the better. If DiskUtility can mount and unmount volumes at will then SD should be able to, too.

dnanian
04-01-2006, 03:56 PM
Thanks for the suggestion, Julia.

bethri
04-17-2006, 09:12 AM
I'll add my vote to the mount/unmount request. I'm trying to use some funky shell scripting at the moment, and would prefer not to have to.

Ben

Bagelturf
04-17-2006, 11:47 PM
With a firewire disk attached all the time mount before back up and unmount after is a huge help. I run a scheduled smart backup early in the morning so that by the time I need the computer it is done. But to do that I have to leave the FW drive on and mounted. Leaving it on is fine, but I don't want to have it mounted all the time:

1) Drive spin ups on dialogs
2) Can get written on
3) Might confuse anyone who is using the machine (icon is the same as the original)
4) Don't want to accidently run any apps on it or save anything to it

macmeister
11-02-2006, 11:01 AM
I'm cloning my main drive to a local drive daily because it's simply very fast. Strange how network volumes are easier to mount than a local. Please add a local drive mounting feature, or let me know how this can be done.

I even setup shell scripts to mount and unmount before and after, but that won't work because SuperDuper won't run them if the volume is unavailable.

For anyone interested, these are the shell scripts to mount and unmount respectively (.sh may be necessary for naming, but not sure):

disktool -l | egrep -i "Mountpoint = '', fsType = 'hfs', volName = '.*Backup_G5_160" | cut -d\' -f2 | xargs -n1 disktool -m

disktool -l | egrep -i "Mountpoint = '/Volumes/.*Backup_G5_160" | cut -d\' -f2 | xargs -n1 disktool -p


Suggestions?

BTW: The unmount script works when completed if it's already mounted.
Solution: Can the SuperDuper man allow the shell script to run before the backup process looks for the volume? That's it. Better yet, in the future, simply have SuperDuper fire off these scripts behind the scenes! ;)

dnanian
11-02-2006, 11:12 AM
Scheduled copies will do this automatically, macmeister...

macmeister
11-09-2006, 12:05 PM
Scheduled copies will do this automatically, macmeister...

I assumed this was the case, but came up with an interim solution, since the volume is unavailable with a highlighted red error every time SuperDuper 2.1.3 tries to start the backup.

Remote volumes work great! Local volumes do not in my case. Am I doing something wrong? Since SuperDuper doesn't appear to handle this yet, I've had to setup yet another CRON item to simply:

open file:///Scripts/sh_mountpart.command

And in that file, is:
disktool -l | egrep -i "Mountpoint = '', fsType = 'hfs', volName = '.*Backup_G5_160" | cut -d\' -f2 | xargs -n1 disktool -m

I just have this scheduled with Cronnix 10 minutes before the SuperDuper schedule...

dnanian
11-09-2006, 12:09 PM
No, it should work just fine with local volumes, actually -- are these "old" scheduled copies?

macmeister
11-09-2006, 01:27 PM
Thanks dnanian. I was inspired by your recent message: restarted, deleted the old schedules, re-applied them and it appears to be working now.

dnanian
11-09-2006, 03:21 PM
Great. The changes for mounting were done in the "schedule driver", so you did have to recreate the scheduled copies. Glad it worked.

matthewsbrody
11-26-2006, 10:23 AM
Dave,

I went to the FAQs looking for help on automatically mounting and unmounting and found this thread. I went ahead and added this post just for the sake of registering an additional user interested in this feature. I have a macbook with an apple cinema display and connect my two FW drives -- one dedicated for back-ups with SD via the FW ports on the display. When I unhook the Macbook for portable use -- even around the house -- I always have to unmount the FW drives. Since I use one of them soley for SD backup purposes ... its always an extra stop everytime I want to undock my MB to have to unmount the backup FW drive. Which is why I also very much would like SD to auto mount and unmount this drive. Anyhow, just wanted to register this need to help you gauge user interest.

Regards,

Matt

dnanian
11-26-2006, 12:02 PM
It already does this, Matt, for scheduled backups. If when we start the drive is unmounted, we'll unmount it when we're done.

matthewsbrody
11-26-2006, 01:39 PM
Thanks Dave as always for your prompt response. I've always kept these drives mounted with the thought that they needed to me for the SD back-up to work. Which is why ... in retrospect ... SD isn't unmounting them. Anyhow, thanks for that clarification. Very helpful. I continue to use SD with great success. Thanks again! :)

eriolarda
12-18-2006, 05:21 PM
I would like to add my vote to those in favour of the automount / auto-unmount feature. To me, this would make SD quite perfect!

I use it to back up to a partitioned local FW drive as well as to a network drive. Both the sync destination partition and the actual drive - local or networked - holding that partition should be automatically mounted / unmounted before / after backups. Even regardless of whether they were mounted before or not!

I use a lot of internal and external drives, so another reason for that feature would be not to click upon a volume that's (unnecessarily) present in the leftmost Finder window column!

Thanks for developing SuperDuper, it's a great piece of SW!

In case anyone is interested, I wrote a few scripts that handle the situation for the time being. Just email or pm me.

jreffner
12-28-2006, 10:09 AM
Please allow me to add my vote for automatic mounting and unmounting of local drives as well.

My wife's iMac is in her office and everything is cloned to an external FireWire drive. I've come in and found the name of the drive changed because of co workers not realizing that they highlighted the drive's name and then started typing. Yeah, I know, what are the odds? It has happened none the less. If the drive would have been unmounted then this couldn't have happened. Plus if the iMac crashes with the clone mounted then there is the chance of data loss. If SD! could mount and unmount then I wouldn't have to worry about this. Finally, I use Timbuktu Pro to work on her iMac from home so I need access to the external drive when I want to work with it. Turning it off isn't an option since I'm doing this remotely. SD! mounting/unmounting would really solve my problems. Please consider it!

Thank you!