Veritas-bu

[Veritas-bu] Multiple data stream and bpend_notify script

2005-11-08 19:03:14
Subject: [Veritas-bu] Multiple data stream and bpend_notify script
From: gliu AT macquarietelecom DOT com (Guang Yu Liu)
Date: Wed, 9 Nov 2005 11:03:14 +1100
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_01C5E4C0.FB0CA1D0
Content-Type: text/plain;
        charset="iso-8859-1"

wouldn't there be a chance that there might be race condition issues?
Suppose that two processes can modify the file at the same time and that
could corrupt the countfile.
Before testing NBU6 in the future we will just use the old flat file backup
(cron jobs dump the db to flat files).

-----Original Message-----
From: Mark.Donaldson AT cexp DOT com [mailto:Mark.Donaldson AT cexp DOT com]
Sent: Wednesday, November 09, 2005 3:19 AM
To: Asiye.Yigit AT gantek DOT com; veritas-bu AT mailman.eng.auburn DOT edu
Subject: RE: [Veritas-bu] Multiple data stream and bpend_notify script


In unix, I do this with what I call a "count" file.

As each stream ends, it writes appends a line to a common file.  The script
then checks the number of lines in the file and compares it against the
"STREAM_COUNT" variable.  If they match then the end-job is run & the count
file removed.

Beats me how to do this in MS Batch files but here's my script's logic:

echo $STREAM_NUMBER >> /tmp/countfile
if [ `wc -l /tmp/countfile | awk '{print $1}'` -eq $STREAM_COUNT ]
then
  echo "Last stream"
  rm /tmp/countfile
  <run end-of-job-stuff>
fi


There's some additional logic in the bpstart_notify script to check for an
old countfile that's gotten "lost" because a previous stream ended without
running it bpend_notify script.  This, of course, may lead to the end-of-job
startup stuff not running.  Usually, for me, that's not an issue.

-M

-----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 Asiye Yigit
Sent: Tuesday, November 08, 2005 2:37 AM
To: veritas-bu AT mailman.eng.auburn DOT edu
Subject: [Veritas-bu] Multiple data stream and bpend_notify script


Hi gurus,

We have a file system backup. It is being backuped as multiple data
stream.
We are backing up offline sql backup. So, in the bpend_notify script,
There is start command to start sql after finishing backup.
As there are multiple data stream, after completion of each data stream,
Nb run bpend_notify script. We have to instruct the script,
There are multiple data stream. In fact, in the admin guide,
We have found some variables to support multiple data stream:
STREAM_NUMBER
STREAM_COUNT

However, I do not know how can I use these variables in my bpend_notify
script.
Does  "Set STREAM_NUMBER=1"  work? I am not sure. How can I tell the
script,
This backup is being backed up via multiple data stream. Please wait?

Is there any idea about that? I would appreciate if you could help me.

Regards,

Asiye


_______________________________________________
Veritas-bu maillist  -  Veritas-bu AT mailman.eng.auburn DOT edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu
Macquarie Telecom - delivering value for business and government.
----------------------------------------------------------------------------
-----------------------------------
Confidentiality Note: This e-mail is sent to and intended for use by the
named addressees only. 
It contains confidential information. If you receive this e-mail in error,
please telephone Macquarie 
Telecom Pty Ltd on +612 8221 7777, and then delete this message immediately.
Further, you should 
not re-transmit, copy, store, or reveal the contents of this message to any
third party.





------_=_NextPart_001_01C5E4C0.FB0CA1D0
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.2654.45">
<TITLE>RE: [Veritas-bu] Multiple data stream and bpend_notify =
script</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>wouldn't there be a chance that there might be race =
condition issues? Suppose that two processes can modify the file at the =
same time and that could corrupt the countfile.</FONT></P>

<P><FONT SIZE=3D2>Before testing NBU6 in the future we will just use =
the old flat file backup (cron jobs dump the db to flat files).</FONT>
</P>

<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: Mark.Donaldson AT cexp DOT com [<A =
HREF=3D"mailto:Mark.Donaldson AT cexp DOT com">mailto:Mark.Donaldson AT cexp 
DOT com</=
A>]</FONT>
<BR><FONT SIZE=3D2>Sent: Wednesday, November 09, 2005 3:19 AM</FONT>
<BR><FONT SIZE=3D2>To: Asiye.Yigit AT gantek DOT com; =
veritas-bu AT mailman.eng.auburn DOT edu</FONT>
<BR><FONT SIZE=3D2>Subject: RE: [Veritas-bu] Multiple data stream and =
bpend_notify script</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>In unix, I do this with what I call a =
&quot;count&quot; file.</FONT>
</P>

<P><FONT SIZE=3D2>As each stream ends, it writes appends a line to a =
common file.&nbsp; The script</FONT>
<BR><FONT SIZE=3D2>then checks the number of lines in the file and =
compares it against the</FONT>
<BR><FONT SIZE=3D2>&quot;STREAM_COUNT&quot; variable.&nbsp; If they =
match then the end-job is run &amp; the count</FONT>
<BR><FONT SIZE=3D2>file removed.</FONT>
</P>

