Forum Discussion

kybeer's avatar
kybeer
Level 5
12 years ago

Stop running duplication jobs with CLI / script

Hi!

I need to write a script that stops running duplication jobs in Netbackup 7.5.0.4. I have used bpdbjobs several times to cancel specific jobs, but the duplication jobs tends not to get cancelled (backup jobs do). All our duplication jobs are to tape library, and I don't know if that's the reason it's not working properly. Are there any specific CLI tools for this in Netbackup?

The script will be used to shut down stuff in Netbackup via our APC UPS software, in case of a power failure. If the duplication jobs doesn't end correctly our tape device usualy becomes "down" in Netbackup after a reboot.

 

regards

Johan Lundgren

  • Yes, it is worth running thje bpdbjobs -kill_all a couple of times as some take a while to die off so it doesn't hurt to run it a couple of times.

    The bpschedule command adds an exclusion date to you DSSU schedule window so if you do that as todays date it will not try to run again while you are killing stuff off

    Once you are all sorted you can remove the exclusion to let things run again

  • They should stop using the Job ID, i have not experienced issue like that unless they are GRT duplications (exchange etc) which will not stop unless you kill the nblbc process (pretty sure it is that one) followed by the bpbrm / bptm processes which make the job die within about 5 minutes (or at least respond to a cancel request).

    You should also make all SLPs inactive so that everything does not just kick straight back in again.

    If in doubt I guess you could kill of all bptm and bpbrm processes, make SLPs inactive and issue a cancel all jobs - that should do the trick as at least NetBackup knows jobs have terminated and issues the unwind / unmount on the tapes.

     

  • Addition to Marks post:

    Prevent SLP from starting more jobs:

    nbstlutil active | inactive [-wait | -force] [[-lifecycle name [-destination name] | -backupidvalue]

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

    For scripting you will need to use the -wait parameter else deactivating will sometime fail.

  • Thanks for the reply!

    We don't use SLP (at least there are nothing under Storage / Storage Lifecycle Policies). The Media/Master server is running Windows 2008R2. Do you know if bptm is NetBackup Enterprise Media Manager (nbemm.exe) - I guees I can close that with bpdown... Or on the other hand, I have four bptm running ATM. Maybe I should just use pskill to termnate them, and then cancel all jobs with bpdbjobs -kill_all ? Currently I don't have any running bpbrm.

     

    regards

    Johan

  • If you have bptm's running then kill them, followed by a jobs kill all as you said

    I would add a pause in here though to allow NetBackup to appreciate the loss of its bptm process and handle the dismount of the tapes - so 5 minutes between the bptm kill of and the job kill off - and you may want to run the job one two or three time

    After that a bpdown should be OK as long as nothing else has kicked in in the meantime - all a juggling act, but we dont want to leave tapes in the drives

    I assume then that you are using disk staging so could run a bpschedule command first with the -excl mm/dd/yyyy switch (using the current date) to add an exclusion to the dssu first, that way you know that no more will automatically re-run

    Hope this helps

  • Thanks for the tip about the pause between pskill and bpdbjobs -kill_all. Also, do you mean that I should run bpdbjobs -kill_all a couple of time?

    I'm not very familiar with bpschedule... Is your suggestion that I exclude all the backups for the current date with that command?

     

  • Yes, it is worth running thje bpdbjobs -kill_all a couple of times as some take a while to die off so it doesn't hurt to run it a couple of times.

    The bpschedule command adds an exclusion date to you DSSU schedule window so if you do that as todays date it will not try to run again while you are killing stuff off

    Once you are all sorted you can remove the exclusion to let things run again