Shirt Pocket Discussions  
    Home netTunes launchTunes SuperDuper! Buy Now Support Discussions About Shirt Pocket    

Go Back   Shirt Pocket Discussions > SuperDuper! > General

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 10-13-2005, 11:37 AM
emikysa emikysa is offline
Registered User
 
Join Date: Sep 2005
Location: Illinois
Posts: 12
Request for help with an AppleScript to run two SD SmartUpdates

Hello,

I would like to have a script that can run SuperDuper Smart Updates involving two SD session setting files that involve three hard drives. I think that what I want to do is relatively simple to accomplish using AppleScripts, but I don't know anything about AS, so I'm hoping that an SD user that is good with AppleScript can spend a few minutes to help me. Perhaps you?

In my Backups folder (this path: PB80-MAIN-EM/Users/emikysa/Documents/Computing, Web/Backups/) I have two SuperDuper session settings files, called Backup-PB-to-OW-Bootable-SD and Backup-LCScr84-to-OWBkScr84-SD. The first one makes a bootable backup of my PowerBook's internal hard drive to a partition on an external Other World FireWire drive, and the second one backs up a partition on an external LaCie FireWire drive to second partition on the external Other World FireWire drive.

I would like to have a script that I can set to run in the middle of the night that will
- run the first backup (Backup-PB-to-OW-Bootable-SD), then
- run the second backup (Backup-LCScr84-to-OWBkScr84-SD), then
- put my PowerBook to sleep (or shut it down)

The SuperDuper example Daily Backup scrip as well as another script that I found when reading discussion postings are copied below. Perhaps one of them can be altered to do what I want?

I'd really appreciate help!

Best,
Erik

btw, I've registered my copy of SD, and I'm running OS X 10.4.2.


------------------------------------------------------------------------

tell application "SuperDuper!"
try
--Wait until SuperDuper! is idle before loading and running the desired session
repeat while status is not idle
--Sleep # seconds is the best way to "wait" without using the CPU
tell application "System Events" to do shell script "sleep 5"
end repeat
if status is idle then
--Specify the saved settings as either an absolute path or just the name
run using settings "Daily Backup" without user interaction
end if
--Wait until the session is done
repeat while status is running
--Sleep # seconds is the best way to "wait" without using the CPU
tell application "System Events" to do shell script "sleep 5"
end repeat
on error errMsg
display dialog errMsg & " See section 12 of the User's Guide for help with this script."
end try
--Once done, tell SuperDuper! to quit
quit
end tell

------------------------------------------------------------------------

(* Rotating Backup - use a cyclic sequence of SuperDuper! backup settings *)

-- allBackupSettings should contain the names of all saved SuperDuper! backup settings to cycle through
-- any external volumes referenced in the saved backup settings used should be mounted before running this script
property allBackupSettings : {"Smart Backup All To Volume 1", "Smart Backup Users To Volume 2", "Smart Backup All to Sparse Image 1", "Smart Backup Users To Sparse Image 2"}

-- backupSettings will retain the name of the backup settings used for the last successfully completed backup
property backupSettings : ""

-- set new backup settings to use, cycling through the list of saved settings
set previousBackupSettings to backupSettings
if backupSettings is "" or backupSettings is last item of allBackupSettings then
set backupSettings to first item of allBackupSettings
else
repeat with i from 1 to (count allBackupSettings)
if backupSettings is item i of allBackupSettings then
set backupSettings to item (i + 1) of allBackupSettings
exit repeat
end if
end repeat
end if

(*
-- uncomment these five lines if you always want to manually confirm or select from the backup settings list
set backupSettings to first item of (choose from list allBackupSettings with prompt "Confirm or select backup settings to use:" default items backupSettings without multiple selections allowed and empty selection allowed)
if backupSettings is false then
set backupSettings to previousBackupSettings
quit
end if
*)

tell application "SuperDuper!"
try
--Wait until SuperDuper! is idle before loading and running the desired session
repeat while status is not idle
--Sleep # seconds is the best way to "wait" without using the CPU
tell application "System Events" to do shell script "sleep 5"
end repeat
if status is idle then
--Specify the saved settings as either an absolute path or just the name
--run using settings "Daily Backup" without user interaction
run using settings backupSettings without user interaction
end if
--Wait until the session is done
repeat while status is running
--Sleep # seconds is the best way to "wait" without using the CPU
tell application "System Events" to do shell script "sleep 5"
end repeat
on error errMsg
-- backup failed, so restore saved backup settings last used
-- N.B. backup stopped by user is considered successful by SuperDuper! in this context
set backupSettings to previousBackupSettings
display dialog errMsg & " See section 12 of the User's Guide for help with this script."
end try
--Once done, tell SuperDuper! to quit
quit
end tell
Reply With Quote
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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
Problems automating backups with applescript and crontab kbradnam General 4 01-20-2006 07:40 AM
applescript help snoopy67 General 1 09-17-2005 09:07 AM
AppleScript bug? fixed! pzingg General 1 11-02-2004 06:37 PM


All times are GMT -4. The time now is 06:35 AM.


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