Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to enable NB DC 3.4.2 to sound an alarm on backup failure? 1

Status
Not open for further replies.

AlexChao

Technical User
May 16, 2003
44
SG

Our Data Center staff often discovered the backup failure hours after the failure had occurred.

It will be great if NB can sound an audio or flash a visual alarm to alert the Data Center staff.

Anyone out there knows how to do this ?
 
I will be interested to use this feature if there is one available.

Sekhar.
 
One way coulb be to modify the default "Backup_exit_notify" notification script.
The fifth parameter returned to that script is the errorlevel so you can test this value like that :

=========================================

@if "%5" gtr "1" goto SendMail
@goto end
:SendMail
@call %NB_MAIL_SCRIPT% destinataire@dest.com "NetBackup Fin Client %1 Flux %6 Policy %2 Schedule %3 en Erreur %5" %OUTF%
@goto end
:end

=========================================

Then, instead of calling the default "nbmailscript" you can maybe add another command which launch a program reading the "music file".
 
Hi sdeb,

I have no knowledge in scripting (for use in my NT Master Server). But what kind of script is this...I will get a book to read-up.

Cheers!
Alex
 
This script is located in the :

"\Program files\VERITAS\Netbackup\bin" directory.

It is called each time a backup ends (and when mail notifications are configured).

By modifying the lines specified above the script will be able to notify only when errors occures and will launch the :

@call %NB_MAIL_SCRIPT% destinata.... script.

You can modify this command line by another one calling something that can read a sound file (I'll try... but I'm short in time so...).

This script must be explained in the admin guide (mail notifications or something like that).

Hopes this helps.
 
I've tested it with an "active session" of MS W2K and it works fine. (You should also try with a closed session).

Replace the last lines of your "backup_exit_notify" script such as shown below.

Windows Media Player must be installed to read the sound file. And the path to the wav file should be replaced by one (already) existing on your OS.


=====================================================
@REM - might want to mail this info to someone
@REM -

@if "%5" gtr "1" goto Alarm
@goto endnotif
:Alarm
@c:\temp\DingDong.wav
@c:\winnt\system32\net send 127.0.0.1 "Error %5"
@goto endnotif
:endnotif


:EndMain
@endlocal
@REM - End of Main Program ---------------------------------
 
sdeb,

Sometimes, a backup just hung. It would not return anything for the backup_exit_notify script to be activited.

Is it possible to put in a timer (one for each backup class)in the script such that if the backup (for each class) exceeded the normal duration of backup, an alarm would be activated by the script on the Java Client?
 
Maybe... but you're going to decide what is the normal duration of the backup.

You could try with PRE/POST Commands (Should be in the admin guide).

PRE/POST should be created on the client, and could run for all / specific SCHEDULE/CLASS backups :

PRE

bpstart_notify.bat => All backups
bpstart_notify.class1.bat => Only Class1 backups
bpstart_notify.class1.sched1.bat => Only Class1/Sched1 back.

POST

bpend_notify.bat => All backups
bpend_notify.class1.bat => Only Class1 backups
bpend_notify.class1.sched1.bat => Only Class1/Sched1 back.


Then you can put everything in those scripts (there will be at least one script for each client...).

On a "logical" point of vue you could do something like that:

==========================================================
PRE COMMAND

Creation of a task wich will launch an alarm in 2 hours.
Get the Process ID of that task or specify it.

POST COMMAND

Kill the task before it launch an alarm.

==========================================================

So if the post command never runs the alarm will be launched.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top