Veritas-bu

[Veritas-bu] CMD Line

2003-03-26 04:38:49
Subject: [Veritas-bu] CMD Line
From: david AT datastaff DOT com (David A. Chapa)
Date: Wed, 26 Mar 2003 03:38:49 -0600
This is a multi-part message in MIME format.

------=_NextPart_000_001D_01C2F349.36E402F0
Content-Type: text/plain;
        charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

CMD Linewhy don't you just use bpflist?

I'm not in front of an NBU machine right now so I can't give you the exactly
cmd-line, but I would

1.  identify the backup IDs (BIDs) that exist on a tape
  <using Mark's example with bpimmedia should work>

2.  take those BIDs and run it through bpflist.

bpflist -backupid $BID -U

I think that should work.

David

<><><><><><><><><><><><><><><><><><><><>
David A. Chapa
DataStaff, Inc.
312-683-1144
http://www.BackupScripts.com

Co-Author of
Implementing Backup and Recovery:
The Readiness Guide for the Enterprise
published by John Wiley and Sons
A Veritas Solution Series Publication
ISBN:0471227145
---------------------------------------

  -----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 Donaldson, 
Mark
  Sent: Wednesday, March 26, 2003 2:04 PM
  To: 'O'Shea, Don'; Veritas-Bu (E-mail)
  Subject: RE: [Veritas-bu] CMD Line


  Sorry,  this one isn't a simple command-line function - you can get close.

  You can get images on a tape:
    bpimmedia -mediaid <tapenum>

  Filtered to only image ID's:
    bpimmedia -mediaid <tapenum> | awk '$1=="IMAGE" {print $4}'

  Take the imageid to bpimagelist to get the DB file:
    bpimagelist -backupid <bpid> | awk '$1=="IMAGE" {print $24}'

  Then go to the DB directly and query the files from there...
  /usr/openv/netbackup/db/images/<clientname>/<timestamp>/<db_file> (from
above).

  This will get you files in an image.  A problem is that an image can span
tapes, so this listing may include files on other tapes.  The fragment
information on bpimmedia could be used to limit to just fragments associated
with this tape number but as of yet, I haven't figured how to cross
reference fragment information to sets of files.

  Here's an (unix-based) example:

  $ bpimmedia -mediaid 000010 | awk '$1=="IMAGE" {print $4}'
  backup00.lodo.in.exactis.com_1047999896
  $ bpimagelist -backupid backup00.lodo.in.exactis.com_1047999896 | awk
'$1=="IMAGE" {print $24}'
  Oracle_list1p_1047999896_FULL.f
  $ cd /usr/openv/netbackup/db/images/backup00.lodo.in.exactis.com/1047*
  $ pwd
  /usr/openv/netbackup/db/images/backup00.lodo.in.exactis.com/1047000000
  $ zcat Oracle_list1p_1047999896_FULL.f.Z | awk '{print $10}'
  /
  /u00/
  /u00/list1p/
  /u00/list1p/arch/
  /u00/list1p/arch/list1p_1570.arc
  /u01/
  <snip>


  -M

    -----Original Message-----
    From: O'Shea, Don [mailto:Don.OShea AT emergis DOT com]
    Sent: Wednesday, March 26, 2003 12:24 PM
    To: Veritas-Bu (E-mail)
    Subject: [Veritas-bu] CMD Line


    Does anyone know what the command line command is to execute a report
that would give me exact files backed up to a specific tape. I am trying to
do it through the gui and it takes a long time and I have to do it for a
bunch of tapes. I don't have much time available so I was hoping I could set
of a bunch of instances and pipe it out to a file to distribute to a user.

    Thanks,

    Don O'Shea
    BCE Emergis Inc.
    (905)707-4000 Ext 3765

    The information contained herein, including any attachments, is
proprietary and confidential and is intended for the exclusive use of the
addressee. It also may contain privileged information and/or personal
information subject to privacy legislation. The authorized addressee of this
information, by its retention and use, agrees to protect the information
contained herein from loss, disclosure, theft or compromise with at least
the same care it employs to protect its own confidential information. Any
dissemination or use of this information by a person other than the intended
recipient is unauthorized and may be illegal. If you have received this
e-mail in error, please notify us immediately by reply e-mail and destroy
all copies.




------=_NextPart_000_001D_01C2F349.36E402F0
Content-Type: text/html;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>CMD Line</TITLE>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1141" name=3DGENERATOR></HEAD>
<BODY>
<DIV><SPAN class=3D425193509-26032003><FONT face=3DArial color=3D#0000ff =
size=3D2>why=20
don't you just use bpflist?</FONT></SPAN></DIV>
<DIV><SPAN class=3D425193509-26032003><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D425193509-26032003><FONT face=3DArial color=3D#0000ff =
size=3D2>I'm=20
not in front of an NBU machine right now so I can't give you the exactly =

cmd-line, but I would</FONT></SPAN></DIV>
<DIV><SPAN class=3D425193509-26032003><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D425193509-26032003><FONT face=3DArial color=3D#0000ff =

