Veritas-bu

[Veritas-bu] User Directed Backup and Oracle

2004-03-04 08:16:33
Subject: [Veritas-bu] User Directed Backup and Oracle
From: ckstehman AT pepco DOT com (ckstehman AT pepco DOT com)
Date: Thu, 4 Mar 2004 08:16:33 -0500
This is a multipart message in MIME format.
--=_alternative 0048ED4085256E4D_=
Content-Type: text/plain; charset="us-ascii"

Mark;

Good suggestion!, I'll pass it to our DBA's.   In our environment we do 
these backups after hours when activity is light.
We use the Veritas Oracle agent and RMAN for our busy databases. 

=============================
Carl Stehman
PHI Services Company
202-331-6619
Pager 301-765-2703
ckstehman AT pepco DOT com





"Donaldson, Mark" <Mark.Donaldson AT experianems DOT com>
03/03/2004 04:32 PM

 
        To:     "'ckstehman AT pepco DOT com'" <ckstehman AT pepco DOT com>, 
Paul Esson 
<paul.esson AT redstor DOT com>
        cc:     veritas-bu AT mailman.eng.auburn DOT edu, veritas-bu-admin AT 
mailman.eng.auburn DOT edu
        Subject:        RE: [Veritas-bu] User Directed Backup and Oracle


The method below works but you should be aware that if every tablespace in 
the DB is in hot backup mode at the same time, all writes are queued to 
the redo logs and a busy DB will slow to a crawl and go though redo space 
in a big hurry.
 
Another method to do a hot backup is:
 
Query DB for all tablespace names
for each tablespace in tablespace_list
  set tablespace in hotbackup mode
  query DB for list of Unix files in tablespace
  send files via bpbackup to tape
  unset tablespace
loop for next tablespace
Then:
  backup control files to trace - send them to tape
  roll your redo to archived redo
  send all archived redo logs from start of backup time end of backup time 
to tape
 
The set of archived redo logs combined with the file backups are 
recoverable by first restoring the files then rolling the files forward to 
a consistent point in time using the set of archived redo logs.  This 
method will also queue writes to redo but only for the tablespace that's 
in Hotbackup mode at the time of the write activity.
 
DB never goes down.
 
-M
-----Original Message-----
From: ckstehman AT pepco DOT com [mailto:ckstehman AT pepco DOT com]
Sent: Wednesday, March 03, 2004 8:46 AM
To: Paul Esson
Cc: veritas-bu AT mailman.eng.auburn DOT edu; 
veritas-bu-admin AT mailman.eng.auburn DOT edu
Subject: Re: [Veritas-bu] User Directed Backup and Oracle


Paul, 

You can use the BPSTART_NOTIFY and BPEND_NOTIFY feature to have DBA 
Shutdown and backup scripts and 
have Netbackup run the backup, and then call scripts to restart the 
database.   
We use thisfeature to perform hot backups of some of our Oracle databases. 

The BPSART_NOTIFY script calls a job to put the tablespaces in backup 
mode, then runs the backup policy, 
when the backup policy is complete, the BPEND_NOTIFY script is called to 
take the tablspaces out of backup 
mode and return things to normal. We do this for databases that have 
archivelog mode turned on. 

In your case, you could use this same process to do what you are 
describing to call your DBA scripts to set up the flat files, 
then have the standard policy backup the files, then the bpend could call 
any further scripts to restart the database, etc. 

The advantage to this bpend/bpstart featuer is that the backups 
are scheduled from the master server and you do not need a cron job to run 
the backups. 

I can send you copies of our scripts if you like.   


=============================
Carl Stehman
PHI Services Company
202-331-6619
Pager 301-765-2703
ckstehman AT pepco DOT com 




"Paul Esson" <paul.esson AT redstor DOT com> 
Sent by: veritas-bu-admin AT mailman.eng.auburn DOT edu 
03/03/2004 08:22 AM 
        
        To:        <veritas-bu AT mailman.eng.auburn DOT edu> 
        cc:         
        Subject:        [Veritas-bu] User Directed Backup and Oracle



Folks,

I am trying to establish policies and schedules to enable me to backup 
Oracle databases in the following manner and wanted to know if this is a 
sensible approach. Any constructive comments would be much appreciated. 
Unfortunatley, my scripting skills are failrly basic.

