Jump to content

Media Request notification via email


Recommended Posts

Retrospect 6.1.126 on OS XS 10.4.7

 

I'm trying to get Retrospect to notify me when new tapes are required. When the 4 tapes in cartridge 1 are full (La Cie IAT-2 drive) I'd like a notification to put in tape 5 (in cartridge 2)

 

If I run the BackupServer it says "Media" and brings up a dialog to load tape 5 but I get no email notification. I am using the Python script which otherwise seems to work OK

 

Nick Froome

Link to comment
Share on other sites

OK, a little update: I have a script set to run that needs media. I'm running it repeatedly and testing using different settings for the Media Request Timeout

 

It seems as though the Media Request email is not sent until the Media Timeout expires. If I set the Media Request Timeout (MRT) to 12 hours then I don't see a MR email (presumably, for 12 hours). If I set the MRT to 6 minutes then I see an MR email 6 minutes after the script starts, followed by an error email at 12 minutes

 

So the script is going Timeout (wait for MRT) email (wait for MRT) end script

 

What it should do is Timeout, email (wait for MRT) end script

 

Anyone want to debug the script?

 

 

Nick Froome

Link to comment
Share on other sites

(1) is your email address in kMainGroup ? (for all notifications)

(2) if not, is your email address in kMediaRequestGroup? (for media request notifications only)

 

I've got Retrospect 6.1.126 on OS X 10.4.7 Server, Xserve G5 Single Processor, 2.0 GHz, Python event handler.

I'm getting the Media Request email; I'm only using the kMainGroup notification.

 

Are you getting the completion emails?

 

Russ

Link to comment
Share on other sites

Quote:

It seems as though the Media Request email is not sent until the Media Timeout expires. If I set the Media Request Timeout (MRT) to 12 hours then I don't see a MR email (presumably, for 12 hours). If I set the MRT to 6 minutes then I see an MR email 6 minutes after the script starts, followed by an error email at 12 minutes

 

 


That's the way it works, and pretty much has to in order to handle autoloaders and to let an operator see the dialog, insert the media, and avoid the email. The logic is pretty clear in the code in the "on MediaRequest" and "on MediaRequestTimedOut" functions. "MediaRequest" gets signalled when the media is needed, initializes variables, returns, allows the dialog to go up. When the first timeout occurs, MediaRequestTimedOut is signalled, sends the emails, flags that the emails were sent, returns false. When the second timeout occurs, MediaRequestTimedOut is signalled, sees that the emails have been sent, returns true, gives up.

 

So, set your Media Timeout timer to the length of time you wish to wait until the email is sent. After that amount of time has happened again after the email, the event handler will give up and the script will end. If you see the dialog before the first timeout and insert the media, then the email won't get sent and everything will move along.

 

It's behaving as expected.

 

Now, if you wish to change the behavior and say, have the email to punt time be 3x the media timeout, it's pretty easy to add a counter to MediaRequestTimedOut in the "else" of "if not gMediaRequestSent", and wait some multiple of timeouts before punting.

 

Hope this helps.

Link to comment
Share on other sites

OK, thanks. The script makes sense for a setup where the operator is by the machine but no sense at all where the server is in a rack in a server room and where it takes a couple of days for the tapes to fill

 

I'd like a zero wait for the email and about a 12 hour wait for timeout in case the timeout happens overnight. I will try editing the script for a 1 minute timeout and a 720 x wait for giving up. If I knew AppleScript a bit better I'd try setting a variable for each wait and making them editable in the header of the script

 

Nick Froome

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...