<P><FONT SIZE=3D2>Beats me how to do this in MS Batch files but here's =
my script's logic:</FONT>
</P>

<P><FONT SIZE=3D2>echo $STREAM_NUMBER &gt;&gt; /tmp/countfile</FONT>
<BR><FONT SIZE=3D2>if [ `wc -l /tmp/countfile | awk '{print $1}'` -eq =
$STREAM_COUNT ]</FONT>
<BR><FONT SIZE=3D2>then</FONT>
<BR><FONT SIZE=3D2>&nbsp; echo &quot;Last stream&quot;</FONT>
<BR><FONT SIZE=3D2>&nbsp; rm /tmp/countfile</FONT>
<BR><FONT SIZE=3D2>&nbsp; &lt;run end-of-job-stuff&gt;</FONT>
<BR><FONT SIZE=3D2>fi</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>There's some additional logic in the bpstart_notify =
script to check for an</FONT>
<BR><FONT SIZE=3D2>old countfile that's gotten &quot;lost&quot; because =
a previous stream ended without</FONT>
<BR><FONT SIZE=3D2>running it bpend_notify script.&nbsp; This, of =
course, may lead to the end-of-job</FONT>
<BR><FONT SIZE=3D2>startup stuff not running.&nbsp; Usually, for me, =
that's not an issue.</FONT>
</P>

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

<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: veritas-bu-admin AT mailman.eng.auburn DOT edu</FONT>
<BR><FONT SIZE=3D2>[<A =
HREF=3D"mailto:veritas-bu-admin AT mailman.eng.auburn DOT edu">mailto:veritas-b=
u-admin AT mailman.eng.auburn DOT edu</A>]On Behalf Of Asiye Yigit</FONT>
<BR><FONT SIZE=3D2>Sent: Tuesday, November 08, 2005 2:37 AM</FONT>
<BR><FONT SIZE=3D2>To: veritas-bu AT mailman.eng.auburn DOT edu</FONT>
<BR><FONT SIZE=3D2>Subject: [Veritas-bu] Multiple data stream and =
bpend_notify script</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>Hi gurus,</FONT>
</P>

<P><FONT SIZE=3D2>We have a file system backup. It is being backuped as =
multiple data</FONT>
<BR><FONT SIZE=3D2>stream.</FONT>
<BR><FONT SIZE=3D2>We are backing up offline sql backup. So, in the =
bpend_notify script,</FONT>
<BR><FONT SIZE=3D2>There is start command to start sql after finishing =
backup.</FONT>
<BR><FONT SIZE=3D2>As there are multiple data stream, after completion =
of each data stream,</FONT>
<BR><FONT SIZE=3D2>Nb run bpend_notify script. We have to instruct the =
script,</FONT>
<BR><FONT SIZE=3D2>There are multiple data stream. In fact, in the =
admin guide,</FONT>
<BR><FONT SIZE=3D2>We have found some variables to support multiple =
data stream:</FONT>
<BR><FONT SIZE=3D2>STREAM_NUMBER</FONT>
<BR><FONT SIZE=3D2>STREAM_COUNT</FONT>
</P>

<P><FONT SIZE=3D2>However, I do not know how can I use these variables =
in my bpend_notify</FONT>
<BR><FONT SIZE=3D2>script.</FONT>
<BR><FONT SIZE=3D2>Does&nbsp; &quot;Set STREAM_NUMBER=3D1&quot;&nbsp; =
work? I am not sure. How can I tell the</FONT>
<BR><FONT SIZE=3D2>script,</FONT>
<BR><FONT SIZE=3D2>This backup is being backed up via multiple data =
stream. Please wait?</FONT>
</P>

<P><FONT SIZE=3D2>Is there any idea about that? I would appreciate if =
you could help me.</FONT>
</P>

<P><FONT SIZE=3D2>Regards,</FONT>
</P>

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

<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>
<BR><FONT SIZE=3D2>Macquarie Telecom - delivering value for business =
and government.</FONT>
<BR><FONT =
SIZE=3D2>---------------------------------------------------------------=
------------------------------------------------</FONT>
<BR><FONT SIZE=3D2>Confidentiality Note: This e-mail is sent to and =
intended for use by the named addressees only. </FONT>
<BR><FONT SIZE=3D2>It contains confidential information. If you receive =
this e-mail in error, please telephone Macquarie </FONT>
<BR><FONT SIZE=3D2>Telecom Pty Ltd on +612 8221 7777, and then delete =
this message immediately. Further, you should </FONT>
<BR><FONT SIZE=3D2>not re-transmit, copy, store, or reveal the contents =
of this message to any third party.</FONT>
</P>
<BR>
<BR>
<BR>

</BODY>
</HTML>
------_=_NextPart_001_01C5E4C0.FB0CA1D0--