NetBackup Version 4.5 FP6
Master Server Windows 2000
Oracle clients Solaris 2.6 and 8

We do not want to use RMAN and the NetBackup Oracle Extension because we 
want to keep the costs down and simplify the restore process to recovering 
flat files.  The DBA has scripted routines to backup the databases to flat 
files and place those files in a specific directory and I was thinking I 
could set-up automated schedules for fulls and incrementals that would 
control the backup frequency and corresponding user backup schedules that 
would backup the flat files.  The user backup schedule would run a script 
via its file list that is a wrapper for the DBA's script that calls the 
bpbackup command afterwards to backup the flat files to NetBackup.

Can I do this with a standard policy type?  I have see something similar 
for an Oracle policy type where a wrapper script calls RMAN.  Does anyone 
have anything similar they could share with me?

I have an additional issue where a database resident on a UNIX client 
needs to be backed up in unison with a filestore on a Windows 2000 client. 
 Is there any way I can relate the two activities and control them through 
NetBackup?  The logic would have to be something like:


*                 Shutdown UNIX databases
*                 Run DBA script to backup UNIX databases
*                 Run NetBackup backup of  UNIX database backup flat files
*                 Run NetBackup backup of Windows filestore [ideally if 
this could be run in parallel with above after database shutdown]
*                 Start UNIX database

I need to keep the database down while the filestore is backed up for 
consistency.  I may even need to stop a service on the Windows 2000 system 
before commencing the filestore backup.  AM I chasing shadows here?

Regards,

Paul Esson


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






--=_alternative 0048ED4085256E4D_=
Content-Type: text/html; charset="us-ascii"