size=3D2>1.&nbsp; identify the backup IDs (BIDs) that exist on a=20
tape</FONT></SPAN></DIV>
<DIV><SPAN class=3D425193509-26032003><FONT face=3DArial color=3D#0000ff =
size=3D2>&nbsp;=20
&lt;using Mark's example with bpimmedia should =
work&gt;</FONT></SPAN></DIV>
<DIV><SPAN class=3D425193509-26032003><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D425193509-26032003><FONT face=3DArial color=3D#0000ff =

size=3D2>2.&nbsp; take those BIDs and run it through =
bpflist.</FONT></SPAN></DIV>
<DIV><SPAN class=3D425193509-26032003><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D425193509-26032003><FONT face=3DArial color=3D#0000ff =

size=3D2>bpflist -backupid $BID -U</FONT></SPAN></DIV>
<DIV><SPAN class=3D425193509-26032003><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D425193509-26032003><FONT face=3DArial color=3D#0000ff =
size=3D2>I=20
think that should work.</FONT></SPAN></DIV>
<DIV><SPAN class=3D425193509-26032003><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D425193509-26032003><FONT face=3DArial color=3D#0000ff =

size=3D2>David</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<P><FONT=20
size=3D2>&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;=
&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&=
lt;&gt;&lt;&gt;&lt;&gt;<BR>David=20
A. Chapa<BR>DataStaff, Inc.<BR>312-683-1144<BR><A=20
href=3D"http://www.backupscripts.com/"=20
target=3D_blank>http://www.BackupScripts.com</A><BR><BR>Co-Author=20
of<BR>Implementing Backup and Recovery:<BR>The Readiness Guide for the=20
Enterprise<BR>published by John Wiley and Sons<BR>A Veritas Solution =
Series=20
Publication<BR>ISBN:0471227145<BR>---------------------------------------=
</FONT>=20
</P>
<BLOCKQUOTE dir=3Dltr style=3D"MARGIN-RIGHT: 0px">
  <DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT =
face=3DTahoma=20
  size=3D2>-----Original Message-----<BR><B>From:</B>=20
  veritas-bu-admin AT mailman.eng.auburn DOT edu=20
  [mailto:veritas-bu-admin AT mailman.eng.auburn DOT edu]<B>On Behalf Of =
</B>Donaldson,=20
  Mark<BR><B>Sent:</B> Wednesday, March 26, 2003 2:04 PM<BR><B>To:</B> =
'O'Shea,=20
  Don'; Veritas-Bu (E-mail)<BR><B>Subject:</B> RE: [Veritas-bu] CMD=20
  Line<BR><BR></FONT></DIV>
  <DIV><SPAN class=3D514143519-26032003><FONT face=3DArial =
color=3D#0000ff=20
  size=3D2>Sorry,&nbsp; this one isn't a simple command-line function - =
you can=20
  get close.</FONT></SPAN></DIV>
  <DIV><SPAN class=3D514143519-26032003><FONT face=3DArial =
color=3D#0000ff=20
  size=3D2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=3D514143519-26032003><FONT face=3DArial =
color=3D#0000ff size=3D2>You=20
  can get images on a tape: </FONT></SPAN></DIV>
  <DIV><SPAN class=3D514143519-26032003><FONT face=3DArial =
color=3D#0000ff=20
  size=3D2>&nbsp; bpimmedia -mediaid &lt;tapenum&gt;</FONT></SPAN></DIV>
  <DIV><SPAN class=3D514143519-26032003><FONT face=3DArial =
color=3D#0000ff=20
  size=3D2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=3D514143519-26032003><FONT face=3DArial =
color=3D#0000ff=20
  size=3D2>Filtered to only image ID's:</FONT></SPAN></DIV>
  <DIV><SPAN class=3D514143519-26032003><FONT face=3DArial =
color=3D#0000ff=20
  size=3D2>&nbsp; bpimmedia -mediaid &lt;tapenum&gt; | awk =
'$1=3D=3D"IMAGE" {print=20
  $4}'</FONT></SPAN></DIV>
  <DIV><SPAN class=3D514143519-26032003><FONT face=3DArial =
color=3D#0000ff=20
  size=3D2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=3D514143519-26032003><FONT face=3DArial =
color=3D#0000ff size=3D2>Take=20
  the imageid to bpimagelist to get the DB file:</FONT></SPAN></DIV>
  <DIV><SPAN class=3D514143519-26032003><FONT face=3DArial =
color=3D#0000ff=20
  size=3D2>&nbsp; bpimagelist -backupid &lt;bpid&gt; | awk =
'$1=3D=3D"IMAGE" {print=20
  $24}'</FONT></SPAN></DIV>
  <DIV><SPAN class=3D514143519-26032003><FONT face=3DArial =
color=3D#0000ff=20
  size=3D2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=3D514143519-26032003><FONT face=3DArial =
color=3D#0000ff size=3D2>Then=20
  go to the DB directly and query the files from =
there...</FONT></SPAN></DIV>
  <DIV><SPAN class=3D514143519-26032003><FONT face=3DArial =
color=3D#0000ff=20
  =
