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

Go Back   Shirt Pocket Discussions > SuperDuper! > General
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 04-10-2007, 07:53 PM
ShosMeister ShosMeister is offline
Registered User
 
Join Date: Apr 2007
Posts: 14
AppleScript

Is SuperDuper scriptable? I have been using Retrospect and was thinking of changing over to SuperDuper for it's ease, speed and bootable image options. I had pieced together an AppleScript to run with Retrospect that would log all of the actions as far as volumes, files, dates, times, etc. of the backup and also send out an e-mail if there was an error. Any way to do this with SuperDuper?

Thanks!!!

Last edited by ShosMeister; 04-10-2007 at 07:55 PM.
Reply With Quote
  #2  
Old 04-10-2007, 08:09 PM
dnanian's Avatar
dnanian dnanian is offline
Administrator
 
Join Date: Apr 2001
Location: Weston, MA
Posts: 14,923
Send a message via AIM to dnanian
It's scriptable, yes. But you can get it to send notifications much more easily: just install Growl and configure the MailMe notification type...
__________________
--Dave Nanian
Reply With Quote
  #3  
Old 04-10-2007, 08:38 PM
ShosMeister ShosMeister is offline
Registered User
 
Join Date: Apr 2007
Posts: 14
That may be, but, the e-mail is the least of the items. I like to track the backup progress via the database that I've set up. I can see if the backups are taking longer than expected; if the users have added a bunch of "junk" to their machines; that everyone backed up and how much; etc.

If it is scriptable, is there any help doc that gives the available attributes/properties/methods/etc?

Thanks
Reply With Quote
  #4  
Old 04-10-2007, 08:45 PM
dnanian's Avatar
dnanian dnanian is offline
Administrator
 
Join Date: Apr 2001
Location: Weston, MA
Posts: 14,923
Send a message via AIM to dnanian
The scripting dictionary is available in the normal way. However, I don't think you're going to find super extensive abilities. You could, however, modify our "schedule driver" (which is an applescript, available in the application bundle) to log additional information if necessary.
__________________
--Dave Nanian
Reply With Quote
  #5  
Old 04-11-2007, 05:54 PM
ShosMeister ShosMeister is offline
Registered User
 
Join Date: Apr 2007
Posts: 14
I'm not sure what you mean by the "normal way". I've done a very minimal amount of Apple Script and all of it was done by using other sample code and modifying it to fit my needs. For example, this is the code that I cobbled together from samples in Retrospect and FileMaker to log the actions of the backup:

Code:
on volumeEnd given VolumeName:theVolume, KBCopied:theKB, FileCount:theFileCount, DurationInSeconds:theDuration, BackupDate:theBackupDate, startDate:theStartDate, endDate:theEndDate, destinationName:theDestination, ClientName:theClient, zoneName:theZone, scriptName:theScript, backupTypeString:theBackupType, subvolumeDiskName:theDiskName, fileErrorCount:theFileErrorCount, volumeErrorCode:theVolumeError, volumeErrorMessage:theVolumeErrorMessage, activatorCodeString:theActivatorCode
	
	set gStorageSet to theDestination
	set gNumVolumesBackedup to gNumVolumesBackedup + 1
	if theVolumeError is not 0 or theFileErrorCount is not 0 then
		set gVolumeErrors to gVolumeErrors + 1
	end if
	
	if theDiskName is not "" then
		set theParent to "The Subvolume’s parent disk is \"" & theDiskName & "\"."
	else
		set theParent to ""
	end if
	set theDuration to secondsConverter(theDuration)
	
	if theVolumeError is 0 then
		set theSuccess to "successfully"
		set mySubject to "Retrospect: Success"
		set gBackUpReport to gBackUpReport & "Volume \"" & theVolume & "\" completed " & theSuccess & ¬
			", copying " & theFileCount & " files for " & theKB & " K with " & theFileErrorCount & ¬
			" errors." & return & return & "Script \"" & theScript & "\" finished copying volume \"" & ¬
			theVolume & "\" to destination \"" & theDestination & "\"." & return & return & "Duration: " & ¬
			theDuration & "." & return & return & lineDelimiter & return & return
	else
		set theSuccess to "with error " & theVolumeError & ": " & theVolumeErrorMessage
		set mySubject to "Retrospect: Error " & theVolumeError & ": " & theVolumeErrorMessage
		set gBackUpReport to gBackUpReport & "•Error•" & return & return & ¬
			"Volume \"" & theVolume & "\" completed " & theSuccess & "." & return & return & lineDelimiter & return & return
	end if
	
	-- Record the parameters for each volume in a new record in a database
	tell application "FileMaker Pro"
		tell document "Retrospect Database"
			create new record with data {theVolume, theKB, theFileCount, theDuration, theBackupDate as string, ¬
				theStartDate as string, theEndDate as string, theDestination, theClient, theZone, theScript, ¬
				theBackupType, theDiskName, theFileErrorCount, theVolumeError, theVolumeErrorMessage, theActivatorCode}
		end tell
	end tell
