Veritas-bu

Re: [Veritas-bu] How to identity Status of a backup using Netbackup CLI ?

2013-08-22 13:01:54
Subject: Re: [Veritas-bu] How to identity Status of a backup using Netbackup CLI ?
From: Bluejay Adametz <bluejay AT fujifilm DOT com>
To: "VERITAS-BU AT mailman.eng.auburn DOT edu" <VERITAS-BU AT mailman.eng.auburn DOT edu>
Date: Thu, 22 Aug 2013 13:01:47 -0400
> I launch 'bpbackup' command in my program and it just gives the return code.
> There is no way to know the corresponding JobId.

Could you use a backup_exit_notify script to capture what you're
looking for? I have good luck getting job IDs that way doing:

JOBID=`bperror -client $1 -hoursago 1 \
        | grep "POLICY $2" | grep "SCHED $3" | grep "EXIT STATUS $5" \
        | tail -n1 | awk '{print $6}'`

which, essentially, gets the job ID of the last job that finished for
the client, policy, and schedule for the job that the script is
running for (I know, I could probably collapse all those grep's into
one - this is an olde piece of code).

                                                         - Bluejay Adametz

"Snowflakes are one of nature's most fragile things, but
just look what they can do when they stick together."
                             - Vista M. Kelly

-- 


NOTICE: This message, including any attachments, is only for the use of the 
intended recipient(s) and may contain confidential and privileged information, 
or information otherwise protected from disclosure by law.  If the reader of 
this message is not the intended recipient, you are hereby notified that any 
use, disclosure, copying, dissemination or distribution of this message or any 
of its attachments is strictly prohibited.  If you received this message in 
error, please contact the sender immediately by reply email and destroy this 
message, including all attachments, and any copies thereof. 

_______________________________________________
Veritas-bu maillist  -  Veritas-bu AT mailman.eng.auburn DOT edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu

<Prev in Thread] Current Thread [Next in Thread>