Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Rman level 0 incremental backup – why restore needs older backups?

883 views
Skip to first unread message

zigzagdna

unread,
Jul 26, 2009, 4:26:11 AM7/26/09
to
I am on Oracle 10.2.0.3 on HP UNIX 11.2

I have always been doing rman level 0 backup using commands like:
backup as compressed backupset
level 0 incremental
Format 'dbfile_%U%_%t'
database;

I thought level 0 incremental is full backup, i.e., does backup of
every block in the file.
My backup was done on July 20,2009 6:00PM and ended on 6:30PM.
Now I am doing point in time recovery to restore database until July
20, 6:31PM.
Restore should only need backup files from July 20, 2009 6:00PM
onwards, But for some reason
restore requires backup files as old as from July 10, 2009.
I thought level 0 incremental does full backup, i.e, it does not need
older backups.

Can any one explain why? Does it have to do with use of compressed?

I will think in I just did level 0 (without incremental), then for
sure I will not need older backups. Using level 0 compressed will do
the same, i.e., full backup without requiring older backups.

John Hurley

unread,
Jul 26, 2009, 9:06:34 AM7/26/09
to

Well the simple answer is that you are thinking incorrectly.

http://download.oracle.com/docs/cd/B19306_01/backup.102/b14192/bkup004.htm

When rman starts a level 0 incremental it checks to see when the last
level 0 was taken and gets blocks changed since that level 0.

If it cannot see/find a previous level 0 incremental backup then it
gets a full backup.

One strategy is to move older backups off to tape ( sometimes without
even using rman or telling rman about that ) ... deleting the old
backup ... doing a cross check ... then doing a level 0 incremental.

Bottom line you need to both understand what you are doing and test
your backup strategy so you don't surprise yourself when you actually
have an important recovery operation needed to perform.

zigzagdna

unread,
Jul 26, 2009, 10:37:41 AM7/26/09
to
On Jul 26, 9:06 am, John Hurley <johnbhur...@sbcglobal.net> wrote:
> On Jul 26, 4:26 am, zigzagdna <zigzag...@yahoo.com> wrote:
>
>
>
>
>
> > I am on Oracle 10.2.0.3 on HP UNIX 11.2
>
> > I have always been doing rman level  0 backup using commands like:
> > backup as compressed backupset
> > level 0 incremental
> > Format 'dbfile_%U%_%t'
> > database;
>
> > I thought level 0 incremental is full backup, i.e., does backup of
> > every block in the file.
> > My backup was done on July 20,2009 6:00PM and ended on 6:30PM.
> > Now I am doing point in time recovery to restore database until July
> > 20, 6:31PM.
> > Restore should only need backup files from July 20, 2009 6:00PM
> > onwards, But for some reason
> > restore requires backup files as old as from July 10, 2009.
> >  I thought level 0 incremental does full backup, i.e, it does not need
> > older backups.
>
> > Can any one explain why? Does it have to do with use of compressed?
>
> > I will think in I just did level 0 (without incremental), then for
> > sure I will not need older backups. Using level 0 compressed will do
> > the same, i.e., full backup without requiring older backups.
>
> Well the simple answer is that you are thinking incorrectly.
>
> http://download.oracle.com/docs/cd/B19306_01/backup.102/b14192/bkup00...

>
> When rman starts a level 0 incremental it checks to see when the last
> level 0 was taken and gets blocks changed since that level 0.
>
> If it cannot see/find a previous level 0 incremental backup then it
> gets a full backup.
>
> One strategy is to move older backups off to tape ( sometimes without
> even using rman or telling rman about that ) ... deleting the old
> backup ... doing a cross check ... then doing a level 0 incremental.
>
> Bottom line you need to both understand what you are doing and test
> your backup strategy so you don't surprise yourself when you actually
> have an important recovery operation needed to perform.- Hide quoted text -
>
> - Show quoted text -

All the documenation I have read is:

A level 0 incremental backup is the base backup for subsequent
incremental backups.

It copies all blocks containing data, backing the datafile up into a
backup set just as a full backup would. The only difference between a
level 0 incremental backup and a full backup is that a full backup
is not included in an incremental strategy. That is after taking full
backup , you can’t perform incremental backup over.

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

