Home » RDBMS Server » Backup & Recovery » Incremental level backup 1 without level 0 (Oracle 12.2)
Incremental level backup 1 without level 0 [message #684021] Wed, 24 March 2021 11:32 Go to next message
Ikebukuro
Messages: 2
Registered: February 2016
Junior Member

Hello experts,

I saw last year one strange thing about RMAN and incremental level backup.


I connect to my PDB with RMAN.
[oracle@vbgeneric ~]$ rman target SYS@orcl
Recovery Manager: Release 12.2.0.1.0 - Production on Sat Sep 5 11:54:26 2020
Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.
target database Password:
connected to target database: ORCL12C:ORCL (DBID=2846920952)


No backup for the moment.
RMAN> list backupset;
specification does not match any backup in the repository

I backup my PDB and the control file.
RMAN> backup database include current controlfile;
Starting backup at 13/09/2020 12:05:32
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=34 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00010 name=/u01/app/oracle/oradata/orcl12c/orcl/sysaux01.dbf
input datafile file number=00012 name=/u01/app/oracle/oradata/orcl12c/orcl/users01.dbf
input datafile file number=00011 name=/u01/app/oracle/oradata/orcl12c/orcl/undotbs01.dbf
input datafile file number=00009 name=/u01/app/oracle/oradata/orcl12c/orcl/system01.dbf
input datafile file number=00013 name=/u01/app/oracle/oradata/orcl12c/orcl/APEX_1991375173370654.dbf
input datafile file number=00014 name=/u01/app/oracle/oradata/orcl12c/orcl/APEX_1993195660370985.dbf
channel ORA_DISK_1: starting piece 1 at 13/09/2020 12:05:33
channel ORA_DISK_1: finished piece 1 at 13/09/2020 12:06:18
piece handle=/u01/app/oracle/fast_recovery_area/orcl12c/ORCL12C/49BFF8A6BB912582E0530100007F8BE4/backupset/2020_09_13/o1_mf_nnndf_TAG202009 13T12 0533_howjtfns_.bkp tag=TAG20200913T120533 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:45

channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
channel ORA_DISK_1: starting piece 1 at 13/09/2020 12:06:19
channel ORA_DISK_1: finished piece 1 at 13/09/2020 12:06:20
piece handle=/u01/app/oracle/fast_recovery_area/orcl12c/ORCL12C/49BFF8A6BB912582E0530100007F8BE4/backupset/2020_09_13/o1_mf_ncnnf_TAG202009 13T120533_howjvvnw_.bkp tag=TAG20200913T120533 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 13/09/2020 12:06:20


And I made a mistake : I backuped my database with an incremental backup level 1 but I had no backup level 0.
I thought that Oracle said something but no and it is disturbing!
RMAN> BACKUP INCREMENTAL LEVEL 1 DATABASE include current controlfile;
Starting backup at 13/09/2020 12:11:12
using channel ORA_DISK_1
no parent backup or copy of datafile 10 found
no parent backup or copy of datafile 11 found
no parent backup or copy of datafile 9 found

Surprise : RMAN did a backup level 0 for the tablespaces SYSTEM, SYSAUX, UNDO but I asked level 1.
channel ORA_DISK_1: starting incremental level 0 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00010 name=/u01/app/oracle/oradata/orcl12c/orcl/sysaux01.dbf
input datafile file number=00011 name=/u01/app/oracle/oradata/orcl12c/orcl/undotbs01.dbf
input datafile file number=00009 name=/u01/app/oracle/oradata/orcl12c/orcl/system01.dbf
channel ORA_DISK_1: starting piece 1 at 13/09/2020 12:11:12
channel ORA_DISK_1: finished piece 1 at 13/09/2020 12:11:37
piece handle=/u01/app/oracle/fast_recovery_area/orcl12c/ORCL12C/49BFF8A6BB912582E0530100007F8BE4/backupset/2020_09_13/o1_mf_nnnd0_TAG202009 13T121112_howk51kf_.bkp tag=TAG20200913T121112 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25

And here, I have a backup level 1 for the tablespaces USERS01 and APEX...
That is very disturbing, I do not understand why Oracle did that : a mix of level 0 and level 1 for the same backup.
channel ORA_DISK_1: starting incremental level 1 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00012 name=/u01/app/oracle/oradata/orcl12c/orcl/users01.dbf
input datafile file number=00013 name=/u01/app/oracle/oradata/orcl12c/orcl/APEX_1991375173370654.dbf
input datafile file number=00014 name=/u01/app/oracle/oradata/orcl12c/orcl/APEX_1993195660370985.dbf
channel ORA_DISK_1: starting piece 1 at 13/09/2020 12:11:37
channel ORA_DISK_1: finished piece 1 at 13/09/2020 12:11:38
piece handle=/u01/app/oracle/fast_recovery_area/orcl12c/ORCL12C/49BFF8A6BB912582E0530100007F8BE4/backupset/2020_09_13/o1_mf_nnnd1_TAG202009 13T121112_howk5syb_.bkp tag=TAG20200913T121112 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting incremental level 1 datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
channel ORA_DISK_1: starting piece 1 at 13/09/2020 12:11:40
channel ORA_DISK_1: finished piece 1 at 13/09/2020 12:11:41
piece handle=/u01/app/oracle/fast_recovery_area/orcl12c/ORCL12C/49BFF8A6BB912582E0530100007F8BE4/backupset/2020_09_13/o1_mf_ncnn1_TAG202009 13T121112_howk5w25_.bkp tag=TAG20200913T121112 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 13/09/2020 12:11:41


If I check, we see that for the backupset 25 it is an incremental backup level 0 but for the backupset 26 it is level 1.
RMAN> list backupset;
...
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
25 <b><u>Incr 0</u></b> 1.30G DISK 00:00:14 13/09/2020 12:11:26
BP Key: 25 Status: AVAILABLE Compressed: NO Tag: TAG20200913T121112
Piece Name: /u01/app/oracle/fast_recovery_area/orcl12c/ORCL12C/49BFF8A6BB912582E0530100007F8BE4/backupset/2020_09_13/o1_mf_nnnd0_TAG20200913T1211 12_howk51kf_.bkp

List of Datafiles in backup set 25
File LV Type Ckp SCN Ckp Time Abs Fuz SCN Sparse Name
---- -- ---- ---------- ------------------- ----------- ------ ----
9 0 Incr 3274990 13/09/2020 12:11:12 NO /u01/app/oracle/oradata/orcl12c/orcl/system01.dbf
10 0 Incr 3274990 13/09/2020 12:11:12 NO /u01/app/oracle/oradata/orcl12c/orcl/sysaux01.dbf
11 0 Incr 3274990 13/09/2020 12:11:12 NO /u01/app/oracle/oradata/orcl12c/orcl/undotbs01.dbf

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
26 <b><u>Incr 1</u></b> 71.41M DISK 00:00:01 13/09/2020 12:11:38
BP Key: 26 Status: AVAILABLE Compressed: NO Tag: TAG20200913T121112
Piece Name: /u01/app/oracle/fast_recovery_area/orcl12c/ORCL12C/49BFF8A6BB912582E0530100007F8BE4/backupset/2020_09_13/o1_mf_nnnd1_TAG20200913T1211 12_howk5syb_.bkp

List of Datafiles in backup set 26
File LV Type Ckp SCN Ckp Time Abs Fuz SCN Sparse Name
---- -- ---- ---------- ------------------- ----------- ------ ----
12 1 Incr 3275004 13/09/2020 12:11:37 NO /u01/app/oracle/oradata/orcl12c/orcl/users01.dbf
13 1 Incr 3275004 13/09/2020 12:11:37 NO /u01/app/oracle/oradata/orcl12c/orcl/APEX_1991375173370654.dbf
14 1 Incr 3275004 13/09/2020 12:11:37 NO /u01/app/oracle/oradata/orcl12c/orcl/APEX_1993195660370985.dbf

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
27 Incr 1 17.91M DISK 00:00:01 13/09/2020 12:11:40
BP Key: 27 Status: AVAILABLE Compressed: NO Tag: TAG20200913T121112
Piece Name: /u01/app/oracle/fast_recovery_area/orcl12c/ORCL12C/49BFF8A6BB912582E0530100007F8BE4/backupset/2020_09_13/o1_mf_ncnn1_TAG20200913T1211 12_howk5w25_.bkp
Control File Included: Ckp SCN: 3275005 Ckp time: 13/09/2020 12:11:38


Is this normal? OK, I made a mistake but sometime it happens, RMAN detected that there was no backup incremental level 0 for the system, sysaux and undo tablespaces of my PDB so it made it but why did it not do the same for the others tablespaces? And there was no warning... It is a big problem because this backup is useless. When I want to do a PITR about a dropped table, I have an error : normal, there is no backup level 0 about my tablespace. I do not show all the output because my question is about the decision made by RMAN when I backup a database.
RMAN> RECOVER TABLE HR.ZZ02 OF PLUGGABLE DATABASE ORCL UNTIL SCN 3408453 AUXILIARY DESTINATION '/u01/app/oracle/RMAN_TEMP';
...
RMAN-00571: ===========================================================
RMAN-00569: =========
ERROR MESSAGE STACK FOLLOWS
=========
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 09/19/2020 06:53:22
RMAN-05063: Cannot recover specified tables
RMAN-05057: Table HR.ZZ02 not found

Have a nice day,

Re: Incremental level backup 1 without level 0 [message #684023 is a reply to message #684021] Wed, 24 March 2021 12:08 Go to previous messageGo to next message
Michel Cadot
Messages: 68624
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

I see a strange thing this day, you did not feedback in your previous topic and did not follow what we asked you to do to post in this topic.
Is this normal? Smile

Database Backup and Recovery Reference, Chapter 2.6 BACKUP, section Incremental Backups:


Quote:
The database performs checks when attempting to create a level 1 incremental backup to ensure that the incremental backup is usable by a subsequent RECOVER command. Among the checks performed are:
* A level 0 backup must exist for each data file in the BACKUP command as the base backup for an incremental strategy. Level 0 backups must not have status UNAVAILABLE. If no level 0 backup exists, then RMAN makes a level 0 backup automatically.
...

[Updated on: Wed, 24 March 2021 12:20]

Report message to a moderator

Re: Incremental level backup 1 without level 0 [message #684024 is a reply to message #684021] Thu, 25 March 2021 06:03 Go to previous message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
Even though there is no level 0 backup of those files, there could be image copies. These can be used as the base for incremental level 1.
Previous Topic: Restoring Oracle db to new server
Next Topic: How to recover the database when running only on buffer cache
Goto Forum:
  


Current Time: Thu Mar 28 08:10:07 CDT 2024