Shirt Pocket Discussions

Shirt Pocket Discussions (https://www.shirt-pocket.com/forums/index.php)
-   General (https://www.shirt-pocket.com/forums/forumdisplay.php?f=6)
-   -   Need help unmounting a single partition (https://www.shirt-pocket.com/forums/showthread.php?t=2037)

zink 01-22-2007 11:17 PM

Need help unmounting a single partition
 
Hello:

I'm a new user of SD!... purchased it last night, and already backed up my system (what more could you ask for out of an application like this!). As simple as it was to set up and perform scheduled backups, I have an issue that I know has been brought up in other threads, but I can't seem to find the answer to.

I have an external drive setup and broken down into 3 partitions. 2 of the partitions are used as backup destinations for my 2 internal drives (one drive is dedicated to one partition.) I've set up scheduled backups for these drives in SD!, and all is well... except one thing...scripting a single partition to unmount.

I've implemented the following script, which I snagged from a thread in this forum:

on beforeRunningCopy()
set targetDisk to "HD2Backup"
tell application "Finder"
if not (exists the disk targetDisk) then
try
do shell script "diskutil mount `disktool -l | grep '" & targetDisk & "' | sed 's/.*\\(disk[0-9s]*\\).*/\\1/'`"
end try

repeat while not (exists the disk targetDisk)
delay 1
end repeat
end if
end tell
end beforeRunningCopy

on afterRunningCopy()
set targetDisk to "HD2Backup"
tell application "Finder"
if (exists the disk targetDisk) then
eject targetDisk
delay 2
end if
end tell
end afterRunningCopy


The script works in mounting the targetDisk with no problems.
But, as you can see, the script tells the mounted backup drive (HD2Backup) to "eject". Unfortunately, this doesn't just unmount the single partition. Rather, all partitions within the external drive are unmounted.

I'd like to set up a script to unmount an individual partition. I am extremely inexperienced with AppleScript, so I'm looking to you for help in achieving this function. I appreciate your attention to this...

Kind Regards,
BJ

dnanian 01-22-2007 11:26 PM

SuperDuper! will do this automatically, BJ. Just unmount the volume(s) in Disk Utility. The scheduler will mount, copy and unmount for you.

zink 01-22-2007 11:35 PM

Quote:

Originally Posted by dnanian (Post 10506)
SuperDuper! will do this automatically, BJ. Just unmount the volume(s) in Disk Utility. The scheduler will mount, copy and unmount for you.

Okay.
Should I remove the script I added to the "Copy Job.applescript" files?

If I understand you correctly, all I need to do is setup the scheduled backups in SD!, unmount the partitions, and SD! will automatically mount, backup, and unmount the targeted partitions based on the which ones are effected in each scheduled backup?

If so, that's awesome!
Keep me posted...

Thanks for the quick response.
Regards,
BJ

zink 01-23-2007 12:31 AM

Ah, yes, I answered my own question. I set up a scheduled backup to run following the simple instructions you provided, and sure enough, everything worked like a charm.

Thanks again for your clarification, dnanian.
Regards.

dnanian 01-23-2007 10:09 AM

Glad I could help.


All times are GMT -4. The time now is 06:25 PM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, vBulletin Solutions, Inc.