Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Killing a stalled UNIX backup 1

Status
Not open for further replies.

gringomike

Technical User
Aug 6, 2003
148
0
0
GB
Hi all,

I'm new to netbackup so please excuse me if the question seems overly simple....

I'm trying to kill a UNIX (Solaris) backup but do not want to stop the netbackup services or reboot the machine. Is there a simple way to do this? I don't have access to the GUI and I can't seem to find an option in bpadm or xbp to kill the jobs.

Help!

GM
 
I think you can do it via CLI with the bpdbjobs command (not sure).

Hope this helps !
 
Thanks for the reply.

I've tried using this command already but it doesn't have any effect. I've passed it the -cancel, -delete and -kill switches but the jobs still show up as active.

It looks like I may have to reboot the server after all unless anybody has any other ideas.....

GM
 
Hi

Have you tried;-

/usr/openv/netbackup/bin/admincmd/bpdbjobs -cancel -M [master_server] [job_id]

Hope this helps :)
 
Hi,

I hadn't used the -M switch. Is it alot different to running the /usr/openv/netbackup/bin/admincmd/bpdbjobs command without it?

Thanks

GM
 
As far as I'm aware it's mainly for if you have multiple Master servers and by using the -M option you are saying cancel this job id thats currently running on this particular Master.

It wouldn't do any harm to give your request a little push by actually specifying the Master server.
 
Great, I'll give that a try next time!

Thanks again,

GM
 
I am busy writing up a script to kill active jobs that are not going anywhere.

I have not finished it yet but basically you will be running the following commands:
echo "Job ID: "$LINE >> $TMPF
$BPDIR/bpdbjobs |grep $LINE |awk '{print "Schedule: "$5}' >> $TMPF
$BPDIR/bpdbjobs |grep $LINE |awk '{print "Policy: "$6}' >> $TMPF

The first section brings back the information to verify that it is actually the job that you want to kill.

ls $DBLOGS/ffilelogs/$LINE.* >> $TMPF
ls $DBLOGS/trylogs/$LINE.* >> $TMPF
ls $DBLOGS/restart/$LINE.* >> $TMPF

The $LINE variable is a line that contains the Job id from a text file that you would modify. This gets all the information on any open files from the master.

PROCESS=$DBLOGS/trylogs/$LINE.t
grep -e MainPid -e ActivePid -e RqstPid $PROCESS |awk '{print $2}' >> $PROCESS_IDS
This is the most confusing for people and the main reason jobs will not die ... Active PID's associated with the job. In this step I am checking for any active pid's and outputting the ID's to a file which will then be used to performa KILL statement on each PID.

As I said, not finished yet as it is still being tested to get things int he right order.
 
hi,

have you installed and tried launching its jave console?
we'll try that first for ease.


thanks.
 
Thanks for all the replies.
The problem I have is that jobs still show as active (with a process id) but when doing a "ps -ef |grep PID" nothing is returned.
I think thats why the "bpdbjobs" command doesn't work and I'm not sure the script from PGPhantom will work either.

All the same, thanks again!

GM
 
Have you checked the trylogs/<log_id>.t file to get the PID numbers? Every job has numbers PID's recorded here on the master server.
 
Looking thru past notes I found this info for getting rid of stalled backups (relates to 3.4 but, should be the same I think).

1. Make sure no other jobs are ready to start and REAL active jobs aren't running.
2. Note the jobid numbers for each of the 'hanging' jobs.
3. Stop the daemons if possible (NBU Daemons)
4. From the /usr/openv/netbackup/db/jobs db area, remove those jobid* numbers. Simply a ./jobid* will do the trick and remove all associated files as well.
5. Restart your NBU Daemons (initbprd)

But, unfortunately it involves restarting daemons ..which u didn't want to do :-(
 
Good advice, thanks everyone!

I'll have to wait for the problem to return but I have a feeling that the wait won't be too long!

I'll try out the tasks above from PGPhantom and birky then post my findings.......

Thanks again!

GM
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top