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 |
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. |
Thanks Dave,
I thought there was an applescript interface somewhere, yet I am embarrassed to say I couldn't find it. Chris |
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! ;)
|
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 |
The first solution in this thread users the drive name, not the device ID, and should work just fine.
|
Dave: for example, using this code as suggested:
Code:
property diskname : "G5Backup" Ben |
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).
|
That's what I figured (and tried) but:
Code:
on beforeRunningCopy() |
I'd suggest the following. Get rid of the Property, then:
Code:
beforeRunningCopy() |
That's perfect, thanks Dave. I've got it scheduled now, so I'll check the log tomorrow, and here's hoping.
Many thanks, Ben |
You can always set it to schedule for "a minute from now" so you can test without waiting overnight! :-)
|
All times are GMT -4. The time now is 11:48 AM. |
Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, vBulletin Solutions, Inc.