Veritas-bu

[Veritas-bu] How to tell what just got backed up?

2002-06-06 11:02:38
Subject: [Veritas-bu] How to tell what just got backed up?
From: Mark.Donaldson AT experianems DOT com (Donaldson, Mark)
Date: Thu, 6 Jun 2002 09:02:38 -0600
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_01C20D6B.32DD9780
Content-Type: text/plain

I think it's the latter choice.  Each client job when you use the
"ALL_LOCAL_DRIVES" or other streaming keyword is it's own image.  The
bpend_notify script gets passed nothing about what files it was just run
against so making a smart script to work per filesystem would be very
difficult.

The manual descibes what is passed to the script via command line and what
is passed via environmental variables.  I'll stick a snippet on the bottom.
Also, I have the PDF files for NB here and can mail them to you - just hit
me with an e-mail on where to send them.

One option is to coordinate the streams so that when the last stream ends
(There's stream_number and stream_count supplied by NB to the script) it
kicks off a job that does all your filesystems at once.  This would
eliminate the need to try to figure out which stream is doing what
filesystem.

HTH - Mark

-----------From the Manual---------------
bpend_notify (UNIX clients only)
Caution The bpend_notify script is executed when the client is finished
sending data, but the server has not yet completed writing to media.

For a UNIX client, if you need notification whenever the client completes a
backup or archive operation, copy
/usr/openv/netbackup/bin/goodies/bpend_notify from the server to
/usr/openv/netbackup/bin/bpend_notify on the UNIX client. Then, modify the
script as desired, and ensure that you have execute permission.

The bpend_notify script executes each time a backup or archive completes.
For archives, it executes after the backup but before the files are removed.
If bpend_notify exists, it executes in the foreground and bpbkar on the
client waits until it completes. Any commands that do not end with an &
character execute serially.

The server expects the client to respond within the period of time specified
by the BPEND_TIMEOUT NetBackup configuration option on the server. The
default for BPEND_TIMEOUT is 300. If the script needs more than 300 seconds,
set BPEND_TIMEOUT to a larger value. Avoid too large a value or you will
delay the server from servicing other clients.

NetBackup passes the following parameters to the bpend_notify script:

  Parameter  Description
  ---------  ------------------------------
  clientname Name of the client from the NetBackup catalog.
  classname  Class name from the NetBackup catalog.
  schedname  Schedule name from the NetBackup catalog.
  schedtype  One of the following:
    FULL
    INCR (differential incremental)
    CINC (cumulative incremental)
    UBAK
    UARC

For example:
  bpend_notify freddie cd4000s fulls FULL 0
  bpend_notify danr cd4000s incrementals INCR 73

To create a bpend_notify script for a specific class or class and schedule
combination, create script files with a .classname or
.classname.schedulename suffix. The following are two examples of script
names for a class named production that has a schedule named fulls:
  /usr/openv/netbackup/bin/bpend_notify.production
  /usr/openv/netbackup/bin/bpend_notify.production.fulls

The first script affects all scheduled backups in the class named
production. The second script affects scheduled backups in the class named
production only when the schedule is named fulls. 
  Note For a given backup, NetBackup uses only one bpend_notify script and 
       that is the one with the most specific name. For example, if there
are 
       both bpend_notify.production and bpend_notify.production.fulls
scripts,
       NetBackup uses only bpend_notify.production.fulls.

If the UNIX client is running NetBackup 3.0 or later software, the
bpend_notify script can use the following environment variables:
  BACKUPID
  UNIXBACKUPTIME
  BACKUPTIME

The NetBackup bpbkar process creates these variables. The following are
examples of strings that are available to the script for use in recording
information about a backup:
  BACKUPID=freddie_0857340526
  UNIXBACKUPTIME=0857340526
  BACKUPTIME=Sun Mar 2 16:08:46 1997

In addition to the above, the following environment variables can be used
for the support of multiple data streams:
  exitstatus 
     Exit code from bpbkar. This is only client status and does 
     not mean that the backup is complete and successful (see 
     "backup_exit_notify" on page 649).

  For example, the client can show a status 0 when, due to a failure on the
server, the All Log Entries report shows a status 84.

  STREAM_NUMBER indicates the stream number. The first stream 
     started from a class, client, and schedule will be 1. A 
     value of 0, indicates that multiple data streams is not
     enabled.
  STREAM_COUNT specifies the total number of streams to be 
     generated from this class, client, and schedule.
  STREAM_PID is the pid (process ID) number of bpbkar.

----------------------------


-----Original Message-----
From: Richard.Hall [mailto:richard.hall AT ingenta DOT com]
Sent: Wednesday, June 05, 2002 4:31 PM
To: veritas-bu AT mailman.eng.auburn DOT edu
Subject: [Veritas-bu] How to tell what just got backed up?


Apologies in advance if (when!) the info below is incomplete, but I'm
working from home with no manuals, and with a very incomplete knowledge of
the command line interface. A search of the archives revealed nothing (but
then it failed to show stuff which I 'know' is there, so maybe I'm doing
something wrong there as well)

Scenario: Solaris 2.6 and 8 clients, NBU 3.4 DC, patch level ?

Client configured with ALL_LOCAL_DRIVES, and whatever the options are to
get a separate job per filesystem. All works fine (normally ;-)

I now want to run a script when the backup for a particular filesystem
completes. I thought the answer would be bpend_notify (never had any
reason to use it before, so no real knowledge), but I cannot find
anything which tells me which filesystem has just been backed up, only
things like backup IDs, class names etc. Is it there somewhere, or am I on
a hiding to nothing?

MTIA,
 Richard

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

------_=_NextPart_001_01C20D6B.32DD9780
Content-Type: text/html
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=3DUS-ASCII">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2653.12">
<TITLE>RE: [Veritas-bu] How to tell what just got backed up?</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>I think it's the latter choice.&nbsp; Each client job =
when you use the &quot;ALL_LOCAL_DRIVES&quot; or other streaming =
keyword is it's own image.&nbsp; The bpend_notify script gets passed =
nothing about what files it was just run against so making a smart =
script to work per filesystem would be very difficult.</FONT></P>

<P><FONT SIZE=3D2>The manual descibes what is passed to the script via =
command line and what is passed via environmental variables.&nbsp; I'll =
stick a snippet on the bottom.&nbsp; Also, I have the PDF files for NB =
here and can mail them to you - just hit me with an e-mail on where to =
send them.</FONT></P>

<P><FONT SIZE=3D2>One option is to coordinate the streams so that when =
the last stream ends (There's stream_number and stream_count supplied =
by NB to the script) it kicks off a job that does all your filesystems =
at once.&nbsp; This would eliminate the need to try to figure out which =
stream is doing what filesystem.</FONT></P>

<P><FONT SIZE=3D2>HTH - Mark</FONT>
</P>

<P><FONT SIZE=3D2>-----------From the Manual---------------</FONT>
<BR><FONT SIZE=3D2>bpend_notify (UNIX clients only)</FONT>
<BR><FONT SIZE=3D2>Caution The bpend_notify script is executed when the =
client is finished sending data, but the server has not yet completed =
writing to media.</FONT></P>

<P><FONT SIZE=3D2>For a UNIX client, if you need notification whenever =
the client completes a backup or archive operation, copy =
/usr/openv/netbackup/bin/goodies/bpend_notify from the server to =
/usr/openv/netbackup/bin/bpend_notify on the UNIX client. Then, modify =
the script as desired, and ensure that you have execute =
permission.</FONT></P>

<P><FONT SIZE=3D2>The bpend_notify script executes each time a backup =
or archive completes. For archives, it executes after the backup but =
before the files are removed. If bpend_notify exists, it executes in =
the foreground and bpbkar on the client waits until it completes. Any =
commands that do not end with an &amp; character execute =
serially.</FONT></P>

<P><FONT SIZE=3D2>The server expects the client to respond within the =
period of time specified by the BPEND_TIMEOUT NetBackup configuration =
option on the server. The default for BPEND_TIMEOUT is 300. If the =
script needs more than 300 seconds, set BPEND_TIMEOUT to a larger =
value. Avoid too large a value or you will delay the server from =
servicing other clients.</FONT></P>

<P><FONT SIZE=3D2>NetBackup passes the following parameters to the =
bpend_notify script:</FONT>
</P>

<P><FONT SIZE=3D2>&nbsp; Parameter&nbsp; Description</FONT>
<BR><FONT SIZE=3D2>&nbsp; ---------&nbsp; =
------------------------------</FONT>
<BR><FONT SIZE=3D2>&nbsp; clientname Name of the client from the =
NetBackup catalog.</FONT>
<BR><FONT SIZE=3D2>&nbsp; classname&nbsp; Class name from the NetBackup =
catalog.</FONT>
<BR><FONT SIZE=3D2>&nbsp; schedname&nbsp; Schedule name from the =
NetBackup catalog.</FONT>
<BR><FONT SIZE=3D2>&nbsp; schedtype&nbsp; One of the following:</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; FULL</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; INCR (differential =
incremental)</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; CINC (cumulative =
incremental)</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; UBAK</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; UARC</FONT>
</P>

<P><FONT SIZE=3D2>For example:</FONT>
<BR><FONT SIZE=3D2>&nbsp; bpend_notify freddie cd4000s fulls FULL =
0</FONT>
<BR><FONT SIZE=3D2>&nbsp; bpend_notify danr cd4000s incrementals INCR =
73</FONT>
</P>

<P><FONT SIZE=3D2>To create a bpend_notify script for a specific class =
or class and schedule combination, create script files with a =
.classname or .classname.schedulename suffix. The following are two =
examples of script names for a class named production that has a =
schedule named fulls:</FONT></P>

<P><FONT SIZE=3D2>&nbsp; =
/usr/openv/netbackup/bin/bpend_notify.production</FONT>
<BR><FONT SIZE=3D2>&nbsp; =
/usr/openv/netbackup/bin/bpend_notify.production.fulls</FONT>
</P>

<P><FONT SIZE=3D2>The first script affects all scheduled backups in the =
class named production. The second script affects scheduled backups in =
the class named production only when the schedule is named fulls. =
</FONT></P>

<P><FONT SIZE=3D2>&nbsp; Note For a given backup, NetBackup uses only =
one bpend_notify script and </FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; that is the one =
with the most specific name. For example, if there are </FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; both =
bpend_notify.production and bpend_notify.production.fulls =
scripts,</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NetBackup uses =
only bpend_notify.production.fulls.</FONT>
</P>

<P><FONT SIZE=3D2>If the UNIX client is running NetBackup 3.0 or later =
software, the bpend_notify script can use the following environment =
variables:</FONT></P>

<P><FONT SIZE=3D2>&nbsp; BACKUPID</FONT>
<BR><FONT SIZE=3D2>&nbsp; UNIXBACKUPTIME</FONT>
<BR><FONT SIZE=3D2>&nbsp; BACKUPTIME</FONT>
</P>

<P><FONT SIZE=3D2>The NetBackup bpbkar process creates these variables. =
The following are examples of strings that are available to the script =
for use in recording information about a backup:</FONT></P>

<P><FONT SIZE=3D2>&nbsp; BACKUPID=3Dfreddie_0857340526</FONT>
<BR><FONT SIZE=3D2>&nbsp; UNIXBACKUPTIME=3D0857340526</FONT>
<BR><FONT SIZE=3D2>&nbsp; BACKUPTIME=3DSun Mar 2 16:08:46 1997</FONT>
</P>

<P><FONT SIZE=3D2>In addition to the above, the following environment =
variables can be used for the support of multiple data streams:</FONT>
<BR><FONT SIZE=3D2>&nbsp; exitstatus </FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp; Exit code from bpbkar. This =
is only client status and does </FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp; not mean that the backup is =
complete and successful (see </FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp; =
&quot;backup_exit_notify&quot; on page 649).</FONT>
</P>

<P><FONT SIZE=3D2>&nbsp; For example, the client can show a status 0 =
when, due to a failure on the server, the All Log Entries report shows =
a status 84.</FONT></P>

<P><FONT SIZE=3D2>&nbsp; STREAM_NUMBER indicates the stream number. The =
first stream </FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp; started from a class, =
client, and schedule will be 1. A </FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp; value of 0, indicates that =
multiple data streams is not</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp; enabled.</FONT>
<BR><FONT SIZE=3D2>&nbsp; STREAM_COUNT specifies the total number of =
streams to be </FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp; generated from this class, =
client, and schedule.</FONT>
<BR><FONT SIZE=3D2>&nbsp; STREAM_PID is the pid (process ID) number of =
bpbkar.</FONT>
</P>

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

<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: Richard.Hall [<A =
HREF=3D"mailto:richard.hall AT ingenta DOT com">mailto:richard.hall AT ingenta 
DOT com=
</A>]</FONT>
<BR><FONT SIZE=3D2>Sent: Wednesday, June 05, 2002 4:31 PM</FONT>
<BR><FONT SIZE=3D2>To: veritas-bu AT mailman.eng.auburn DOT edu</FONT>
<BR><FONT SIZE=3D2>Subject: [Veritas-bu] How to tell what just got =
backed up?</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>Apologies in advance if (when!) the info below is =
incomplete, but I'm</FONT>
<BR><FONT SIZE=3D2>working from home with no manuals, and with a very =
incomplete knowledge of</FONT>
<BR><FONT SIZE=3D2>the command line interface. A search of the archives =
revealed nothing (but</FONT>
<BR><FONT SIZE=3D2>then it failed to show stuff which I 'know' is =
there, so maybe I'm doing</FONT>
<BR><FONT SIZE=3D2>something wrong there as well)</FONT>
</P>

<P><FONT SIZE=3D2>Scenario: Solaris 2.6 and 8 clients, NBU 3.4 DC, =
patch level ?</FONT>
</P>

<P><FONT SIZE=3D2>Client configured with ALL_LOCAL_DRIVES, and whatever =
the options are to</FONT>
<BR><FONT SIZE=3D2>get a separate job per filesystem. All works fine =
(normally ;-)</FONT>
</P>

<P><FONT SIZE=3D2>I now want to run a script when the backup for a =
particular filesystem</FONT>
<BR><FONT SIZE=3D2>completes. I thought the answer would be =
bpend_notify (never had any</FONT>
<BR><FONT SIZE=3D2>reason to use it before, so no real knowledge), but =
I cannot find</FONT>
<BR><FONT SIZE=3D2>anything which tells me which filesystem has just =
been backed up, only</FONT>
<BR><FONT SIZE=3D2>things like backup IDs, class names etc. Is it there =
somewhere, or am I on</FONT>
<BR><FONT SIZE=3D2>a hiding to nothing?</FONT>
</P>

<P><FONT SIZE=3D2>MTIA,</FONT>
<BR><FONT SIZE=3D2>&nbsp;Richard</FONT>
</P>

<P><FONT =
SIZE=3D2>_______________________________________________</FONT>
<BR><FONT SIZE=3D2>Veritas-bu maillist&nbsp; -&nbsp; =
Veritas-bu AT mailman.eng.auburn DOT edu</FONT>
<BR><FONT SIZE=3D2><A =
HREF=3D"http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu"; =
TARGET=3D"_blank">http://mailman.eng.auburn.edu/mailman/listinfo/veritas=
-bu</A></FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C20D6B.32DD9780--