cancel
Showing results for 
Search instead for 
Did you mean: 

bpend notify script is throwing 127

ajiwww
Level 4

Hello All,

Created bpend notify script to start one vault soon after the backup. Below are the details;

-rwxrwxrwx    1 root     system          126 Feb 21 11:47 /usr/openv/netbackup/bin/bpend_notify.1_time_Memphis_Unix

 

bash-3.00# more /usr/openv/netbackup/bin/bpend_notify.1_time_Memphis_Unix
echo `date` > ejection.log.$DATE
DATE=`date +%m%d%Y`
echo $DATE
bpbackup -i -p TLD3_Vault_Catalog_Eject >> ejection.log.$DATE

 

The script is not triggering the vault policy after completion of backup. bpbkar is shwoing below error;

 

12:44:15.530 [3428438] <4> bpbkar: INF - Client completed sending data for backup
12:44:15.544 [3428438] <4> bpbkar: INF - bpbkar exit normal
12:44:15.544 [3428438] <4> bpbkar: INF - EXIT STATUS 0: the requested operation was successfully completed
12:44:15.545 [3428438] <4> bpbkar: INF - setenv FINISHED=1
12:44:15.545 [3428438] <4> bpbkar: INF - START bpend_notify
12:44:15.545 [3428438] <4> bpbkar: /usr/openv/netbackup/bin/bpend_notify.1_time_Memphis_Unix memcf-master 1_time_Memphis_Unix full FULL 0
12:44:15.567 [3428438] <4> bpbkar: INF - END bpend_notify
12:44:15.568 [3428438] <16> bpbkar: ERR - bpend_notify returned 127

 

When execute script manually, its triggering the vault policy. The script is running on the master itself. Purpose is to run the vault for ejection soon after the completion of catalog backup.

 

Below are details of master server;

AIX memcf-master 3 5 00C85B0F4C00

NetBackup-AIX5 6.5.6

1 ACCEPTED SOLUTION

Accepted Solutions

Marianne
Level 6
Partner    VIP    Accredited Certified

Maybe consider parent_end_notify script on the master instead:


NetBackup calls the parent_end_notify script each time a parent job ends.
NetBackup passes the following parameters to the script:
clientname     Name of the client from the NetBackup catalog.
policyname    Policy name from the NetBackup catalog.
schedname    Schedule name from the NetBackup catalog.
schedtype    One of the following: FULL, INCR (differential incremental), CINC (cumulative incremental), UBAK, UARC
status      Exit code for the entire backup job.
stream    The stream number is always -1.

 

Because parent_end runs after each parent job, add an entry to only run after the catalog backup.
JH has shared her script in this post: https://www-secure.symantec.com/connect/forums/netbackup-656-saving-dr-file-tape#comment-4543891

So, your parent_end_notify will then start with something like this:

if [ $2 = "Catalog-policy-name" ]

then

<rest of your script>

View solution in original post

3 REPLIES 3

Marianne
Level 6
Partner    VIP    Accredited Certified

Try to add full paths for commands and output files.

So, replace bpbackup with /usr/openv/netbackup/bin/bpbackup

and

ejection.log.$DATE with /PATH/ejection.log.$DATE

You should change these two lines around (you cannot use a variable before defining it):

echo `date` > ejection.log.$DATE
DATE=`date +%m%d%Y`

Also remove this line (used for testing?):

echo $DATE

Ensure that bpend_notify timeout is increased - the default is 5 minutes.

ajiwww
Level 4

Thanks Marianne, it does helps. Its initiating the vault after catalog backup now.

Just one more help. Catalog is running with more than one stream. The bpend script triggers after the completion of first stream itself. I need that to be run after the completion of catalog parent job only.

Marianne
Level 6
Partner    VIP    Accredited Certified

Maybe consider parent_end_notify script on the master instead:


NetBackup calls the parent_end_notify script each time a parent job ends.
NetBackup passes the following parameters to the script:
clientname     Name of the client from the NetBackup catalog.
policyname    Policy name from the NetBackup catalog.
schedname    Schedule name from the NetBackup catalog.
schedtype    One of the following: FULL, INCR (differential incremental), CINC (cumulative incremental), UBAK, UARC
status      Exit code for the entire backup job.
stream    The stream number is always -1.

 

Because parent_end runs after each parent job, add an entry to only run after the catalog backup.
JH has shared her script in this post: https://www-secure.symantec.com/connect/forums/netbackup-656-saving-dr-file-tape#comment-4543891

So, your parent_end_notify will then start with something like this:

if [ $2 = "Catalog-policy-name" ]

then

<rest of your script>