Veritas-bu

[Veritas-bu] newbie - netbackup/oracle on unix to win netback up server

2003-02-13 19:31:29
Subject: [Veritas-bu] newbie - netbackup/oracle on unix to win netback up server
From: Mark.Donaldson AT experianems DOT com (Donaldson, Mark)
Date: Thu, 13 Feb 2003 17:31:29 -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_01C2D3C0.6A9CAEB0
Content-Type: text/plain

There's several ways to backup oracle "hot" with Netbackup

1. Oracle RMAN is compatible with the Netbackup database extenstions.  This
uses Oracle's own backup utility to send blocks & files to Netbackup.
Netbackup provides little more than media services for this.  The database
extensions are an add-on to NB and cost extra $$.

2. Use some sort of disk or filesystem split mirrors.  Place all Oracle's
tablespaces in hot backup mode, split the mirrors, take the tablespaces out
of hot-backup mode.  Backup the split mirrors.  This is not as simple as it
sounds and there's more to it than this but this is the basics.

3. Use what we call a "rolling hot backup".
  a. query Oracle for all tablespaces
  b. in sequence (in a loop):
    Place tablespace in hot backpup ode
    Query for files associated with tablespace
    use the bpbackup utility to send these files
    take the tablespace out of hot-backup mode
    (loop back for next tablespace
  c. backup control file to trace & send that to NB with bpbackup
  d. roll the redo logs
  e. send the archived redo from just before to just after the backup period
to NB

It sounds complex but once scripted, it can be ported to just about any
instance.

The whole trick to backing-up Oracle, regardless of what you're sending it
to (NB, Legato, etc.) is to either use RMAN or send tablespaces that have
been placed in hot-backup mode. If they're not in hot-backup, then the file
may change while being backed-up, it becomes inconsistent & is useless for
restoral.  Hot-backup mode quiesces the file for the duration.

HTH - Mark

By the way, your clock on your PC is way off.

-----Original Message-----
From: Broun, Bevan [mailto:brounb AT adi-limited DOT com]
Sent: Wednesday, February 12, 2003 5:00 PM
To: veritas-bu AT mailman.eng.auburn DOT edu
Subject: [Veritas-bu] newbie - netbackup/oracle on unix to win netbackup
server


Hi

Im a newbie to Netbackup and to oracle. We have oracle 9.2 running on a
solaris 8 box, we are using netbackup 4.5. The netbackup server is a
windows 2000 box - we only want to use netbackup to backup hot databases to
the windows box but we have managed to backup non database files without
problem.

Ive tried to run the jbpSA script but this bombs out with:
<jbpSA>
getAppletParameter - applet is null, returning default value.
com.sun.java.swing.plaf.motif.MotifLookAndFeel/icons/UpFolder.gif not
found.
com.sun.java.swing.plaf.motif.MotifLookAndFeel/icons/ListView.gif not
found.
com.sun.java.swing.plaf.motif.MotifLookAndFeel/icons/Computer.gif not
found.
com.sun.java.swing.plaf.motif.MotifLookAndFeel/icons/File.gif not found.
com.sun.java.swing.plaf.motif.MotifLookAndFeel/icons/Directory.gif not
found.
com.sun.java.swing.plaf.motif.MotifLookAndFeel/icons/FloppyDrive.gif not
found.
com.sun.java.swing.plaf.motif.MotifLookAndFeel/icons/NewFolder.gif not
found.
com.sun.java.swing.plaf.motif.MotifLookAndFeel/icons/DetailsView.gif not
found.
com.sun.java.swing.plaf.motif.MotifLookAndFeel/icons/HomeFolder.gif not
found.
com.sun.java.swing.plaf.motif.MotifLookAndFeel/icons/HardDrive.gif not
found.
com.sun.java.swing.plaf.motif.MotifLookAndFeel/icons/JavaCup.gif not found.
java.lang.NullPointerException: NullPointerException
</jbpSA>

So Ive tried copying the rman/samples/hot_database_backup.sh and editing.
At first we had an authentication error but we fixed that. Now we have:

<LOG>
Script /usr/local/sysadmin/backup/bin/psetest_hot_database_backup.sh
==== started on Wed Feb 12 15:27:10 EST 2003 ====


RMAN: /home/oracle/bin/rman
ORACLE_SID: PSETEST
ORACLE_USER: oracle
ORACLE_HOME: /home/oracle

NB_ORA_FULL: 1
NB_ORA_INCR: 0
NB_ORA_CINC: 0
NB_ORA_SERV: ctxmeta
NB_ORA_POLICY: Oracle_on_Oceanus

Full backup requested
RMAN> 2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12> 13> 14> 15> 16> 17> 18> 19> 20>
21> 22> 23> 24> 25> 26> 27> 28> 29> 30> 31> 32> 33> 34> 35> 36> 37> 38>
 RMAN> E_TEST (DBID=2453592760)
 using target database controlfile instead of recovery catalog

 RMAN> 2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12> 13> 14> 15> 16> 17> 18> 19> 20>
 21> 22> 23> 24> 25> 26> 27> 28> 29> 30> 31> 32> 33> 34> 35> 36> 37> 38>
  
  RMAN-00571: ===========================================================
  RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
  RMAN-00571: ===========================================================
  RMAN-03009: failure of allocate command on ch00 channel at 02/12/2003
  15:27:12
  ORA-19554: error allocating device, device type: SBT_TAPE, device name: 
  ORA-27211: Failed to load Media Management Library
  Additional information: 25

  RMAN> 

  Recovery Manager complete.

  Script /usr/local/sysadmin/backup/bin/psetest_hot_database_backup.sh
  ==== ended in error on Wed Feb 12 15:27:12 EST 2003 ====

</LOG>

The relevant bit of the script is:

<SCRIPT>
$RMAN target $TARGET_CONNECT_STR nocatalog msglog $RMAN_LOG_FILE append <<
EOF
RUN {
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE';
BACKUP
    $BACKUP_TYPE
    SKIP INACCESSIBLE
    TAG hot_db_bk_level0
    FILESPERSET 5
    # recommended format
    FORMAT 'bk_%s_%p_%t'
    DATABASE;
    sql 'alter system archive log current';
RELEASE CHANNEL ch00;
RELEASE CHANNEL ch01;
# backup all archive logs
</SCRIPT>

I get the feeling that SBT_TAPE is not correct but dont know what to set it
to.

HELP PLEASE

TIA

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

------_=_NextPart_001_01C2D3C0.6A9CAEB0
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] newbie - netbackup/oracle on unix to win =
netbackup server</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>There's several ways to backup oracle &quot;hot&quot; =
with Netbackup</FONT>
</P>

<P><FONT SIZE=3D2>1. Oracle RMAN is compatible with the Netbackup =
database extenstions.&nbsp; This uses Oracle's own backup utility to =
send blocks &amp; files to Netbackup.&nbsp; Netbackup provides little =
more than media services for this.&nbsp; The database extensions are an =
add-on to NB and cost extra $$.</FONT></P>

<P><FONT SIZE=3D2>2. Use some sort of disk or filesystem split =
mirrors.&nbsp; Place all Oracle's tablespaces in hot backup mode, split =
the mirrors, take the tablespaces out of hot-backup mode.&nbsp; Backup =
the split mirrors.&nbsp; This is not as simple as it sounds and there's =
more to it than this but this is the basics.</FONT></P>

<P><FONT SIZE=3D2>3. Use what we call a &quot;rolling hot =
backup&quot;.</FONT>
<BR><FONT SIZE=3D2>&nbsp; a. query Oracle for all tablespaces</FONT>
<BR><FONT SIZE=3D2>&nbsp; b. in sequence (in a loop):</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; Place tablespace in hot backpup =
ode</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; Query for files associated with =
tablespace</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; use the bpbackup utility to send =
these files</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; take the tablespace out of =
hot-backup mode</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; (loop back for next =
tablespace</FONT>
<BR><FONT SIZE=3D2>&nbsp; c. backup control file to trace &amp; send =
that to NB with bpbackup</FONT>
<BR><FONT SIZE=3D2>&nbsp; d. roll the redo logs</FONT>
<BR><FONT SIZE=3D2>&nbsp; e. send the archived redo from just before to =
just after the backup period to NB</FONT>
</P>

<P><FONT SIZE=3D2>It sounds complex but once scripted, it can be ported =
to just about any instance.</FONT>
</P>

<P><FONT SIZE=3D2>The whole trick to backing-up Oracle, regardless of =
what you're sending it to (NB, Legato, etc.) is to either use RMAN or =
send tablespaces that have been placed in hot-backup mode. If they're =
not in hot-backup, then the file may change while being backed-up, it =
becomes inconsistent &amp; is useless for restoral.&nbsp; Hot-backup =
mode quiesces the file for the duration.</FONT></P>

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

<P><FONT SIZE=3D2>By the way, your clock on your PC is way off.</FONT>
</P>

<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: Broun, Bevan [<A =
HREF=3D"mailto:brounb AT adi-limited DOT com">mailto:brounb AT adi-limited DOT 
com</A>=
]</FONT>
<BR><FONT SIZE=3D2>Sent: Wednesday, February 12, 2003 5:00 PM</FONT>
<BR><FONT SIZE=3D2>To: veritas-bu AT mailman.eng.auburn DOT edu</FONT>
<BR><FONT SIZE=3D2>Subject: [Veritas-bu] newbie - netbackup/oracle on =
unix to win netbackup</FONT>
<BR><FONT SIZE=3D2>server</FONT>
</P>
<BR>

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

<P><FONT SIZE=3D2>Im a newbie to Netbackup and to oracle. We have =
oracle 9.2 running on a</FONT>
<BR><FONT SIZE=3D2>solaris 8 box, we are using netbackup 4.5. The =
netbackup server is a</FONT>
<BR><FONT SIZE=3D2>windows 2000 box - we only want to use netbackup to =
backup hot databases to</FONT>
<BR><FONT SIZE=3D2>the windows box but we have managed to backup non =
database files without</FONT>
<BR><FONT SIZE=3D2>problem.</FONT>
</P>

<P><FONT SIZE=3D2>Ive tried to run the jbpSA script but this bombs out =
with:</FONT>
<BR><FONT SIZE=3D2>&lt;jbpSA&gt;</FONT>
<BR><FONT SIZE=3D2>getAppletParameter - applet is null, returning =
default value.</FONT>
<BR><FONT =
SIZE=3D2>com.sun.java.swing.plaf.motif.MotifLookAndFeel/icons/UpFolder.g=
if not</FONT>
<BR><FONT SIZE=3D2>found.</FONT>
<BR><FONT =
SIZE=3D2>com.sun.java.swing.plaf.motif.MotifLookAndFeel/icons/ListView.g=
if not</FONT>
<BR><FONT SIZE=3D2>found.</FONT>
<BR><FONT =
SIZE=3D2>com.sun.java.swing.plaf.motif.MotifLookAndFeel/icons/Computer.g=
if not</FONT>
<BR><FONT SIZE=3D2>found.</FONT>
<BR><FONT =
SIZE=3D2>com.sun.java.swing.plaf.motif.MotifLookAndFeel/icons/File.gif =
not found.</FONT>
<BR><FONT =
SIZE=3D2>com.sun.java.swing.plaf.motif.MotifLookAndFeel/icons/Directory.=
gif not</FONT>
<BR><FONT SIZE=3D2>found.</FONT>
<BR><FONT =
SIZE=3D2>com.sun.java.swing.plaf.motif.MotifLookAndFeel/icons/FloppyDriv=
e.gif not</FONT>
<BR><FONT SIZE=3D2>found.</FONT>
<BR><FONT =
SIZE=3D2>com.sun.java.swing.plaf.motif.MotifLookAndFeel/icons/NewFolder.=
gif not</FONT>
<BR><FONT SIZE=3D2>found.</FONT>
<BR><FONT =
SIZE=3D2>com.sun.java.swing.plaf.motif.MotifLookAndFeel/icons/DetailsVie=
w.gif not</FONT>
<BR><FONT SIZE=3D2>found.</FONT>
<BR><FONT =
SIZE=3D2>com.sun.java.swing.plaf.motif.MotifLookAndFeel/icons/HomeFolder=
.gif not</FONT>
<BR><FONT SIZE=3D2>found.</FONT>
<BR><FONT =
SIZE=3D2>com.sun.java.swing.plaf.motif.MotifLookAndFeel/icons/HardDrive.=
gif not</FONT>
<BR><FONT SIZE=3D2>found.</FONT>
<BR><FONT =
SIZE=3D2>com.sun.java.swing.plaf.motif.MotifLookAndFeel/icons/JavaCup.gi=
f not found.</FONT>
<BR><FONT SIZE=3D2>java.lang.NullPointerException: =
NullPointerException</FONT>
<BR><FONT SIZE=3D2>&lt;/jbpSA&gt;</FONT>
</P>

<P><FONT SIZE=3D2>So Ive tried copying the =
rman/samples/hot_database_backup.sh and editing.</FONT>
<BR><FONT SIZE=3D2>At first we had an authentication error but we fixed =
that. Now we have:</FONT>
</P>

<P><FONT SIZE=3D2>&lt;LOG&gt;</FONT>
<BR><FONT SIZE=3D2>Script =
/usr/local/sysadmin/backup/bin/psetest_hot_database_backup.sh</FONT>
<BR><FONT SIZE=3D2>=3D=3D=3D=3D started on Wed Feb 12 15:27:10 EST 2003 =
=3D=3D=3D=3D</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>RMAN: /home/oracle/bin/rman</FONT>
<BR><FONT SIZE=3D2>ORACLE_SID: PSETEST</FONT>
<BR><FONT SIZE=3D2>ORACLE_USER: oracle</FONT>
<BR><FONT SIZE=3D2>ORACLE_HOME: /home/oracle</FONT>
</P>

<P><FONT SIZE=3D2>NB_ORA_FULL: 1</FONT>
<BR><FONT SIZE=3D2>NB_ORA_INCR: 0</FONT>
<BR><FONT SIZE=3D2>NB_ORA_CINC: 0</FONT>
<BR><FONT SIZE=3D2>NB_ORA_SERV: ctxmeta</FONT>
<BR><FONT SIZE=3D2>NB_ORA_POLICY: Oracle_on_Oceanus</FONT>
</P>

<P><FONT SIZE=3D2>Full backup requested</FONT>
<BR><FONT SIZE=3D2>RMAN&gt; 2&gt; 3&gt; 4&gt; 5&gt; 6&gt; 7&gt; 8&gt; =
9&gt; 10&gt; 11&gt; 12&gt; 13&gt; 14&gt; 15&gt; 16&gt; 17&gt; 18&gt; =
19&gt; 20&gt;</FONT>
<BR><FONT SIZE=3D2>21&gt; 22&gt; 23&gt; 24&gt; 25&gt; 26&gt; 27&gt; =
28&gt; 29&gt; 30&gt; 31&gt; 32&gt; 33&gt; 34&gt; 35&gt; 36&gt; 37&gt; =
38&gt;</FONT>
<BR><FONT SIZE=3D2>&nbsp;RMAN&gt; E_TEST (DBID=3D2453592760)</FONT>
<BR><FONT SIZE=3D2>&nbsp;using target database controlfile instead of =
recovery catalog</FONT>
</P>

<P><FONT SIZE=3D2>&nbsp;RMAN&gt; 2&gt; 3&gt; 4&gt; 5&gt; 6&gt; 7&gt; =
8&gt; 9&gt; 10&gt; 11&gt; 12&gt; 13&gt; 14&gt; 15&gt; 16&gt; 17&gt; =
18&gt; 19&gt; 20&gt;</FONT>
<BR><FONT SIZE=3D2>&nbsp;21&gt; 22&gt; 23&gt; 24&gt; 25&gt; 26&gt; =
27&gt; 28&gt; 29&gt; 30&gt; 31&gt; 32&gt; 33&gt; 34&gt; 35&gt; 36&gt; =
37&gt; 38&gt;</FONT>
<BR><FONT SIZE=3D2>&nbsp; </FONT>
<BR><FONT SIZE=3D2>&nbsp; RMAN-00571: =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D</FONT>
<BR><FONT SIZE=3D2>&nbsp; RMAN-00569: =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D ERROR MESSAGE STACK =
FOLLOWS =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D</FONT>
<BR><FONT SIZE=3D2>&nbsp; RMAN-00571: =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D</FONT>
<BR><FONT SIZE=3D2>&nbsp; RMAN-03009: failure of allocate command on =
ch00 channel at 02/12/2003</FONT>
<BR><FONT SIZE=3D2>&nbsp; 15:27:12</FONT>
<BR><FONT SIZE=3D2>&nbsp; ORA-19554: error allocating device, device =
type: SBT_TAPE, device name: </FONT>
<BR><FONT SIZE=3D2>&nbsp; ORA-27211: Failed to load Media Management =
Library</FONT>
<BR><FONT SIZE=3D2>&nbsp; Additional information: 25</FONT>
</P>

<P><FONT SIZE=3D2>&nbsp; RMAN&gt; </FONT>
</P>

<P><FONT SIZE=3D2>&nbsp; Recovery Manager complete.</FONT>
</P>

<P><FONT SIZE=3D2>&nbsp; Script =
/usr/local/sysadmin/backup/bin/psetest_hot_database_backup.sh</FONT>
<BR><FONT SIZE=3D2>&nbsp; =3D=3D=3D=3D ended in error on Wed Feb 12 =
15:27:12 EST 2003 =3D=3D=3D=3D</FONT>
</P>

<P><FONT SIZE=3D2>&lt;/LOG&gt;</FONT>
</P>

<P><FONT SIZE=3D2>The relevant bit of the script is:</FONT>
</P>

<P><FONT SIZE=3D2>&lt;SCRIPT&gt;</FONT>
<BR><FONT SIZE=3D2>$RMAN target $TARGET_CONNECT_STR nocatalog msglog =
$RMAN_LOG_FILE append &lt;&lt;</FONT>
<BR><FONT SIZE=3D2>EOF</FONT>
<BR><FONT SIZE=3D2>RUN {</FONT>
<BR><FONT SIZE=3D2>ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';</FONT>
<BR><FONT SIZE=3D2>ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE';</FONT>
<BR><FONT SIZE=3D2>BACKUP</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; $BACKUP_TYPE</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; SKIP INACCESSIBLE</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; TAG hot_db_bk_level0</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; FILESPERSET 5</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; # recommended format</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; FORMAT 'bk_%s_%p_%t'</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; DATABASE;</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; sql 'alter system archive log =
current';</FONT>
<BR><FONT SIZE=3D2>RELEASE CHANNEL ch00;</FONT>
<BR><FONT SIZE=3D2>RELEASE CHANNEL ch01;</FONT>
<BR><FONT SIZE=3D2># backup all archive logs</FONT>
<BR><FONT SIZE=3D2>&lt;/SCRIPT&gt;</FONT>
</P>

<P><FONT SIZE=3D2>I get the feeling that SBT_TAPE is not correct but =
dont know what to set it</FONT>
<BR><FONT SIZE=3D2>to.</FONT>
</P>

<P><FONT SIZE=3D2>HELP PLEASE</FONT>
</P>

<P><FONT SIZE=3D2>TIA</FONT>
</P>

<P><FONT SIZE=3D2>BB</FONT>
<BR><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_01C2D3C0.6A9CAEB0--

<Prev in Thread] Current Thread [Next in Thread>
  • [Veritas-bu] newbie - netbackup/oracle on unix to win netback up server, Donaldson, Mark <=