If incremenatl level 0 did incremenatl since last level 0, one will
need lots of older backups which makes no sense.
Somehow, I cannot read the URL in your response.

Bob Jones

unread,
Jul 26, 2009, 11:53:56 AM7/26/09
to
> Well the simple answer is that you are thinking incorrectly.

> http://download.oracle.com/docs/cd/B19306_01/backup.102/b14192/bkup004.htm

> When rman starts a level 0 incremental it checks to see when the last
> level 0 was taken and gets blocks changed since that level 0.

> If it cannot see/find a previous level 0 incremental backup then it
> gets a full backup.

I am afraid you may be mistakenly confused everyone.


Bob Jones

unread,
Jul 26, 2009, 12:03:09 PM7/26/09
to

_______________________________________________________________

That's correct. You just need to make sure your backup is complete and
accessible.


John Hurley

unread,
Jul 26, 2009, 1:29:05 PM7/26/09
to
On Jul 26, 10:37 am, zigzagdna <zigzag...@yahoo.com> wrote:

snip

> All the documenation I have read is:
>
> A level 0 incremental backup is the base backup for subsequent
> incremental backups.
>
> It copies all blocks containing data, backing the datafile up into a
> backup set just as a full backup would. The only difference between a
> level 0 incremental backup and a full backup is that a full backup
> is not included in an incremental strategy. That is after taking full
> backup , you can’t perform incremental backup over.

How about posting the output and the scripts that were run for the
backups in question along with the script and output from the recovery
that you say is going back too far in time?

zigzagdna

unread,
Jul 26, 2009, 6:31:44 PM7/26/09
to

I am doing straightforward rman commands which are shown towards the
end:
I ran restore database preview to see what backup sets are needed for
the restore. And preview output shows the latest incremental level 0
backup sets plus a few archive logs, so I suspect problem is not with
RMAn but with VERITAS Netbackup (now Symantec Netbackup) . Netbackup
cannot find the backup set in the latest tape, so it goes to a
pervious day tape (again unsuccessful), a day pervious to previous day
step and so on. I am doing a DR exercise and DR exercise only took
one week’s tapes and my backup set was not found on any tape/ I have
to follow with Netbackup support, why backups are bot being found on
the tapes.
Thanks

*** backup commands***
Backup as compressed backup set
Incremental level 0
Database;
Backup
Archivelog
Delete input;

*** Restore command ***

Set until time..
Restore database;
Recover database;

Preview command is:
restore database preview

John Hurley

unread,
Jul 26, 2009, 6:56:26 PM7/26/09
to
On Jul 26, 6:31 pm, zigzagdna <zigzag...@yahoo.com> wrote:

snip

Well what you just said here is a different story that your original
post here on this subject.

I am a strong believer in doing rman backups to disk and keeping the
most recent complete backup on disk. That might be an approach that
your shop might really consider.

Nothing wrong with moving an older no longer needed backup from disk
to tape.

If you are really in a major type problem ... do you have time to
restore from tape? Let alone go thru things like well I thought we had
a good backup on tape.

For future postings on topics like this ... it also might be a good
idea to note in your original posting that you are just testing right
now.

steved...@gmail.com

unread,
Jul 27, 2009, 8:00:08 AM7/27/09
to
On Jul 26, 6:31 pm, zigzagdna <zigzag...@yahoo.com> wrote:

It sounds to me like you don't have complete database backup for the
time you think.

Try either..

list backup;

in RMAN, or ...

select completion_time,df.*
from (select file#,
name,bytes,
unrecoverable_time
from v$datafile) df,
(select max(completion_time) completion_time,
file#
from v$backup_datafile
group by file#) b
where df.file#=b.file#(+);

...in SQL*PLUS.

Mark D Powell

unread,
Jul 27, 2009, 9:36:12 AM7/27/09
to
On Jul 26, 4:26 am, zigzagdna <zigzag...@yahoo.com> wrote:

Considering your ackups are being shuttled off to tape and the issue
you are having with the tape management software finding the tape to
use I think you would be much better off with full backups. Besides
if all your backups are going to be level 0 then there is no valid
reason to do a incremental backup to begin with. If at all possible
you want to keep a copy of your most recent full backup on disk.

IMHO -- Mark D Powell --


0 new messages