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

Go Back   Shirt Pocket Discussions > SuperDuper! > General

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 05-03-2007, 05:32 PM
jszedula jszedula is offline
Registered User
 
Join Date: May 2007
Posts: 5
Multi-volume backup using Finder Folder Action

I'm using Finder's Folder Action "adding folder items to" to trigger a backup using SuperDuper! when:
1. A volume is mounted named like "B-Macintosh HD"
2. Another volume already mounted named like "Macintosh HD"
3. a SuperDuper! settings file exists with the name like "Backup Macintosh HD"
The script will work for any volume as long as there is a matched set when "Macintosh HD" is replaced by some other volume name. I can backup all the volumes on my computer plus any external drives I might want to backup as well.

This piece of Applescript code works but I was wondering if there was a better way to do this:

Code:
tell application "Finder"
-- ...
-- other code to verify proper backup conditions exist goes here
-- ...
 with timeout of 3600 seconds
  tell application "SuperDuper!"
   run using settings SettingFile without user interaction
   quit
  end tell
  repeat while (process "SuperDuper!" exists)
   do shell script "sleep 10"
  end repeat
 end timeout
end tell
Is there a way to not use the "repeat" to see if SuperDuper! has finished? I put the "repeat" loop in because when I used a backup disk with multiple partitions that satisfied the 3 trigger conditions SuperDuper! seemed to be starting the next backup before it even finished the first one. I originally did the "quit" at the end of the script. It's as if the "run using settings SettingFile without user interaction" commands are placed into a queue and not waiting for each one to complete before moving on.

Also is there a way to get rid of the count down the precedes the start of the backup? My script asks if the backup is to be done if the 3 triggers are satisfied so a "Cancel" countdown is unnecessary.
Reply With Quote
  #2  
Old 05-03-2007, 05:42 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
Sorry, there's no way to get rid of the cancel count down. But why not use our existing schedule script driver as a base? You'll find it inside the SD! applications package in Contents/Resources/Copy Job Script.template...
__________________
--Dave Nanian
Reply With Quote
  #3  
Old 05-03-2007, 06:03 PM
jszedula jszedula is offline
Registered User
 
Join Date: May 2007
Posts: 5
Because I want the backup to start when I mount the drive.

I don't want to leave the drive on waiting for the scheduled backup time.

I've partitioned my disk into a Mac OS X & application partition and a user data (including my home directory) partition. The Mac OS X partition only really needs to be backed up before any updates are done (which I do manually and just in case the updates are a problem). I don't need to do a backup my user partition every day but I may want to backup several days in a row if I've done a lot of work that should be backed up.
Reply With Quote
  #4  
Old 05-03-2007, 06:04 PM
jszedula jszedula is offline
Registered User
 
Join Date: May 2007
Posts: 5
You really didn't answer my question about:

Is there a way to not use the "repeat" to see if SuperDuper! has finished? I put the "repeat" loop in because when I used a backup disk with multiple partitions that satisfied the 3 trigger conditions SuperDuper! seemed to be starting the next backup before it even finished the first one. I originally did the "quit" at the end of the script. It's as if the "run using settings SettingFile without user interaction" commands are placed into a queue and not waiting for each one to complete before moving on.
Reply With Quote
  #5  
Old 05-03-2007, 06:06 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
There's no way to do it without a repeat, no. But, really, look at the schedule driver script. You can definitely do this with our script... in fact, see the "One Touch Button" FAQ for details of how to use it for something other than scheduling.
__________________
--Dave Nanian
Reply With Quote
  #6  
Old 05-03-2007, 06:29 PM
jszedula jszedula is offline
Registered User
 
Join Date: May 2007
Posts: 5
How can I use the "One Touch Button" FAQ if I do not have a Maxtor OneTouch drive? I have an OWC firewire 2.5" enclosure that I use to backup my Mac's hard drive.
Reply With Quote
  #7  
Old 05-03-2007, 06:32 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 an example of an approach. So, if you wanted to back up when a drive was attached, you could -- for example -- use Do Something When (see Version Tracker) and have it run the little executable. Or, your own script could run ours.
__________________
--Dave Nanian
Reply With Quote
  #8  
Old 05-03-2007, 06:44 PM
jszedula jszedula is offline
Registered User
 
Join Date: May 2007
Posts: 5
I guess I could download & install "Do Something When" but how would that be any better than using the built-in Finder's Folder Action "adding folder items to"? Won't I still have the problem of multiple actions trying to run at the same time when I mount each partition and the backup is triggered by "Do Something When"?

Without spending more time with "Do Something When" to find out, I don't know if I'll be able to solve the multi-volume backup issue or prompt for a "do backup"/"don't do backup" response before actually doing the backup?

It looks like I have a working solution that does not require any more software than I have nor any more time spent figuring it out.
Reply With Quote
  #9  
Old 05-03-2007, 06:53 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
Again, that's just an example. You can trigger things any way you want.
__________________
--Dave Nanian
Reply With Quote
Reply


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
Is SuperDuper blowing away a folder? ChrisC General 3 09-18-2006 04:59 PM
SuperDuper Failing on Backup - I/O Errors Stephen Kuhn General 1 08-13-2006 04:03 PM
Folder Icon changes in backup Ronin General 5 07-18-2006 12:02 PM
How to verify a Scheduled Backup? tuqqer General 3 12-06-2005 06:50 PM
Laptop freezes buring backup kaalm General 5 05-12-2005 04:15 PM


All times are GMT -4. The time now is 05:55 AM.


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