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 08-25-2005, 10:13 AM
snoopy67 snoopy67 is offline
Registered User
 
Join Date: Jul 2005
Location: Germany
Posts: 16
alternating backup

I have devised a very simple scheme where i make a backup on partition 1 on my external disk, the next day a make the backup on partition 2 on the external disk, the next on partition 1 again, then partition 2, etc.
[sort of a "very poor man's incremental backup" ;-) ]

What i would like SD to do for me is just to remember the last time a made a backup on each partition.

Any ideas?

Cheers,
Gab.
Reply With Quote
  #2  
Old 08-25-2005, 10:33 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
Remember how, Gab?
__________________
--Dave Nanian
Reply With Quote
  #3  
Old 08-26-2005, 04:11 AM
snoopy67 snoopy67 is offline
Registered User
 
Join Date: Jul 2005
Location: Germany
Posts: 16
Sorry, no ....
Reply With Quote
  #4  
Old 08-26-2005, 06:37 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
I'm really not sure what you mean.
__________________
--Dave Nanian
Reply With Quote
  #5  
Old 08-27-2005, 02:31 PM
darelon darelon is offline
Registered User
 
Join Date: Jan 2005
Posts: 11
@snoopy67: to semi-automatically backup to alternating volumes, you could e.g.

1. save the SD! settings for each backup volume separately,
2. create a script to start a SD! backup with (and to keep track of) alternating settings, and
3. use this script to start your regular backups to alternating volumes.

AppleScript is particularly handy for step 2 -- let me know if you'd like an example based on Dave's "Daily Backup" AppleScript application.

@Dave: hope you don't mind me intruding here ;-)
Reply With Quote
  #6  
Old 08-27-2005, 02:55 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
Ah -- I now see what was confusing here. I meant "How do you mean "remember"", and I think you took it as "Do you remember how"!

So -- hopefully darelon's response is helpful, but if not, could you explain a bit more about how you mean "remember"?

Thanks, and sorry for any confusion.
__________________
--Dave Nanian
Reply With Quote
  #7  
Old 08-29-2005, 05:27 AM
snoopy67 snoopy67 is offline
Registered User
 
Join Date: Jul 2005
Location: Germany
Posts: 16
Quote:
Originally Posted by darelon

AppleScript is particularly handy for step 2 -- let me know if you'd like an example based on Dave's "Daily Backup" AppleScript application.
Thanks for the help. Unfortunately, i don't speak Applescript (just ksh & Co.), so i would like to ask you to provide the example

Thanks a lot in advance,
Gabriel.
Reply With Quote
  #8  
Old 08-29-2005, 07:34 PM
darelon darelon is offline
Registered User
 
Join Date: Jan 2005
Posts: 11
Gabriel,

I used the script below when I still had an abundance of disk space; now I'm down to just one backup and a sandbox. As said before, it's Dave's "Daily Backup" script with some extra lines to use a sequence of backup settings. It 'remembers' the last backup settings used and will cycle through a list of settings you specify in the script.

First and foremost, you'll need to set up SD! with the correct settings for each volume you want to backup to, and save those settings in separate files (see section 6 of the User's Guide for more info on saved settings). Also, you'll need to unlock SD! to be able to run it via AppleScript.

Second, open the Scripteditor application (usually resides in the /Applications/AppleScript folder) and copy+paste the code below into the empty script window.

You'll need to change the values in the "property allBackupSettings : …" line at the top of the script to reflect the names and required order of your saved backup settings. Then save the script as an application bundle without startup dialog wherever you want.

Finally, when you want to execute one of your regular alternating backups, run the Applescript application you just created instead of SD! directly. You can do this manually, or schedule it with e.g. iCal. The script app will determine the next backup settings to be used and start SD! with those settings, and quit SD! when it's done.

Code:
(* 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
N.B. When SD! encounters an error, the script will not advance to the next backup settings when you start it again -- but note that when you manually stop a running backup, SD! does not see this as an error; this will leave you with an interupted backup *and* the next backup settings would be used when you'd restart the backup via the script. Something to keep in mind. If you want, you can uncomment the lines just before the 'tell application "SuperDuper!"' line to check or change the backup settings that will be used by the script.

Well, that should be it. Let me know if you have any questions or it doesn't quite fit the bill. Of course, all the usual disclaimers apply…

Hope this helps,
Ciao,
Roeland.
Reply With Quote
  #9  
Old 08-29-2005, 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
(Thanks for passing this along, Roeland!)
__________________
--Dave Nanian
Reply With Quote
  #10  
Old 08-30-2005, 05:36 AM
snoopy67 snoopy67 is offline
Registered User
 
Join Date: Jul 2005
Location: Germany
Posts: 16
Quote:
Originally Posted by darelon
I used the script below ...
Ciao,
Roeland.
thanks a lot! i'll try it as soon as i'll be back at my office.

Since i'm completely new to applescript, i've got one question out of curiosity, which i couldn't get an answer by quickly browsing the Applescript Language Guide:
are variables in apple scripts persistent? i.e., when a script exits, are all values of variables saved, and then restored when the script runs the next time?

Best regards,
Gabriel.
Reply With Quote
  #11  
Old 08-30-2005, 07:48 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
Properties like this are, Gab.
__________________
--Dave Nanian
Reply With Quote
  #12  
Old 04-04-2009, 05:14 PM
BudSimrin BudSimrin is offline
Registered User
 
Join Date: Dec 2004
Posts: 41
Another approach

[QUOTE=darelon;3169]@snoopy67: to semi-automatically backup to alternating volumes, you could e.g.

How about simply using the scheduler built-in to SuperDuper? That is, schedule one backup for every MWFSun, and the other for TTSat. You would be using the same backup on Sun and Mon but otherwise alternating. Not perfect, but close and very simple to implement.http://www.shirt-pocket.com/forums/i...es/redface.gif
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
Partitioning Backup hard drive??? Lee General 13 11-30-2005 10:32 AM
SuperDuper Backup of AES 128 Encrypted Disk Image rwg4 General 3 11-30-2005 10:28 AM
automatic initiation of backup when I plugin/mount my external Firefox drive? mykmelez General 3 07-11-2005 03:00 PM
Incremental Backup Axxll General 17 07-01-2005 07:03 AM
Smart Backup Error bill s General 20 02-04-2005 09:46 AM


All times are GMT -4. The time now is 05:10 PM.


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