NBU status conditional for bpend_notify (Windows) script
Updated: 29 May 2010 | 2 comments
NBU 6.0MP4, single master/media server, Solaris 10
I am using the bpend_notify script on a Windows SQL server to delete SQL backup files after they have been backed up by NBU. I would now like to put in a conditional in the script so that the files will be deleted only if NBU has successfully backed them up. What parameter is passed to bpend_notify that indicates the status of the backup?
Thanks in advance for any information provided.
--Russell
discussion Filed Under:
Comments
"%5"
The list can be found on page 156 of the Admin Guide II:
VERITAS NetBackup (tm) 6.0 System Administrator's Guide for Windows, Volume 2
http://support.veritas.com/docs/279266
Here's a poorly formatted cut-n-paste:
Parameter
Description
%1
Name of the client from the NetBackup catalog.
%2
Policy name from the NetBackup catalog.
%3
Schedule name from the NetBackup catalog.
%4
One of the following: FULL, INCR, CINC, UBAK, UARC
%5
Status of the operation and is same as sent to the NetBackup server. This is 0 for successful backups and 1 for partially successful backups. If an error occurs, the status is the value associated with that error.
%6
Results file that NetBackup checks for a return code from the script. NetBackup uses %6to pass the file name and then expects the script to create the file in the same directory as the script. If the script applies to a specific policy and schedule, the results file must be named
Install_path\netbackup\bin\BPEND_RES.policy.schedule If the script applies to a specific policy, the results file must be named Install_path\netbackup\bin\BPEND_RES.policy If the script applies to all backups, the results file must be named Install_path\netbackup\bin\BPEND_RES An echo 0> %6 statement is one way for the script to create the file. NetBackup deletes the existing results file before calling the script. After the script runs, NetBackup checks the new results file for the status. The status must be 0 for the script to be considered successful. If the results file does not exist, NetBackup assumes that the script was successful.
P. 155-157 are the man pages for the entire section on bpend_notify.bat.
DISCLAIMER: I have never used these with anything but file system backups so I don't know how they work with, say, SQL backups. Give it a try and let us know how it goes!
FYI bpend_notify,
FYI bpend_notify, bpstart_notify, etc all must run quietly, i.e. you must ensure that no output is generated on stderr or stdout, i.e. no echo's, and any commands that generate output must piped off to another file or redirected to NUL - this is because any output is passed back to the calling bpbkar32 process and is interpreted as client data which can confuse/corrupt/abort your backup. The same is true on Unix. HTH
Would you like to reply?
Login or Register to post your comment.