end volumeEnd
Reply With Quote
  #6  
Old 04-11-2007, 06:04 PM
dnanian's Avatar
dnanian dnanian is offline
Administrator
 
Join Date: Apr 2001
Location: Weston, MA
Posts: 14,923
Send a message via AIM to dnanian
Well, take a look at the schedule driver in the application package ("Copy Job Script.template") and you'll see how it works and where you can fit your stuff in...
__________________
--Dave Nanian
Reply With Quote
  #7  
Old 04-11-2007, 07:48 PM
ShosMeister ShosMeister is offline
Registered User
 
Join Date: Apr 2007
Posts: 14
Thanks for pointing me in that direction. I did find it and was able to see and understand what it's doing. What I could not seem to find were the specific attributes that I am writing to the FM database. So, I thought I would look in the log file to see if there was anything in there I could see. What I found is that the date and (obviously) time is there as well as the volume information:
Code:
| 04:35:08 AM | Info | Started on Wed, Apr 11, 2007 at 4:35 AM
| 04:35:08 AM | Info | Source Volume: MacBook, mount: /, device: /dev/disk0s2, media: TOSHIBA MK1234GSX, interconnect: Internal SATA, file system: "Journaled HFS+", OS: 10.4.9 (8P2137), capacity: 111.47 GB, used: 54.91 GB, directories: 81558, files: 401214, ejectable: NO, ACLs: Disabled
| 04:35:08 AM | Info | Target Volume: Maxtor MacBook BU, mount: /Volumes/Maxtor MacBook BU, device: /dev/disk1s3, media: Maxtor OneTouch III, interconnect: External FireWire, file system: "Journaled HFS+", OS: 10.4.9 (8P2137), capacity: 114.75 GB, used: 52.58 GB, directories: 81531, files: 401895, ejectable: NO, ACLs: Disabled
I also found at the end of the log:
Code:
| 05:39:32 AM | Info |       Evaluated 481570 items occupying 54.43 GB (81555 directories, 367861 files, 32154 symlinks)
| 05:39:32 AM | Info |       Copied  481447 items totaling  52.20 GB (81535 directories, 367760 files, 32152 symlinks)
| 05:39:32 AM | Info |       Cloned  52.20 GB of data in 3852 seconds at an effective transfer rate of 13.88 MB/s
So it obviously knows this information in the program somewhere since it is writing it to the log. The question is can I get to that information via AppleScript and, if so, what are the variable names?
Reply With Quote
  #8  
Old 04-11-2007, 08:11 PM
dnanian's Avatar
dnanian dnanian is offline
Administrator
 
Join Date: Apr 2001
Location: Weston, MA
Posts: 14,923
Send a message via AIM to dnanian
You'll have to parse the log. Of course, you already have the date and time...
__________________
--Dave Nanian
Reply With Quote
  #9  
Old 04-28-2007, 08:45 AM
ShosMeister ShosMeister is offline
Registered User
 
Join Date: Apr 2007
Posts: 14
Well, I can't seem to find any examples to parse the log file. Can anyone help out?
Reply With Quote
  #10  
Old 05-05-2007, 08:46 AM
ShosMeister ShosMeister is offline
Registered User
 
Join Date: Apr 2007
Posts: 14
Noone has any simple examples for this?
Reply With Quote
  #11  
Old 05-05-2007, 09:11 AM
dnanian's Avatar
dnanian dnanian is offline
Administrator
 
Join Date: Apr 2001
Location: Weston, MA
Posts: 14,923
Send a message via AIM to dnanian
Doesn't look like it... sorry!
__________________
--Dave Nanian
Reply With Quote
  #12  
Old 05-07-2007, 04:50 PM
Budgie Budgie is offline
Registered User
 
Join Date: Aug 2005
Location: New Zealand
Posts: 78
Hi ShosMeister

Maybe some good folks at either site below could help you construct your script.
I serached for "parse" on both sites which came up with quite a few ideas.

http://discussions.apple.com/forum.jspa?forumID=724

http://bbs.applescript.net/viewforum.php?id=2

Budgie
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

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
A strategy for managing SD! jobs via AppleScript Syzygies General 15 05-01-2006 07:55 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 07:06 PM.


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