cancel
Showing results for 
Search instead for 
Did you mean: 

Netbackup 6.0 No email notifications for db backups

Dr_MAQ
Level 3
Accredited Certified
 
Hi,
 
Our customer has HP-UX based media server, where we've configured RMAN with Netbackup. This is a media server. Master server is a windows based machine.
They're facing a problem where they can't receive the email notifications for db backups only. other backup notifications are working properly.
 
Any suggestions ?
20 REPLIES 20

Dr_MAQ
Level 3
Accredited Certified
 
Still waiting for any input on this?

Nathan_Kippen
Level 6
Certified
What server is sending the mail?
 
 

Dr_MAQ
Level 3
Accredited Certified
Master server sends mail.

Omar_Villa
Level 6
Employee
Check your script maybe is excluding something or just including some jobs and not all what you need, because sounds like your mail configuration is working fine, but you are just missing a part of the report.
 
 
hope this helps.
regards

Stumpr2
Level 6
Somewhere from my deep, dark recesses of my mind I seem to hazily remember a thought that Oracle RMAN backups can not generate emails via NetBackup. I seem to possibly recall that NetBackup simply provides a tape for the backup and does not know when the last stream arrives as that is an RMAN function.
 
I may be wrong, but I haven't the time to research to prove myself wrong. Just thought I would throw this uncertain recollection out there and mybe someone can either verify or completely humble me in my old age.
 
Edited due to fat fingers not hitting the correct little keys on my laptop. I really need to get a larger second keyboard for my docking station.


Message Edited by Stumpr on 04-09-2008 12:23 PM

Dr_MAQ
Level 3
Accredited Certified
where and how to check that script is not skipping the policy?

Dr_MAQ
Level 3
Accredited Certified
 
Stumpr: Well I think, if veritas netbackup generates a job id for any running job based on any 3rd party agent helper (RMAN). There should be notification for its backup status. Again, since I havent' got any email-notification. i can't deny your understandings Smiley Happy
 
 

Stumpr2
Level 6


Dr.MAQ wrote:
 
Stumpr: Well I think, if veritas netbackup generates a job id for any running job based on any 3rd party agent helper (RMAN). There should be notification for its backup status. Again, since I havent' got any email-notification. i can't deny your understandings Smiley Happy


NetBackup does give a status of each stream that it is given to backup. it just doesn't know when the last stream runs as each stream is its own complete NetBackup image. Netbackup does not even know if all the required streamss were generated. NetBackup simply acts as a dumb gopher and gets a tape and writes the data given to it by rman.
 
But, then again, this is old technology and it is possible that the backup strategies have changed with newer RMAN versions.

 




Message Edited by Stumpr on 04-09-2008 12:54 PM

Omar_Villa
Level 6
Employee
Can u paste the script that you are using?

