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 12-29-2006, 11:39 AM
rednerd rednerd is offline
Registered User
 
Join Date: Dec 2006
Posts: 3
Idiot Proof Backup System

UPDATE: All problems fixed with Growl see the posts below!


First let me start off by saying sysadmin for a fairly large windows network with a handfull of Mac users. I'm also a Mac and Apple Script n00b. I had a user recently upgrade her system from 10.3 -> 10.4. I told the user repeatedly to make sure she ran SuperDuper! before hand so that we could back out of the upgrade if the need arose. I even offered to do the backup and upgrade for her... Needless to say she ended up with a completely hosed system that I was restoring at 2am on a Friday night / Saturday morning. I've now decided that I need to make sure SuperDuper runs without any user intervention. But I also need a way for the user to know if a backup fails so that she can inform me. The problem is that the computer in question is a complete stand alone system. It doesn't connect to the internet or have any sort of internal email access.

I seem to have the system 90% comlete but I'm having problems notifing the user that the job has completed while still closing SuperDuper!. Here is what I've done so far:

1. Installed a second hard drive into the machine. Partitioned and formated the drive as one big volume labelled SuperDuper_Backup_Clone
2a. Used 'disktool -l' and 'diskutil info' to get the UUID of the new drive.
2b. Created an /etc/fstab file with the following entry to keep the drive from being automagically mounted on boot (so that the user won't store data on it):
UUID=uuid_from_step_2a none hfs rw,noauto 0 0
3. Created a script called /usr/local/bin/umount_clone to look like this:
#!/bin/bash
rm /Volumes/SuperDuper_Backup_Clone/etc/fstab
theDisk=`diskutil list | awk '/SuperDuper/ {print $NF}'`
diskutil unmount $theDisk
4. Mounted the drive using 'diskutil mount' command (Disk Utility will also work)
5a. Setup SuperDuper! to run a Smart Update backup from the internal drive to the "Clone" drive.
5b. Use the advanced option to run the /usr/local/bin/umount_clone script to when after the backup job completes.
5c. Schedule the backup Job
6a. Created a little QT app called sdInformer (program w/ source) to bring up a dialog box telling the user that the job completed successfully. I tried using Apple Script to do this but the dialog box wouldn't go away and stated "User Intervention Not Allowed."
6b. Edited the Copy Job.applescript file to include:
on afterRunningCopy()
set datestamp to (do shell script "date '+%m/%d/%y'")
do shell script "/usr/local/bin/sdInformer.app/Contents/MacOS/sdInformer 'Backup for " & datestamp & " Completed Successfully!' &"
end afterRunningCopy
And a similar entry for errorRunningCopy.
6c. Edited the scheduled job so that the apple script gets recompiled.

As I said before this works except for two small problems.
a. SuperDuper! stays running until the user aknowledges the sdInformer dialog box. I don't know if this will have any consiquences if another SD job tries to start before dialog box is acknowledged.
b. I think the SD! scheduled job has to be run as user who is currently logged onto the machine. This means that if another user is logged in the SD! job doesn't get run and even if it did, I don't think the sdInformer dialog will work since the cron user running the job won't have access to the Aqua session. I haven't really tested this since there is only one user on the machine in question.

Any idea how I might be able to run my sdInformer program and still have SD! exit properly? Or some other way of going about informing the user the backup succedded or failed without hanging SD! until the user acknowledges the backup's status? Is there a way to make Growl pop up dialog that will stay up until the user acknowledges it, maybe? Dashboard widget? Apple Script tweak?

Cheers ~jon

Last edited by rednerd; 12-29-2006 at 12:33 PM.
Reply With Quote
  #2  
Old 12-29-2006, 11:41 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
It's much easier to just install Growl, Jon, and use our support of that to send you mail...
__________________
--Dave Nanian
Reply With Quote
  #3  
Old 12-29-2006, 11:41 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
Note, too, that our standard scheduling will mount, copy and unmount automatically...
__________________
--Dave Nanian
Reply With Quote
  #4  
Old 12-29-2006, 11:53 AM
rednerd rednerd is offline
Registered User
 
Join Date: Dec 2006
Posts: 3
Wow Dave you reply fast! I was still editing the post when you replied twice!!!

The machines isn't connected to _any_ network that could send me an email, page, etc. Also the main reason for the umount_clone script was to delete the fstab file so that if I need to boot off the drive I wouldn't have to find another Mac w/ SATA to mount the partition and delete the file. It keeps the volume from being mounted on boot... Of course this is hypothetical as I haven't tried booting from that volume with the fstab file in place. Granted OS X is a lot smarter than other *nixes in many ways.

I'll give Growl a shot.
Reply With Quote
  #5  
Old 12-29-2006, 11:59 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
Growl will definitely tell the user that the backup worked (or didn't). If you make the notification "Sticky" it'll stay up post-backup, too.
__________________
--Dave Nanian
Reply With Quote
  #6  
Old 12-29-2006, 12:28 PM
rednerd rednerd is offline
Registered User
 
Join Date: Dec 2006
Posts: 3
Yes, Growl does indeed rock. I'm such a n00b. I'll rack up all my previous work to an acedemic endevour.

So for those keeping score at home the final Idiot Proof SD! system is as follows:

0. Install SD! and Growl.
1. Install a second hard drive into the machine. Partition and formated the drive as one big volume labelled SuperDuper_Backup_Clone
2a. Used 'disktool -l' and 'diskutil info' to get the UUID of the new drive.
2b. Created an /etc/fstab file with the following entry to keep the drive from being automagically mounted on boot (so that the user won't store data on it):
UUID=uuid_from_step_2a none hfs rw,noauto 0 0
3. Created a script called /usr/local/bin/umount_clone. This script will remove the /etc/fstab file and then unmount the drive so that if you mount the drive in another machine it will show up and to make sure you can boot from the SD volume if needed.
#!/bin/bash
rm /Volumes/SuperDuper_Backup_Clone/etc/fstab
theDisk=`diskutil list | awk '/SuperDuper/ {print $NF}'`
diskutil unmount $theDisk
4. Mount the drive using 'diskutil mount' command (Disk Utility will also work)
5a. Setup SuperDuper! to run a Smart Update backup from the internal drive to the "Clone" drive.
5b. Use the advanced option to run the /usr/local/bin/umount_clone script to when after the backup job completes.
5c. Schedule the backup Job
6a. Run a backup job so that SD! registers itself with Growl.
6b. Open the Growl Preferences pane, select the Application tab. Select the SuperDuper! application in the first box and mar the Scheduled Copy notifications as sticky.
7. Get yourself a cold beverage and use the change to register SD! .
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
backup (all files) error smtorr General 3 02-09-2006 08:10 AM
How to verify a Scheduled Backup? tuqqer General 3 12-06-2005 06:50 PM
(Zero-length) File caused SuperDuper to abort backup alancfrancis General 7 08-31-2005 10:42 AM
System crash on first backup attempt cabo General 10 08-14-2005 05:27 AM
First system backup Lee General 3 07-30-2005 07:58 PM


All times are GMT -4. The time now is 09:53 AM.


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