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)

pwharff 12-06-2005 06:09 PM

Where is the log file stored?
 
I have SuperDuper running on a OS X server about 1000 miles away. Most of the maintenance and other misc. tasks I do through the terminal. Since I just started using SuperDuper (in place of ChronoSync and CCC), I want to monitor it closely until it gains my full and complete trust. So I want to make sure that my scheduled backups are actually occurring, so what would be the best way of verifying this:

1) Maybe through the log file??? Where is it?
2) Maybe some UNIX command line that will show me the last time a drive was touched??? How?
3) Maybe SuperDuper has a way of notifying the user when a particular Backup succeeded or failed???

Anyway, I just want to get feedback on what's the best approach to this?

dnanian 12-06-2005 06:43 PM

The log file is stored in the settings package for the given scheduled copy, stored in Library/Application Support/SuperDuper!/Scheduled Copies. You'll find the logs inside the appropriate package, in the Logs folder.

If you want it to notify you when the copy happens, I'd suggest modifying the "Copy Job" script you'll find in the same package. Edit the entries at the top to do whatever you'd like for notification (you can even use "path to me" to find the location of the logfiles and the like).

Then, uncheck and re-check the schedule checkbox, and we'll compile the script for you.

Does that help?

pwharff 12-06-2005 06:59 PM

I'm not sure it does help. I'm trying to accomplish this through the Terminal and the only thing I find that is "Cron Job" is a file called "Cron Job.app". So I'm not sure where to go from here.

dnanian 12-06-2005 07:00 PM

You mean 'Copy Job.app'?

Parallel to that you should see a "Logs" folder. Go in that folder and you'll see the logs.

pwharff 12-06-2005 07:18 PM

I found the Logs folder. I was responding to this statement of yours:

Quote:

If you want it to notify you when the copy happens, I'd suggest modifying the "Copy Job" script you'll find in the same package. Edit the entries at the top to do whatever you'd like for notification (you can even use "path to me" to find the location of the logfiles and the like).
Now that I am looking at the Log file. Is it safe to assume that if the log says "Copy complete" as mine does, that the process complete WITHOUT any problems/errors? Meaning, would it ever say "Copy complete" and still have errors or problems with the copy?

Also, yes I meant "Copy Job".

dnanian 12-06-2005 07:21 PM

No, it won't say "Copy complete" if there are problems -- it'll end with an error.

The previous statement is referring to the "Copy Job.applescript" you'll also find parallel to the Copy Job.app. The "app" is the compiled version.

pwharff 12-06-2005 07:33 PM

Ahh, thanks a bunch! I think I'll write a shell script to look at the last line and verify if "Copy Complete" exisits. This would be reliable, right?

dnanian 12-06-2005 07:39 PM

Well, it assumes we're not going to change the text -- which we shouldn't, but don't guarantee. It should work, though.

It might be easier to look at the .scheduleJobProperties file at the top of the package. This is a little XML file that'll tell you the last stop time, and also says whether or not the execution succeeded. Here's a snippet of one:

Code:

[g5:SuperDuper!/Scheduled Copies/Smart Update G5 from Macintosh HD.sdsp] dnanian% cat .scheduledJobProperties
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>SDExitStatus</key>
        <string>normal</string>
        <key>SDLogFileName</key>
        <string>/Users/dnanian/Library/Application Support/SuperDuper!/Scheduled Copies/Smart Update G5 from Macintosh HD.sdsp/Logs/2005-12-06 17:47:24 -0500.sdlog</string>
        <key>SDScheduleStartTimestamp</key>
        <date>2005-12-06T22:47:25Z</date>
        <key>SDScheduleStopTimestamp</key>
        <date>2005-12-06T23:53:01Z</date>

etc.

pwharff 12-07-2005 12:04 PM

Thank you once again. One last question, what is the "0800" at the end of my log filename? Is this my GMT offset?

dnanian 12-07-2005 12:08 PM

Yes, it is.

pwharff 12-07-2005 12:51 PM

Not the best at shell scripting, but would this script be adequate:

Code:

head -6 .scheduledJobProperties | tail -2 | sed 's/\<key\>//g' | sed 's/\<\/key\>//g' | sed 's/\<string\>//g' | sed 's/\<\/string\>//g' | awk '{ print $1 }'
This assumes that the string "normal" is always the 6th line.

dnanian 12-07-2005 01:09 PM

Looks about right to me!

pwharff 12-07-2005 01:12 PM

Is the string for <key>SDExitStatus</key> always the 6th line?

dnanian 12-07-2005 01:15 PM

At present. Of course, we can't guarantee that long term... it might be easier to use a grep expression to search for SDExitStatus, or just sed search for it in the file, since the value will always follow the key. That's be less dependent on the actual location.

pwharff 12-07-2005 01:22 PM

Duh! You're right! This works much better:

Code:

grep -A 1 SDExitStatus .scheduledJobProperties | sed 's/\<key\>//g' | sed 's/\<\/key\>//g' | sed 's/\<string\>//g' | sed 's/\<\/string\>//g' | awk '{ print $1 }'


All times are GMT -4. The time now is 01:30 AM.

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