Video Screencast Help
Give us your opinion and win with Symantec! Please help us by taking this survey to tell us about your experience with Symantec Connect, so that we can continue to grow and improve.  Take the survey.

Need to Know how to run a bpStart_Notify script

Created: 12 Dec 2012 • Updated: 21 Dec 2012 | 2 comments
This issue has been solved. See solution.

Hi All,

Hi Guys,

I have netbackup 7.5.0.4 and One Master & Media Server with Window 2008 R2 Enterprise in my environment. I need to add one server to our backup environment.

Adding Server Requirement:

Server: Windows 2008
Netbackup going to install:  7.5.0.3

Need to stop the one application service in client and have to take backup and start the application service after backup completed.

Service to stop in client side:

C:\>NET STOP SavService
C:\>NET START SavService

Note Where I need to enter the above command in below script to stop the service and after sucessfullb backup. how to start the service. I am have no way to test the script. If any one knows please help me to how to add the command in the script.

Below is the script of bptart_notify.

@REM $Id: bpstart_notify.bat,v 1.3 2006/08/01 20:46:43 $
@REM ***************************************************************************
@REM * $VRTScprght: Copyright 1993 - 2012 Symantec Corporation, All Rights Reserved $ *
@REM ***************************************************************************
@REM ecpyrght
@REM
@REM
@REM bpstart_notify.bat
@REM
@REM   This script is called by NetBackup when bpbkar is started up on the client
@REM   to do a backup or archive.
@REM
@REM This script receives 6 parameters:
@REM   %1 = CLIENT_NAME
@REM   %2 = POLICY_NAME
@REM   %3 = SCHEDULE_NAME
@REM   %4 = SCHEDULE_TYPE, one of the following: FULL, INCR, CINC, UBAK, UARC
@REM   %5 = STATUS, always 0
@REM   %6 = RESULT_FILE
@REM  
@REM   The script must reside in in the same directory as the rest of the NetBackup
@REM   client binaries (install_path\netbackup\bin\bpstart_notify.bat). 
@REM   It must also be executable by the root user.
@REM   Should exit with 0 upon successful completion
@REM
@REM Naming conventions:
@REM   There are three different versions of names that the scripts can use. 
@REM   The start notify script may use one version and the end notify script may use
@REM   another, or they can both use the same version.
@REM 
@REM   Substitute "policy" with the NetBackup policy being used and "sched" with the
@REM   schedule name.  "bpstart" can be substituted with "bpend".
@REM   bpstart_notify.policy.sched.bat
@REM   bpstart_notify.policy.bat
@REM   bpstart_notify.bat 
@REM 
@REM Result files:
@REM   The result file names will be dependant on the script file names. 
@REM   Example:
@REM   Script name:                         Result file name:
@REM   bpstart_notify.policyA.schedB.bat    BPSTART_RES.policyA.schedB
@REM   bpstart_notify.policyB.bat           BPSTART_RES.policyB
@REM   bpend_notify.bat                     BPEND_RES
@REM     
@REM CAUTION: Writing anything to stdout or stderr will cause backup problems.
@REM          Output should be redirected to the results files.
@REM
@REM --------------------------------------------------------------------
@REM main script starts here
@REM This is a simple script that records what kind of backup will be done along
@REM with other relevent information (Client name, policy name, etc) and
@REM appends the information to the results file
@REM --------------------------------------------------------------------
@if "%4" == "FULL" goto FULL
@if "%4" == "CINC" goto CINC
@if "%4" == "" goto FAIL
@REM print a generic message since backup is neither full, nor cumulative incremental
@echo backup/restore started on %1 using policy %2 with schedule %3 and status %5, bpres = %6 >> bin\BP_RES.txt
@echo 0 >> %6
@GOTO :EOF
@REM exit 0
:FULL
@echo full backup started on %1 using policy %2 with schedule %3 and status %5, bpres = %6 >> bin\BP_RES.txt
@echo 0 >> %6
@GOTO :EOF
@REM exit 0
@:CINC
@echo cumulative incremental backup started on %1 using policy %2 with schedule %3 and status %5, bpres = %6 >> bin\BP_RES.txt
@echo 0 >> %6
GOTO :EOF
@REM exit 0
:FAIL
@REM no schedule type information was sent.  A failure has occured.  Write status 1 to results files.
@echo 1 >> %6
@GOTO :EOF
@REM exit 0

Comments 2 CommentsJump to latest comment

Nicolai's picture

http://www.symantec.com/docs/TECH52762

@REM --------------------------------------------------------------------

@REM main script starts here

@REM This is a simple script that records what kind of backup will be done along

@REM with other relevent information (Client name, policy name, etc) and

@REM appends the information to the results file

@REM --------------------------------------------------------------------

C:\>NET STOP SavService

@if "%4" == "FULL" goto FULL

@if "%4" == "CINC" goto CINC

@if "%4" == "" goto FAIL

And in the bpnotify_end.bat you put C:\>NET START SavService start

Assumption is the mother of all mess ups.

If this post answered your'e qustion -  Please mark as a soloution.

SOLUTION
Soap Raj's picture

Hi Nicolai

Thank you for you assitance and one thing we got confused due to windows 2008 OS.

In windows 2008 R2 OS, no need to save the bpstart_notify.Policyname.bat instead of that we can save as bpstart_notify.Policyname is enough as it automaticy saving as bat file. NOW my script is working fine without any issues.