|
#1
|
|||
|
|||
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 |
#2
|
||||
|
||||
Also see this post 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. |
#3
|
|||
|
|||
I, too, would like this, or similar feature.
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. |
#4
|
|||
|
|||
[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? |
#5
|
|||
|
|||
I posted this a couple of weeks ago: A strategy for managing SD! jobs via AppleScript
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. Last edited by Syzygies; 02-08-2006 at 10:16 AM. |
#6
|
||||
|
||||
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!
__________________
--Dave Nanian |
Currently Active Users Viewing This Thread: 2 (0 members and 2 guests) | |
Thread Tools | |
Display Modes | Rate This Thread |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Feature request future version | Iatchi | General | 5 | 12-25-2004 09:40 PM |