Networker

Re: [Networker] Some questions on Oracle backups using RMAN?

2006-10-19 12:14:48
Subject: Re: [Networker] Some questions on Oracle backups using RMAN?
From: Lancy Quadros <Lancy.Quadros AT ROTARY DOT ORG>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Thu, 19 Oct 2006 10:55:59 -0500
I am sorry to jump in on this thread so late. I will try to answer your
questions based on my experience with Networker, rman and NMO. Being a
UNIX admin and an Oracle/SQL Server DBA gives me a unique perspective on
database backups. I am assuming you have NMO installed.

1. How does NetWorker's schedule work with RMAN or does it?

The Networker Schedule does not work with NMO. The way we have
configured our backups is to create two schedules:
'Every Sunday' - Set to run fulls every Sunday and skip the rest of the
days.
'Every Weekday' - Set to run full from Monday thru Saturday and skip on
Sundays.

2. Do you have to write a separate script for each part of the database 
you want to recover?

The recover aspect is entirely handled by the DBA. RMAN gives you a lot
of flexibility in scripting recoveries. You could write standard scripts
to copy databases or recover entire databases over to a different
server.

3. Can you do a traditional incremental like NetWorker does with regular

data backups?

Yes - you can, the level has to be indicated in the rman script.

4. How do you recover from a particular NetWorker backup or point in
time?

The point in time has to be indicated in the rman recovery script. RMAN
will then consult the recovery catalog to find out what savesets are to
be recovered from the media. Provided the recovery is done within the
limits set by the retention policy on the client, networker will load
the volumes required for the recovery.

5. Does it matter that the bootstrap is not automatically backed up 
during an Oracle backup?

As long as you have another backup job scheduled after the Oracle jobs
to backup the bootstrap, it should be fine.

About backup levels, here is the explanation from the Oracle's docs:
==== Start of extract from Oracle Docs =====
"Copies only those data blocks that have changed since the last
incremental integer backup, where integer is any integer from 0 to 4.
For example, in a level 2 backup RMAN backs up all blocks used since the
most recent level 2, level 1, or level 0 backup. This type of
incremental backup is also called a differential backup to distinguish
it from a cumulative backup. 

A level 0 backup must exist as the base backup for an incremental
strategy. An incremental backup at level 0 is identical in content to a
full backup, but unlike a full backup the level 0 backup is considered a
part of the incremental strategy. If no level 0 backup exists when you
run a level 1 or higher backup, then RMAN makes a level 0 backup
automatically. 

Oracle performs checks when attempting to create an incremental backup
at a level greater than 0. These checks ensure that the incremental
backup is usable by a subsequent RECOVER command. Among the checks
performed are:

A level 0 backup set must exist, or level 0 datafile copies must exist
for each datafile in the BACKUP command. These backup sets must not be
marked UNAVAILABLE. If no level 0 backup exists, then RMAN automatically
generates one. 
Sufficient incremental backups taken since the level 0 must exist and be
available such that the incremental backup to be created is usable."
==== End of extract from Oracle Docs =====

Again, to recover the data, you cannot tell Networker directly how to
recover the data, your rman script should indicate what should be
recovered and from what date and time.

On the scripts you have posted, you will have to tweak it more if the
databases are in archivelog mode. So, your script for a database running
archivelog mode would look like this ( the tweaks are in CAPS ):

==== start of snippet =====
backup incremental level 4
   format 'INCR_%d_%U'
   (database) INCLUDING ARCHIVELOG 
   FORMAT 'INCR_ARCH_%U' <=== Like you have format for database file,
you could have one for archive log files too.
   DELETE INPUT ; <=== This keyword will delete the log files from disk
after the statement above has backed up the archivelogs and the
database. This is optional, you could have chosen to delete the logfiles
later on or had a separate job to backup only archive log files.
==== end of snippet =====

I hope this helps. 

Lancy
-----Original Message-----
From: EMC NetWorker discussion [mailto:NETWORKER AT LISTSERV.TEMPLE DOT EDU] On
Behalf Of George Sinclair
Sent: Monday, 16 October, 2006 6:23 PM
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Subject: [Networker] Some questions on Oracle backups using RMAN?

Hi,

1. How does NetWorker's schedule work with RMAN or does it?

2. Do you have to write a separate script for each part of the database 
you want to recover?

3. Can you do a traditional incremental like NetWorker does with regular

data backups?

4. How do you recover from a particular NetWorker backup or point in
time?

5. Does it matter that the bootstrap is not automatically backed up 
during an Oracle backup?

I know very little about Oracle, but working with our DBA , and we're 
trying to test backing up/recovering an Oracle 10g test database using 
NetWorker 7.2.2 on Unix. We're using RMAN. So far, we've been  able to 
run backups using two RMAN scripts (see below), but it seems that it 
always reports a level full for the saveset (RMAN:/script name) 
regardless of the level specified, and it's unclear how the schedule on 
the NetWorker side affects this, or if it's moot since the level is 
specified in the RMAN script, anyway? Also, it appears that Oracle only 
allows backup levels 0-4, so am I correct in thinking that to run the 
equivalent of a traditional Legato incremental we would need to run the 
same level again, like a level 4 and then another level 4 or a level 3 
and then another 3 or something like that?

Another thing I was reading in the documentation is that the server's 
bootstrap is supposed to get backed up following a scheduled Oracle 
backup, but I've not seen that happen. The group runs with no
errors and completes, but no bootstrap ever gets saved. I even tried a 
scheduled backup (no manual start). Ditto. I don't see why the server's 
bootstrap should need to get backed up just because an
Oracle backup ran, though. If the server's group runs later anyway, 
you're still going to get a bootstrap backup, right?

Finally, I'm unclear on how exactly you recover the darn data, and how 
to tell NetWorker that you want it from a certain time or date?

We have a custom pool (oracle) and two NSR client resources, each 
specifies one of the two different RMAN scripts below so we can have 
fulls or incrementals. Each client is in a different group, and both  
groups are members of the pool. I've read through so much NetWorker 
Oracle documentation my head is spinning [sigh].

Any help would be much appreciated.

George

<<< script to run incrementals >>

connect line goes here

run {
   allocate channel t1 type 'SBT_TAPE';

   backup incremental level 4
   format 'INCR_%d_%U'
   (database);

   release channel t1;

}


<<< script to handle level fulls >>>

connect line goes here

run {
   allocate channel t1 type 'SBT_TAPE';

   backup full filesperset 4
   format 'FULL_%d_%U'
   (database);

   release channel t1;

}

-- 
George Sinclair - NOAA/NESDIS/National Oceanographic Data Center
SSMC3 4th Floor Rm 4145       | Voice: (301) 713-3284 x210
1315 East West Highway        | Fax:   (301) 713-3301
Silver Spring, MD 20910-3282  | Web Site:  http://www.nodc.noaa.gov/
- Any opinions expressed in this message are NOT those of the US Govt. -


To sign off this list, send email to listserv AT listserv.temple DOT edu and
type "signoff networker" in the
body of the email. Please write to networker-request AT listserv.temple DOT edu
if you have any problems
wit this list. You can access the archives at
http://listserv.temple.edu/archives/networker.html or
via RSS at http://listserv.temple.edu/cgi-bin/wa?RSS&L=NETWORKER

To sign off this list, send email to listserv AT listserv.temple DOT edu and 
type "signoff networker" in the
body of the email. Please write to networker-request AT listserv.temple DOT edu 
if you have any problems
wit this list. You can access the archives at 
http://listserv.temple.edu/archives/networker.html or
via RSS at http://listserv.temple.edu/cgi-bin/wa?RSS&L=NETWORKER