Veritas-bu

[Veritas-bu] Easy question... (Netbackup Datacenter 3.4 UNIX)

2003-02-19 16:59:34
Subject: [Veritas-bu] Easy question... (Netbackup Datacenter 3.4 UNIX)
From: Mark.Donaldson AT experianems DOT com (Donaldson, Mark)
Date: Wed, 19 Feb 2003 14:59:34 -0700
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C2D862.2FDB21C0
Content-Type: text/plain;
        charset="iso-8859-1"

Here's a version that has cleaned-up output, marks the "cross mountpoint"
classes as such (makes a big difference on coverage), & self-determines the
version of Netbackup.
-M


#!/bin/ksh
NBPATH=/usr/openv/netbackup
export PATH=$PATH:$NBPATH/bin/admincmd
if [ -f $NBPATH/bin/admincmd/bpcllist ]
then
  CMD="bpcllist"
else
  CMD="bppllist"
fi
for client in `bpclclients -allunique -noheader | awk '{print $3}'`
do
  echo "\n## $client"
  $CMD -byclient $client |
     awk '$1=="CLASS" {cls=$2}
          $1=="INFO" { if ($10==0) {print "  " cls}
                      else {print "  " cls "\t(cross mountpoints)"} }
          $1=="INCLUDE" {print "    " $2}'
done
exit


Output looks like this (client is "##" line, class is 
single-indent, filesystems are double-indent):

## Mickey
  UNIX_OS
    /var
    /opt
    /export/home/
    /systems
    /
  UNIX_User
  UNIX_stg
    /stge
    /appl
  User  (cross mountpoints)

## Minnie
  UNIX_OS
    /var
    /opt
    /export/home/
    /systems
    /




------_=_NextPart_001_01C2D862.2FDB21C0
Content-Type: text/html;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2653.12">
<TITLE>RE: [Veritas-bu] Easy question... (Netbackup Datacenter 3.4 =
UNIX)</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>Here's a version that has cleaned-up output, marks =
the &quot;cross mountpoint&quot; classes as such (makes a big =
difference on coverage), &amp; self-determines the version of =
Netbackup.</FONT></P>

<P><FONT SIZE=3D2>-M</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>#!/bin/ksh</FONT>
<BR><FONT SIZE=3D2>NBPATH=3D/usr/openv/netbackup</FONT>
<BR><FONT SIZE=3D2>export PATH=3D$PATH:$NBPATH/bin/admincmd</FONT>
<BR><FONT SIZE=3D2>if [ -f $NBPATH/bin/admincmd/bpcllist ]</FONT>
<BR><FONT SIZE=3D2>then</FONT>
<BR><FONT SIZE=3D2>&nbsp; CMD=3D&quot;bpcllist&quot;</FONT>
<BR><FONT SIZE=3D2>else</FONT>
<BR><FONT SIZE=3D2>&nbsp; CMD=3D&quot;bppllist&quot;</FONT>
<BR><FONT SIZE=3D2>fi</FONT>
<BR><FONT SIZE=3D2>for client in `bpclclients -allunique -noheader | =
awk '{print $3}'`</FONT>
<BR><FONT SIZE=3D2>do</FONT>
<BR><FONT SIZE=3D2>&nbsp; echo &quot;\n## $client&quot;</FONT>
<BR><FONT SIZE=3D2>&nbsp; $CMD -byclient $client |</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp; awk =
'$1=3D=3D&quot;CLASS&quot; {cls=3D$2}</FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
$1=3D=3D&quot;INFO&quot; { if ($10=3D=3D0) {print &quot;&nbsp; &quot; =
cls}</FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else =
{print &quot;&nbsp; &quot; cls &quot;\t(cross mountpoints)&quot;} =
}</FONT>
<BR><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
$1=3D=3D&quot;INCLUDE&quot; {print &quot;&nbsp;&nbsp;&nbsp; &quot; =
$2}'</FONT>
<BR><FONT SIZE=3D2>done</FONT>
<BR><FONT SIZE=3D2>exit</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>Output looks like this (client is &quot;##&quot; =
line, class is </FONT>
<BR><FONT SIZE=3D2>single-indent, filesystems are =
double-indent):</FONT>
</P>

<P><FONT SIZE=3D2>## Mickey</FONT>
<BR><FONT SIZE=3D2>&nbsp; UNIX_OS</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; /var</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; /opt</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; /export/home/</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; /systems</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; /</FONT>
<BR><FONT SIZE=3D2>&nbsp; UNIX_User</FONT>
<BR><FONT SIZE=3D2>&nbsp; UNIX_stg</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; /stge</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; /appl</FONT>
<BR><FONT SIZE=3D2>&nbsp; User&nbsp; (cross mountpoints)</FONT>
</P>

<P><FONT SIZE=3D2>## Minnie</FONT>
<BR><FONT SIZE=3D2>&nbsp; UNIX_OS</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; /var</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; /opt</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; /export/home/</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; /systems</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; /</FONT>
</P>
<BR>
<BR>

</BODY>
</HTML>
------_=_NextPart_001_01C2D862.2FDB21C0--