Video Screencast Help

Stop running duplication jobs with CLI / script

Created: 05 Feb 2013 • Updated: 10 Apr 2013 | 6 comments
This issue has been solved. See solution.

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

Discussion Filed Under:

Comments 6 CommentsJump to latest comment

Mark_Solutions's picture

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.

 

Authorised Symantec Consultant

Don't forget to "Mark as Solution" if someones advice has solved your issue - and please bring back the Thumbs Up!!.

kybeer's picture

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

Nicolai's picture

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.

Assumption is the mother of all mess ups.

If this post answered your'e qustion -  Please mark as a soloution.

Mark_Solutions's picture

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

Authorised Symantec Consultant

Don't forget to "Mark as Solution" if someones advice has solved your issue - and please bring back the Thumbs Up!!.

kybeer's picture

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?

 

Mark_Solutions's picture

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

Authorised Symantec Consultant

Don't forget to "Mark as Solution" if someones advice has solved your issue - and please bring back the Thumbs Up!!.

SOLUTION