|
#1
|
|||
|
|||
Mounting an external volume before backup
I'm using SD 2.0.1. I keep an external drive attached, but unmounted. I wrote a small Applescript to mount the backup volume and I set the advanced options to run that script before beginning the backup. However, SD doesn't see the backup volume at launch so it never starts the backup, thus is never mounts the volume, so it can't start the backup, etc.
How do I get out of this circle? Chris |
#2
|
||||
|
||||
If you're doing this scheduled, Control-click the settings package in the Scheduled Copies folder (in Library/Application Support/SuperDuper!). Then edit the Copy Job.applescript you find in there. Add your commands to mount/unmount to the documented areas at the top of the script.
Save the script file, then go into SD! Uncheck and re-check the schedule checkbox (Edit the schedule). That'll re-compile the script for you, and you should be all set.
__________________
--Dave Nanian |
#3
|
|||
|
|||
Thanks Dave,
I thought there was an applescript interface somewhere, yet I am embarrassed to say I couldn't find it. Chris |
#4
|
||||
|
||||
No problem, Chris. We're trying to decide if it makes sense to put in a button (or something) to expose the script for advanced users... but in the meantime going in the package will work, and should make you feel even more advanced!
__________________
--Dave Nanian |
#5
|
|||
|
|||
Sample code?
Quote:
I have only seen code that makes Unix calls, referencing partitions using "disk0s10" and such. These descriptors aren't stable from boot to boot. They could work for years for one person, but fail on the first reboot for someone else. (This also comes up in moving swapfiles.) Thanks, Dave |
#6
|
||||
|
||||
The first solution in this thread users the drive name, not the device ID, and should work just fine.
__________________
--Dave Nanian |
#7
|
|||
|
|||
Dave: for example, using this code as suggested:
Code:
property diskname : "G5Backup" tell application "Finder" if not (exists the disk diskname) then do shell script "diskutil mount `disktool -l | grep 'G5Backup' | sed 's/.*\\(disk[0-9s]*\\).*/\\1/'`" delay 1 end if end tell delay 2 Ben |
#8
|
||||
|
||||
Sure: that's because you need to put it *inside* the "on before" or "on after" handler, as appropriate, not at the top level (outside any on block).
__________________
--Dave Nanian |
#9
|
|||
|
|||
That's what I figured (and tried) but:
Code:
on beforeRunningCopy() -- Put your own code here that should execute just before running the copy. -- Inserted to mount clone (G5Backup) before copying Property diskname : "G5Backup" tell application "Finder" if not (exists the disk diskname) then do shell script "diskutil mount `disktool -l | grep 'G5Backup' | sed 's/.*\\(disk[0-9s]*\\).*/\\1/'`" delay 1 end if end tell delay 2 -- End of insertion end beforeRunningCopy |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
An (Applescript) hack to automate mounting and unmounting external volumes | kbradnam | General | 12 | 07-30-2007 07:12 AM |
Cannot copy from external backup to HD | Tricia | General | 0 | 10-13-2005 09:38 AM |
(Zero-length) File caused SuperDuper to abort backup | alancfrancis | General | 7 | 08-31-2005 10:42 AM |
automatic initiation of backup when I plugin/mount my external Firefox drive? | mykmelez | General | 3 | 07-11-2005 03:00 PM |
spotlight finds files on backup but not on source volume | snoopy67 | General | 1 | 07-05-2005 08:29 AM |