<br><font size=2 face="sans-serif">Mark;</font>
<br>
<br><font size=2 face="sans-serif">Good suggestion!, I'll pass it to our DBA's. 
&nbsp; In our environment we do these backups after hours when activity is 
light.</font>
<br><font size=2 face="sans-serif">We use the Veritas Oracle agent and RMAN for 
our busy databases. &nbsp;</font>
<br><font size=2 face="sans-serif"><br>
=============================<br>
Carl Stehman<br>
PHI Services Company<br>
202-331-6619<br>
Pager 301-765-2703<br>
ckstehman AT pepco DOT com</font>
<br>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td>
<td><font size=1 face="sans-serif"><b>&quot;Donaldson, Mark&quot; 
&lt;Mark.Donaldson AT experianems DOT com&gt;</b></font>
<p><font size=1 face="sans-serif">03/03/2004 04:32 PM</font>
<br>
<td><font size=1 face="Arial">&nbsp; &nbsp; &nbsp; &nbsp; </font>
<br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; To: &nbsp; 
&nbsp; &nbsp; &nbsp;&quot;'ckstehman AT pepco DOT com'&quot; &lt;ckstehman AT 
pepco DOT com&gt;, Paul Esson &lt;paul.esson AT redstor DOT com&gt;</font>
<br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; cc: &nbsp; 
&nbsp; &nbsp; &nbsp;veritas-bu AT mailman.eng.auburn DOT edu, veritas-bu-admin 
AT mailman.eng.auburn DOT edu</font>
<br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; Subject: &nbsp; 
&nbsp; &nbsp; &nbsp;RE: [Veritas-bu] User Directed Backup and 
Oracle</font></table>
<br>
<br>
<br><font size=2 color=blue face="Arial">The method below works but you should 
be aware that if every tablespace in the DB is in hot backup mode at the same 
time, all writes are queued to the redo logs and a busy DB will slow to a crawl 
and go though redo space in a big hurry.</font>
<br><font size=3 face="Times New Roman">&nbsp;</font>
<br><font size=2 color=blue face="Arial">Another method to do a hot backup 
is:</font>
<br><font size=3 face="Times New Roman">&nbsp;</font>
<br><font size=2 color=blue face="Arial">Query DB for all tablespace 
names</font>
<br><font size=2 color=blue face="Arial">for each tablespace in 
tablespace_list</font>
<br><font size=2 color=blue face="Arial">&nbsp; set tablespace in hotbackup 
mode</font>
<br><font size=2 color=blue face="Arial">&nbsp; query DB for list of Unix files 
in tablespace</font>
<br><font size=2 color=blue face="Arial">&nbsp; send files via bpbackup to 
tape</font>
<br><font size=2 color=blue face="Arial">&nbsp; unset tablespace</font>
<br><font size=2 color=blue face="Arial">loop for next tablespace</font>
<br><font size=2 color=blue face="Arial">Then:</font>
<br><font size=2 color=blue face="Arial">&nbsp; backup control files to trace - 
send them to tape</font>
<br><font size=2 color=blue face="Arial">&nbsp; roll your redo to archived 
redo</font>
<br><font size=2 color=blue face="Arial">&nbsp; send all archived redo logs 
from start of backup time end of backup time to tape</font>
<br><font size=3 face="Times New Roman">&nbsp;</font>
<br><font size=2 color=blue face="Arial">The set of archived redo logs combined 
with the file backups are recoverable by first restoring the files then rolling 
the files forward to a consistent point in time using the set of archived redo 
logs. &nbsp;This method will also queue writes to redo but only for the 
tablespace that's in Hotbackup mode at the time of the write activity.</font>
<br><font size=3 face="Times New Roman">&nbsp;</font>
<br><font size=2 color=blue face="Arial">DB never goes down.</font>
<br><font size=3 face="Times New Roman">&nbsp;</font>
<br><font size=2 color=blue face="Arial">-M</font>
<br><font size=2 face="Tahoma">-----Original Message-----<b><br>
From:</b> ckstehman AT pepco DOT com [mailto:ckstehman AT pepco DOT com]<b><br>
Sent:</b> Wednesday, March 03, 2004 8:46 AM<b><br>
To:</b> Paul Esson<b><br>
Cc:</b> veritas-bu AT mailman.eng.auburn DOT edu; veritas-bu-admin AT 
mailman.eng.auburn DOT edu<b><br>
Subject:</b> Re: [Veritas-bu] User Directed Backup and Oracle<br>
</font>
<br><font size=2 face="sans-serif"><br>
Paul,</font><font size=3 face="Times New Roman"> <br>
</font><font size=2 face="sans-serif"><br>
You can use the BPSTART_NOTIFY and BPEND_NOTIFY feature to have DBA Shutdown 
and backup scripts and</font><font size=3 face="Times New Roman"> </font><font 
size=2 face="sans-serif"><br>
have Netbackup run the backup, and then call scripts to restart the database. 
&nbsp;</font><font size=3 face="Times New Roman"> </font><font size=2 
face="sans-serif"><br>
We use thisfeature to perform hot backups of some of our Oracle 
databases.</font><font size=3 face="Times New Roman"> <br>
</font><font size=2 face="sans-serif"><br>
The BPSART_NOTIFY script calls a job to put the tablespaces in backup mode, 
then runs the backup policy,</font><font size=3 face="Times New Roman"> 
</font><font size=2 face="sans-serif"><br>
when the backup policy is complete, the BPEND_NOTIFY script is called to take 
the tablspaces out of backup</font><font size=3 face="Times New Roman"> 
</font><font size=2 face="sans-serif"><br>
mode and return things to normal. We do this for databases that have archivelog 
mode turned on.</font><font size=3 face="Times New Roman"> <br>
</font><font size=2 face="sans-serif"><br>
In your case, you could use this same process to do what you are describing to 
call your DBA scripts to set up the flat files,</font><font size=3 face="Times 
New Roman"> </font><font size=2 face="sans-serif"><br>
then have the standard policy backup the files, then the bpend could call any 
further scripts to restart the database, etc.</font><font size=3 face="Times 
New Roman"> <br>
</font><font size=2 face="sans-serif"><br>
The advantage to this bpend/bpstart featuer is that the backups</font><font 
size=3 face="Times New Roman"> </font><font size=2 face="sans-serif"><br>
are scheduled from the master server and you do not need a cron job to run the 
backups.</font><font size=3 face="Times New Roman"> <br>
</font><font size=2 face="sans-serif"><br>
I can send you copies of our scripts if you like. &nbsp;</font><font size=3 
face="Times New Roman"> <br>
</font><font size=2 face="sans-serif"><br>
<br>
=============================<br>
Carl Stehman<br>
PHI Services Company<br>
202-331-6619<br>
Pager 301-765-2703<br>
ckstehman AT pepco DOT com</font><font size=3 face="Times New Roman"> <br>
<br>
<br>
</font>
<table width=100%>
<tr valign=top>
<td width=2%>
<td width=44%><font size=1 face="sans-serif"><b>&quot;Paul Esson&quot; 
&lt;paul.esson AT redstor DOT com&gt;</b></font><font size=3 face="Times New 
Roman"> </font><font size=1 face="sans-serif"><br>
Sent by: veritas-bu-admin AT mailman.eng.auburn DOT edu</font><font size=3 
face="Times New Roman"> </font>
<p><font size=1 face="sans-serif">03/03/2004 08:22 AM</font><font size=3 
face="Times New Roman"> </font>
<td width=53%><font size=1 face="Arial">&nbsp; &nbsp; &nbsp; &nbsp; 
</font><font size=1 face="sans-serif"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;To: &nbsp; &nbsp; &nbsp; &nbsp;&lt;veritas-bu AT 
mailman.eng.auburn DOT edu&gt;</font><font size=3 face="Times New Roman"> 
</font><font size=1 face="sans-serif"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;cc: &nbsp; &nbsp; &nbsp; &nbsp;</font><font size=3 
face="Times New Roman"> </font><font size=1 face="sans-serif"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;Subject: &nbsp; &nbsp; &nbsp; &nbsp;[Veritas-bu] 
User Directed Backup and Oracle</font></table>
<br><font size=3 face="Times New Roman"><br>
<br>
</font><font size=2 face="Courier New"><br>
Folks,<br>
<br>
I am trying to establish policies and schedules to enable me to backup Oracle 
databases in the following manner and wanted to know if this is a sensible 
approach. Any constructive comments would be much appreciated. 
&nbsp;Unfortunatley, my scripting skills are failrly basic.<br>
<br>
NetBackup Version 4.5 FP6<br>
Master Server Windows 2000<br>
Oracle clients Solaris 2.6 and 8<br>
<br>
We do not want to use RMAN and the NetBackup Oracle Extension because we want 
to keep the costs down and simplify the restore process to recovering flat 
files. &nbsp;The DBA has scripted routines to backup the databases to flat 
files and place those files in a specific directory and I was thinking I could 
set-up automated schedules for fulls and incrementals that would control the 
backup frequency and corresponding user backup schedules that would backup the 
flat files. &nbsp;The user backup schedule would run a script via its file list 
that is a wrapper for the DBA's script that calls the bpbackup command 
afterwards to backup the flat files to NetBackup.<br>
<br>
Can I do this with a standard policy type? &nbsp;I have see something similar 
for an Oracle policy type where a wrapper script calls RMAN. &nbsp;Does anyone 
have anything similar they could share with me?<br>
</font>
<br><font size=2 face="Courier New">I have an additional issue where a database 
resident on a UNIX client needs to be backed up in unison with a filestore on a 
Windows 2000 client. &nbsp;Is there any way I can relate the two activities and 
control them through NetBackup? &nbsp;The logic would have to be something 
like:<br>
<br>
<br>
* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Shutdown UNIX 
databases<br>
* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Run DBA script to 
backup UNIX databases<br>
* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Run NetBackup backup 
of &nbsp;UNIX database backup flat files<br>
* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Run NetBackup backup 
of Windows filestore [ideally if this could be run in parallel with above after 
database shutdown]<br>
* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Start UNIX 
database<br>
<br>
I need to keep the database down while the filestore is backed up for 
consistency. &nbsp;I may even need to stop a service on the Windows 2000 system 
before commencing the filestore backup. &nbsp;AM I chasing shadows here?<br>
<br>
Regards,<br>
<br>
Paul Esson<br>
<br>
<br>
_______________________________________________<br>
Veritas-bu maillist &nbsp;- &nbsp;Veritas-bu AT mailman.eng.auburn DOT edu<br>
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu</font><font size=3 
face="Times New Roman"><br>
<br>
<br>
</font>
<br>
<br>
<br>
--=_alternative 0048ED4085256E4D_=--

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