size=3D2>/usr/openv/netbackup/db/images/&lt;clientname&gt;/&lt;timestamp&=
gt;/&lt;db_file&gt;=20
  (from above).</FONT></SPAN></DIV>
  <DIV><SPAN class=3D514143519-26032003><FONT face=3DArial =
color=3D#0000ff=20
  size=3D2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=3D514143519-26032003><FONT face=3DArial =
color=3D#0000ff size=3D2>This=20
  will get you files in an image.&nbsp; <EM>A problem is that an image =
can span=20
  tapes, so this listing may include files on other tapes.</EM>&nbsp; =
The=20
  fragment information on bpimmedia could be used to limit to just =
fragments=20
  associated with this tape number but as of yet, I haven't figured how =
to cross=20
  reference fragment information to sets of files.</FONT></SPAN></DIV>
  <DIV><SPAN class=3D514143519-26032003><FONT face=3DArial =
color=3D#0000ff=20
  size=3D2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=3D514143519-26032003><FONT face=3DArial =
color=3D#0000ff=20
  size=3D2>Here's an (unix-based)&nbsp;example:</FONT></SPAN></DIV>
  <DIV><SPAN class=3D514143519-26032003><FONT face=3DArial =
color=3D#0000ff=20
  size=3D2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=3D514143519-26032003><FONT face=3DArial =
color=3D#0000ff=20
  size=3D2>$&nbsp;bpimmedia -mediaid 000010 | awk '$1=3D=3D"IMAGE" =
{print=20
  $4}'<BR>backup00.lodo.in.exactis.com_1047999896<BR>$&nbsp;bpimagelist=20
  -backupid backup00.lodo.in.exactis.com_1047999896 | awk =
'$1=3D=3D"IMAGE" {print=20
  $24}'<BR>Oracle_list1p_1047999896_FULL.f<BR>$ cd=20
  /usr/openv/netbackup/db/images/backup00.lodo.in.exactis.com/1047*<BR>$ =

  =
pwd<BR>/usr/openv/netbackup/db/images/backup00.lodo.in.exactis.com/104700=
0000<BR>$&nbsp;zcat=20
  Oracle_list1p_1047999896_FULL.f.Z | awk '{print=20
  =
$10}'<BR>/<BR>/u00/<BR>/u00/list1p/<BR>/u00/list1p/arch/<BR>/u00/list1p/a=
rch/list1p_1570.arc<BR>/u01/<BR>&lt;snip&gt;</FONT></SPAN></DIV>
  <DIV><SPAN class=3D514143519-26032003><FONT face=3DArial =
color=3D#0000ff=20
  size=3D2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=3D514143519-26032003><FONT face=3DArial =
color=3D#0000ff=20
  size=3D2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=3D514143519-26032003><FONT face=3DArial =
color=3D#0000ff=20
  size=3D2>-M</FONT></SPAN></DIV>
  <DIV><SPAN class=3D514143519-26032003><FONT face=3DArial =
color=3D#0000ff=20
  size=3D2></FONT></SPAN>&nbsp;</DIV>
  <BLOCKQUOTE>
    <DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT =
face=3DTahoma=20
    size=3D2>-----Original Message-----<BR><B>From:</B> O'Shea, Don=20
    [mailto:Don.OShea AT emergis DOT com]<BR><B>Sent:</B> Wednesday, March 26, =
2003=20
    12:24 PM<BR><B>To:</B> Veritas-Bu (E-mail)<BR><B>Subject:</B> =
[Veritas-bu]=20
    CMD Line<BR><BR></FONT></DIV>
    <P><FONT face=3DArial size=3D2>Does anyone know what the command =
line command is=20
    to execute a report that would give me exact files backed up to a =
specific=20
    tape. I am trying to do it through the gui and it takes a long time =
and I=20
    have to do it for a bunch of tapes. I don't have much time available =
so I=20
    was hoping I could set of a bunch of instances and pipe it out to a =
file to=20
    distribute to a user.</FONT></P>
    <P><FONT face=3DArial size=3D2>Thanks,</FONT> </P>
    <P><FONT face=3DArial size=3D2>Don O'Shea</FONT> <BR><FONT =
face=3DArial size=3D2>BCE=20
    Emergis Inc.</FONT> <BR><FONT face=3DArial size=3D2>(905)707-4000 =
Ext=20
    3765</FONT> </P>
    <P><FONT face=3DArial size=3D2>The information contained herein, =
including any=20
    attachments, is proprietary and confidential and is intended for the =

    exclusive use of the addressee. It also may contain privileged =
information=20
    and/or personal information subject to privacy legislation. The =
authorized=20
    addressee of this information, by its retention and use, agrees to =
protect=20
    the information contained herein from loss, disclosure, theft or =
compromise=20
    with at least the same care it employs to protect its own =
confidential=20
    information. Any dissemination or use of this information by a =
person other=20
    than the intended recipient is unauthorized and may be illegal. If =
you have=20
    received this e-mail in error, please notify us immediately by reply =
e-mail=20
    and destroy all=20
copies.</FONT></P><BR><BR></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_001D_01C2F349.36E402F0--


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