View Single Post
  #5  
Old 06-21-2009, 07:49 AM
ixnayus ixnayus is offline
Registered User
 
Join Date: Jun 2009
Posts: 4
Okay that worked. For posterity, here's what I did:

I have two internal drives, Sam & Max. I want to back them up on demand to an external drive ("MyBook") via an Automator Script. I want to leave this script running unattended after I leave for the night and have my computer sleep as soon as SuperDuper is done.

1) I create the SuperDuper jobs I want to run. I make sure the padlock icon is unlocked to allow the job to run unattended for both jobs.

2) I create an automator job that triggers the "Sam" job first. In a "Run AppleScript" workflow item:

Code:
tell application "SuperDuper!"
	run using settings "~/Library/Application Support/SuperDuper!/Saved Settings/Backup Sam to MyBook.sdsp" without user interaction
end tell
Save this as "SuperDuper! Sam to MyBook.app" (save as an app, not a workflow!) somewhere handy. This is the thing you'll launch when you want to kick off the whole chain.

3) I create a second automator script that triggers the "Max" job. Like the "Sam" job, create a "Run Applescript" workflow:

Code:
tell application "SuperDuper!"
	run using settings "/Users/ixnayus/Library/Application Support/SuperDuper!/Saved Settings/Backup Max to MyBook.sdsp" without user interaction
end tell
Save this in ~/Library/Application Support/SuperDuper!/Saved Settings as "SuperDuper Max to MyBook.app"

4) Open TextEdit and write "open " and then drag "SuperDuper Max to MyBook.app" onto it. You'll get a long command:

Code:
open /Users/ixnayus/Library/Application\ Support/SuperDuper\!/Saved\ Settings/SuperDuper\ Max\ to\ MyBook.app
Save this as a shell script: "Backup Max to MyBook.sh"

5) Here's an important step. You need to set permissions on the shell script so SuperDuper can open it without complaining.
From the terminal:

Code:
chmod 777 ~/Library/Application\ Support/SuperDuper\!/Saved\ Settings/Backup\ Max\ to\ MyBook.sh"
6) We now have all the pieces of the puzzle. Let's put it together. In SuperDuper!, open the "Sam" backup script. Click on the Options button. Click on Advanced. Check "Run shell script after copy completes" and navigate to the shell script you created in #4 above. Under "General" make sure "Do nothing" (default) is still selected under "On successful completion." Save the job.

7) Open the "Max" job in SuperDuper. Click "Options" then "General" and select "Sleep Computer" under "On successful completion". Save the job.


You now have an automator script that fires off a chain of events resulting in your backed up data and a sleepy computer.

Automator Backup Sam ->
SuperDuper Backup Sam ->
Shell - Open Automator Backup Max ->
SuperDuper Backup Max ->
Sleep computer


TIP: if you have Growl installed (http://growl.info/), you'll be greeted with a quick message when you start your computer up on whether the jobs completed successfully or not.


I hope this helps. Thanks, Dave, for pointing me in the right direction.
Reply With Quote