Forum Discussion

NIKHIL234656595's avatar
13 years ago

bpstart_notify

what does bpstart_notify script and bpend_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

 

But what exactgly it does?

  • Basically it does what ever you want it to do.

    Until you edit the contents, it will do nothing,  The contents of the script(s) are not supported by this forum or Symantec, as the contents have nothing to do with NBU, as explained, it is just a script that runs, you write the script to do what you want.

    The ONLY invovement of NBU with these scripts, is as follows.

    If the script exists in the correct directory, and is names correctly (as explained below) NBU will run the start script at the beginning of the backup, and the end script when the backup has finished.

    What the script actually does, is up to you.  

    It is up to you to customise the script.

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

    You can control if it runs like this :

     Add a .policyname or a .policyname.schedule extension to the bpstart_notify and/or bpend_notify scripts

    So if my policy is called womble, the script would run for each client that has the scripts in the clients netbackup/bin dir....
    You would call the script:  bpstart_notify.womble
    If you only wanted it to run for full schedules and the schedule was called full ...
    bpstart_notify.womble.full
     
    Or put another way 
    By default, "bpstart_notify" and "bpend_notify" scripts apply to all NetBackup policies that the client belongs to. If you want them to run for a specific policy, rename the files to:

    Install_path\Veritas\NetBackup\bin\bpstart_notify.policyname.bat 
    Install_path\Veritas\NetBackup\bin\bpend_notify.policyname.bat

    To run the scripts for a specific schedule, rename the files to:
    Install_path\Veritas\NetBackup\bin\bpstart_notify.policyname.schedulename.bat 
    Install_path\Veritas\NetBackup\bin\bpend_notify.policyname.schedulename.bat 
     
    The script needs to go on the client, in this dir.
    <install_path>\VERITAS\NetBackup\bin  (or unix equiv).
     
    As you mention NBU passes parameters, these could be used if you wanted to say write to a custom log file when a backup started. eg. if the script contained.
    echo "Backup started for client %1 "  "in policy  %2" >logfile.txt
    when a backup for a clilent in the policy ran," Backup started for client <clientname>  in policy <policyname>" would be written to logfile.txt
     
    The contents and functionality of this script is not covered by this forum, these would be scripting questions.
    The usual use of the start/ end script might be to shut down an application on a client before the backup, and restart it afterwards.
    eg.
     
    bp.start would contain
     
    <commands to stop application>
     
    bp.end would contain 
    <commands to start application>
     

    Martin

  • These scripts are documents in the NetBackup Admin Guides I and II

  • Basically it does what ever you want it to do.

    Until you edit the contents, it will do nothing,  The contents of the script(s) are not supported by this forum or Symantec, as the contents have nothing to do with NBU, as explained, it is just a script that runs, you write the script to do what you want.

    The ONLY invovement of NBU with these scripts, is as follows.

    If the script exists in the correct directory, and is names correctly (as explained below) NBU will run the start script at the beginning of the backup, and the end script when the backup has finished.

    What the script actually does, is up to you.  

    It is up to you to customise the script.

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

    You can control if it runs like this :

     Add a .policyname or a .policyname.schedule extension to the bpstart_notify and/or bpend_notify scripts

    So if my policy is called womble, the script would run for each client that has the scripts in the clients netbackup/bin dir....
    You would call the script:  bpstart_notify.womble
    If you only wanted it to run for full schedules and the schedule was called full ...
    bpstart_notify.womble.full
     
    Or put another way 
    By default, "bpstart_notify" and "bpend_notify" scripts apply to all NetBackup policies that the client belongs to. If you want them to run for a specific policy, rename the files to:

    Install_path\Veritas\NetBackup\bin\bpstart_notify.policyname.bat 
    Install_path\Veritas\NetBackup\bin\bpend_notify.policyname.bat

    To run the scripts for a specific schedule, rename the files to:
    Install_path\Veritas\NetBackup\bin\bpstart_notify.policyname.schedulename.bat 
    Install_path\Veritas\NetBackup\bin\bpend_notify.policyname.schedulename.bat 
     
    The script needs to go on the client, in this dir.
    <install_path>\VERITAS\NetBackup\bin  (or unix equiv).
     
    As you mention NBU passes parameters, these could be used if you wanted to say write to a custom log file when a backup started. eg. if the script contained.
    echo "Backup started for client %1 "  "in policy  %2" >logfile.txt
    when a backup for a clilent in the policy ran," Backup started for client <clientname>  in policy <policyname>" would be written to logfile.txt
     
    The contents and functionality of this script is not covered by this forum, these would be scripting questions.
    The usual use of the start/ end script might be to shut down an application on a client before the backup, and restart it afterwards.
    eg.
     
    bp.start would contain
     
    <commands to stop application>
     
    bp.end would contain 
    <commands to start application>
     

    Martin

  • I thought this looked familiar - same question asked and answered 8 weeks ago:

    https://www-secure.symantec.com/connect/forums/bpstartnotify

    Come on NIKHIL!! You are dissapointing me - there are more scripts and and commands in NBU to query!!!
     

  • Hmm, at least I appear to have given the correct answer ...

    Funnily enough, I've never actually used them, I just read the manual and answered the question.

    M

  • I just read the manual and answered the question.

    Will we EVER convince NIKHIL to do the same??

    I have seen customers stopping databases (e.g. Oracle) with bpstart_notify and start again with bpend_notify.

    I have also seen users asking here for assistance with scripts that perform array snapshots and others for stopping DFS Replication.

    Unfortunately no Connect points for reading manuals or searching the forums.... indecision

  • It doesn't matter how it is run - via the scheduler, manually, GUI or command line  ...   For all it matters, Micky Mouse could run the backup.  The only condition is that the script exists on the client and is named as shown in the example.

    Martin