Veritas-bu

[Veritas-bu] Email reports

2005-04-20 12:44:27
Subject: [Veritas-bu] Email reports
From: KFreels AT askjeeves DOT com (Kevin Freels)
Date: Wed, 20 Apr 2005 09:44:27 -0700
Kristopher,

The -append option also requires the -file <filename> option; you don't
use a redirect (">>"). 

However, I don't know if this duplicates the data everyday since
bpdbjobs reports all the jobs in the retention period; if you report on
Monday, you get everything for the last n days, and on Tuesday you get
the same thing, *including* the stuff already reported. It would be nice
if you could specify the retention period to report.

The NBU SysAdmin Guide says that netbackup/db/config/behavior has
setting for the way bpdbjobs works, but I'm not sure what would need to
be changed. Anyone? Bueller?

Does anyone know what all the fields in the output of "bpdbjobs
-all_columns" are, i.e., what they represent (status, retention level,
etc)?

This is a small bit of perl that munges the report from "bpdbjobs
-all_columns" into a more readable format (see below). Very
Quick'n'Dirty(tm), but at least it was what I was looking for (sorta):

#!/usr/bin/env perl

# foo.txt is the output of "bpdbjobs -all_columns", you could pipe the
process instead
open(LOGFILE,"< ./foo.txt") ;

while(<LOGFILE>) {
    # Put the lines into an array
    push(@jobs, $_) ;
    }

foreach $entry (@jobs) {
    # We're only concerned about the FULL backups, not INCREMENTALS
    if ($entry =~ m/FULL/) {
        @line = split(/,/,$entry) ;
        # Print the hostname
        print "\n$line[6] \n";

        foreach $item (@line) {
            # If the item has a timestamp, print that
            if ($item =~ m/..\/..\/.. /) {
                print "  $item\n" ;
                }
            }
        }
    }

close;
exit;




The output looks a little like this (what you would see in the
"details"):

.
.
.
exchange04 FULL
  04/19/05 15:08:25 - started process bpbrm (16447)
  04/19/05 15:08:25 - connecting
  04/19/05 15:08:25 - connected; connect time: 000:00:00
  04/19/05 15:08:25 - started process bptm (16449)
  04/19/05 15:08:27 - mounting EXC306
  04/19/05 15:10:17 - mounted; mount time: 000:01:50
  04/19/05 15:10:28 - positioning EXC306 to file 1
  04/19/05 15:10:48 - positioned; position time: 000:00:20
  04/19/05 15:10:48 - begin writing
  04/19/05 21:54:42 - end writing; write time: 006:43:54

exchange04 FULL
  04/19/05 15:08:23 - started process bpbrm (16444)
  04/19/05 15:08:23 - connecting
  04/19/05 15:08:23 - connected; connect time: 000:00:00
  04/19/05 15:08:25 - started process bptm (16448)
  04/19/05 15:08:26 - mounting EXC191
  04/19/05 15:09:24 - mounted; mount time: 000:00:58
  04/19/05 15:09:25 - positioning EXC191 to file 2
  04/19/05 15:10:18 - positioned; position time: 000:00:53
  04/19/05 15:10:18 - begin writing
  04/19/05 19:54:44 - end writing; write time: 004:44:26
.
.
.


....k
-=-=-=-

-----Original Message-----
From: veritas-bu-admin AT mailman.eng.auburn DOT edu
[mailto:veritas-bu-admin AT mailman.eng.auburn DOT edu] On Behalf Of Williams,
Kristopher L
Sent: Tuesday, April 19, 2005 1:45 PM
To: Tim Berger; David Rock; veritas-bu AT mailman.eng.auburn DOT edu
Subject: RE: [Veritas-bu] Email reports

Is there a way to dump the bpdbjobs -all_columns info out to a file, say
after every backup, but if a job gets deleted out of activity monitor
not have it deleted from the dump?

I tried using the -append option of bpdbjobs but I didn't get it to work
right.

I first ran bpdbjobs -all_colums -append >>Somefile.txt

Then I deleted a job from activity monitor and ran the same command
again. It re-dumped the same information, but without the job I manually
deleted. If it were truly appending, then it would just add the new jobs
into somefile.txt and not delete the job I manually deleted. Make sense?


Is there a different way to do this that does work? 



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