cancel
Showing results for 
Search instead for 
Did you mean: 

Have policy launch custom script.

Anthony_Valuika
Level 3
I need to run a script before and after my backup runs. I have looked through the manual and cannot find a way for the policy to run a script first before the policy starts the backup. Can this be done?
 
Thanks
 
1 REPLY 1

Stumpr2
Level 6
DOCUMENTATION:Veritas NetBackup (tm) notification scripts and their usage
 
Manual:
NetBackup DataCenter 4.5 System Administrator's Guide for Windows, Page: N/A
Veritas NetBackup 5.0 System Administrators Guide for Windows, Volume I, Page: N/A
Veritas NetBackup 5.1 System Administrators Guide for Windows, Volume I, Page: N/A
Veritas NetBackup 6.0 System Administrators Guide for Windows, Volume I, Page: N/A

Modification Type: Supplement

Modification:
Veritas NetBackup (tm) comes packaged with a number of script files that provide information on the different stages of backup jobs and other aspects of its functionality.
The bulk of the .cmd\.bat script files can be found on the NetBackup master server in the <install_path>\VERITAS\NetBackup\bin directory.

Additional .cmd\.bat files can be found in the <install_path>\VERITAS\NetBackup\bin\goodies directory.

For these files to work, they must reside in the <install_path>\VERITAS\NetBackup\bin directory. For the files in the \goodies directory, the original files should be copied to the \bin directory.

Note: Veritas does not support any scripts that are modified from the default NetBackup script provided.
The scripts listed can be adapted to provide an added service to the NetBackup program, however, these modifications will not be supported, and a default copy of the script must be available at all times to aid troubleshooting problems.

Scripts

netbackup\bin\backup_notify.cmd
- This script is called when a backup image is completed
- This script receives one parameter: the program and the backup image name or path

netbackup\bin\backup_exit_notify.cmd
- This script is called when a backup is completed
- This script receives six parameters
%1 = CLIENT           - the client hostname
%2 = POLICY           - the policy label
%3 = SCHEDULE         - the schedule label
%4 = SCHEDULE_TYPE    - the type of schedule:  FULL INCR UBAK UARC
%5 = STATUS           - the backup status for this job
%6 = STREAM           - the backup stream number for this job

netbackup\bin\goodies\bpstart_notify.bat
- This script is called when bpbkar is started for a client backup
- This script receives six parameters
%1 = CLIENT_NAME
%2 = POLICY_NAME
%3 = SCHEDULE_NAME
%4 = SCHEDULE_TYPE, one of the following: FULL, INCR, CINC, UBAK, UARC
%5 = STATUS, always 0
%6 = RESULT_FILE

netbackup\bin\goodies\bpend_notify.bat
- This script is called when bpbkar is finished with a backup job
- During an archive this script is called after the backup is complete and before the files are deleted
- This script receives six parameters:
%1 = CLIENT_NAME
%2 = POLICY_NAME
%3 = SCHEDULE_NAME
%4 = SCHEDULE_TYPE, one of the following: FULL, INCR, CINC, UBAK, UARC
%5 = Status of backup
%6 = RESULT_FILE

netbackup\bin\session_notify.cmd
- This script is called each time at least one regularly scheduled backup completes
- This script receives no parameters

netbackup\bin\session_start_notify.cmd
- This script is called prior to any backup or archive jobs
- This script receives no parameters

netbackup\bin\nbmail.cmd
- This script is used to configure email alerts when a job completes.
- This script receives three parameters.
%1 = recipient's email address
%2 = the subject line of the email to be sent
%3 = the file to put into the body of the email
For NetBackup 6.0 there is an additional option
%4 = the attached file name

netbackup\bin\dbbackup_notify.cmd
- This script is called after all databases have been backed up
- This script receives no parameters.

netbackup\bin\userreq_notify.cmd
- This script is called when BPRD gets list, backup, archive, or restore request
- This script receives three parameters.
%1 = operation requested
%2 = client who requested the operation
%3 = user who initiated the request

netbackup\bin\diskfull_notify.cmd
- This script is useful if a disk reaches capacity. This script can be used to remove old files to free up space.  By default this script will cause the operation to suspend for 5 minutes and then retry.
- This script is called when a disk in full condition is encountered
- This script receives two parameters.
%1 = program name (bpdm or bptm)
%2 = image file being written

netbackup\bin\restore_notify.cmd
- This script is called when a restore, verify, duplicate, or import is attempted
- This script receives one triplet parameter
%1 = program name (bptm or bpdm) the image name and the operation requested