Dr_MAQ
Level 3
Accredited Certified
Here is the script; dbbackup_notify.cmd and it exists in /netbackup/bin of master server
 
 
@REM
@REM $Header: dbbackup_notify.cmd,v 1.2 2002/11/20 02:10:42 $
@REM
@REM bcpyrght
@REM ***************************************************************************
@REM * $VRTScprght: Copyright 1993 - 2006 Symantec Corporation, All Rights Reserved $ *
@REM ***************************************************************************
@REM ecpyrght
@REM
@REM dbbackup_notify.cmd
@REM
@REM this script is called by NetBackup after all NetBackup databases have
@REM been backed up and is passed
@REM
@REM this script:
@REM should be able to handle a list of parameter triplets:
@REM  media_type path_or_mediaID SUCCESS_or_FAIL
@REM media_type and path_or_mediaID may be UNKNOWN
@REM
@REM - Main program ------------------------------------------------------------
@REM -
@REM - This script only runs on NT 4.0 and succeeding versions of NT.  You must
@REM - have command extensions enabled.  Check the following registry entry:
@REM -
@REM - HKEY_CURRENT_USER\Software\Microsoft\Command Processor\EnableExtensions
@REM -
@REM - It should be set to 0x1 or you may have problems running this script.
@REM ---------------------------------------------------------------------------
@setlocal ENABLEEXTENSIONS
@set LISTPATHS="%~dp0\goodies\listpaths"
@for /F "delims=|" %%p in ('%LISTPATHS% /s NB_MAIL_SCRIPT') do @set NB_MAIL_SCRIPT="%%p"
@set OUTF="%~dp0\DBBACKUP_CALLED"
@set OKMSG=NetBackup databases backed up on
@set FAILMSG=NetBackup database backup FAILED to
@REM ---------------------------------------------------------------------------
@REM - Get date and time.
@REM ---------------------------------------------------------------------------
@for /F "tokens=1*" %%p in ('date /T') do @set DATE=%%p %%q
@for /F %%p in ('time /T') do @set DATE=%DATE% %%p
@REM ---------------------------------------------------------------------------
@REM - Check for proper parameter use.
@REM ---------------------------------------------------------------------------
@if NOT "%3" == "" goto GoodParams
@echo %DATE% dbbackup_notify requires at least 3 parameters >> %OUTF%
@echo %DATE% dbbackup_notify requires at least 3 parameters
@goto EndMain
:GoodParams
@REM ---------------------------------------------------------------------------
@REM you may want to delete this file
@REM if the file's length becomes excessive
@REM if exist %OUTF% del %OUTF%
@REM ---------------------------------------------------------------------------
:MainLoop
@REM ---------------------------------------------------------------------------
@REM - Check that the first parameter if valid.
@REM ---------------------------------------------------------------------------
@if "%1" == "UNKNOWN" goto FirstParamGood
@if "%1" == "OPTICAL" goto FirstParamGood
@if "%1" == "TAPE" goto FirstParamGood
@if "%1" == "DISK" goto FirstParamGood
@REM ---------------------------------------------------------------------------
@REM - First parameter is bad, abort.
@REM ---------------------------------------------------------------------------
echo %DATE% invalid 1st param: %1 >> %OUTF%
@goto SendNotification
@REM ---------------------------------------------------------------------------
:FirstParamGood
@REM ---------------------------------------------------------------------------
@REM - Check third parameter to see if database backup was successful.
@REM ---------------------------------------------------------------------------
@if NOT "%3" == "SUCCESS" goto TryFailure
@echo %DATE% %OKMSG% %1 %2 >> %OUTF%
@goto EndMainLoop
:TryFailure
@REM ---------------------------------------------------------------------------
@if NOT "%3" == "FAIL" goto ThirdParamBad
@echo %DATE% %FAILMSG% %1 %2 >> %OUTF%
@goto EndMainLoop
:ThirdParamBad
@REM ---------------------------------------------------------------------------
@REM - Third parameter is bad, abort.
@REM ---------------------------------------------------------------------------
@echo %DATE% invalid 3rd param: %3 >> %OUTF%
@goto SendNotification
:EndMainLoop
@shift /1
@shift /1
@shift /1
@if "%1" == "" goto SendNotification
@if NOT "%3" == "" goto MainLoop
@REM ---------------------------------------------------------------------------
@REM - improper.  parameters must be in triplets.
@echo %DATE% invalid parameter(s): %* >> %OUTF%
@REM ---------------------------------------------------------------------------
:SendNotification
@REM ---------------------------------------------------------------------------
@REM - might want to mail this info to someone
@REM -
@REM - @call %NB_MAIL_SCRIPT% someone_who_cares "NetBackup db backup" %OUTF%
@REM ---------------------------------------------------------------------------
:EndMain
@endlocal
@REM - End of Main Program -----------------------------------------------------
 
 
 
 
 

Dr_MAQ
Level 3
Accredited Certified
Further to my last reply containing the dbbackup_notify.cmd contents, I have tested this script execution by command prompt, and found following output.
 
'This script requires atleast 3 paramerters'
 
may by it helps
 
 
Regards,

Allen_K
Level 6
Relocated to a new thread of it's own.

Stumpr2
Level 6


Dr.MAQ wrote:
 
Hi,
 
Our customer has HP-UX based media server, where we've configured RMAN with Netbackup. This is a media server. Master server is a windows based machine.
They're facing a problem where they can't receive the email notifications for db backups only. other backup notifications are working properly.
 
Any suggestions ?


The script you posted in this thread has noting to do with RMAN oracle backups on NetBackup clients.
The script you posted has to do with the NetBackup catalog backup.

Stumpr2
Level 6
I don't like it when I am the one to have to prove myself wrong. Smiley Indifferent
 
Checkout the following files for email notification for Oracle
# find /usr/openv/netbackup/bin/goodies -type f -exec grep -il oracle {} \;
/usr/openv/netbackup/bin/goodies/README
/usr/openv/netbackup/bin/goodies/db_begin_bkup
/usr/openv/netbackup/bin/goodies/db_end_bkup
/usr/openv/netbackup/bin/goodies/db_begin_streams
/usr/openv/netbackup/bin/goodies/db_end_streams
You're bound to find something useful there.

Dr_MAQ
Level 3
Accredited Certified
 
Are these file exists in /goodies directory by default? ; Should these be moved to /netbackup/bin directory to be triggered or there's any other requirement too?

Stumpr2
Level 6
 
Are these file exists in /goodies directory by default?
yes
 
Should these be moved to /netbackup/bin directory to be triggered
yes
 
 Are there any other requirement too?
yes, modify the scripts for your environment

Dr_MAQ
Level 3
Accredited Certified
 
Thanks, I will get back after checking these from my client-site

Dr_MAQ
Level 3
Accredited Certified
There were no such files in /bin directory; after moving these to /bin directory, can you please describe me what exact changes are required to these sript files for db email activication?
 
 

Dr_MAQ
Level 3
Accredited Certified
Hi,
 

I am thankful to everyone who participated in my 'thread' and get it resolved.
 
Stumper: Can you please let me know, weather this script requires any changes to be configured to sent successful db backup nofifications ?
 
 
 
Thanks again.