cancel
Showing results for 
Search instead for 
Did you mean: 

Kill bpbkar after 4 hours

Netbackup_fan
Level 5

Hi experts.

 

I need to terminate the backup if it does not finished in 4 hours so that our script can start the database.

When we cancel manually via the console the coldbackup script continues and starts the database, but I need to create another script to verify automatically the timing.

 

Can I just kill the bpbkar process?

 

PARAM9=! ps -ef| grep -v grep | grep bpbkar|wc -l
if [[ $PARAM9  -gt 0 ]] ; then
  kill -9 $(ps -ef | grep -v grep | grep bpbkar | awk '{print $2}')
fi
 

1 ACCEPTED SOLUTION

Accepted Solutions

RamNagalla
Moderator
Moderator
Partner    VIP    Certified

yes, you can do that and in this case your backup will fail with EC 50.

View solution in original post

3 REPLIES 3

RamNagalla
Moderator
Moderator
Partner    VIP    Certified

yes, you can do that and in this case your backup will fail with EC 50.

Netbackup_fan
Level 5

Thank you!

Nicolai
Moderator
Moderator
Partner    VIP   

do a kill -1 PID or kill -2 PID

It's a more gracefull way to stop bpbkar than kill -9