Shirt Pocket Discussions

Shirt Pocket Discussions (https://www.shirt-pocket.com/forums/index.php)
-   General (https://www.shirt-pocket.com/forums/forumdisplay.php?f=6)
-   -   Where is the log file stored? (https://www.shirt-pocket.com/forums/showthread.php?t=898)

dnanian 12-07-2005 05:22 PM

There ya go. :)

pwharff 12-07-2005 08:31 PM

Ok, I have finally written my post backup script:

Code:

#!/bin/bash

#
# This script is intended to notify the Admin of backup status using Shirt Pockets SuperDuper! Success or Failure.
#

# Where to keep our log file
logPath=/var/log/backup-disk-usage

# Where is SD's .scheduledJobProperties file
statusPath=/private/var/root/Library/Application\ Support/SuperDuper\!/Scheduled\ Copies/Smart\ Update\ Backup1\ from\ Server.sdsp/.scheduledJobProperties

# Formatting of our log file
echo "<---- Backup Status for `date` ---->" >> "$logPath"
echo " " >> "$logPath"
echo "Drive Backed-up: Backup1" >> "$logPath"

# Find out status of SD's last backup. Success of Failure.
grep -A 1 SDExitStatus "$statusPath" | sed 's/\<key\>//g' | sed 's/\<\/key\>//g' | sed 's/\<string\>//g' | sed 's/\<\/string\>//g' | awk '{ print $1 }' >> "$logPath"

echo " " >> "$logPath"

# Include disk capacity info
df -ht hfs >> "$logPath"

echo " " >> "$logPath"

sleep 2

# Remotely copy to Apache HT docs dir using stored ssh key
scp /var/log/backup-disk-usage pwharff@noahprecision.com:/Library/WebServer/Documents/logs

Now I need to know how to run this shell script immediately after my scheduled backup and since I don't have direct access to this server (as mentioned above, over 1000 miles away) and no remote desktop connection or VNC, just Terminal, how would I do this?

dnanian 12-07-2005 08:47 PM

Well, a few things I can think of.

First, set it to run with cron well after the start of the copy -- giving it long enough to work.

Second, you could use the "On successful completion" shell script in Advanced, but then it'd only run if successful.

Finally, you can run from the AppleScript using both of the two completion script blocks designed for this purpose (on afterRunningCopy and on errorRunningCopy). If you want to use the shell script, you'd use "do shell script" in there.

Note that you don't have to hardwire the backup path with this method, because "path to me" will give the path into the package (it'll actually be inside the Copy Job package)...

pwharff 12-08-2005 01:08 PM

Thank you very very much for your feedback and help on this subject. I feel I have better control over my backups now, because of your help and your wonderful software. Hopefully somone could use our posts to this forum to help them as well! Thanks again and again and again!

--Paul

dnanian 12-08-2005 01:27 PM

I hope it'll help others as well, but I'm happy to have helped you, Paul.


All times are GMT -4. The time now is 08:48 PM.

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