DIFFERENCE BETWEEN OBSOLETE AND EXPIRED BACKUP ORACLE

Obsolete – no longer needed for restore

Expired – no longer found on disk or tape

Obsolete and expired are just a backup tag indicator which represents the backup validity and availability based on the retention threshold set

RMAN> show all;

using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name ORCL19X are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default

If you report the obsolete backups, then you can see the last before backup in obsolete list because of retention with redundancy of 1

RMAN> report obsolete;

RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 1
Report of obsolete backups and copies
Type                 Key    Completion Time    Filename/Handle
-------------------- ------ ------------------ --------------------
Control File Copy     10     30-MAY-21          /data01/control01.ctl
Archive Log          126    27-JUN-21          /apps01/product/12.1.0/dbhome_1/dbs/arch1_125_1060279903.dbf
Archive Log          127    27-JUN-21          /apps01/product/12.1.0/dbhome_1/dbs/arch1_126_1060279903.dbf
Archive Log          128    28-JUN-21          /data01/ORCL19X/archivelog/2021_06_28/o1_mf_1_127_jfmnbnfp_.arc

Last full backup was taken on 28-JUN-21 and so last before backup should be obsolete

RMAN> list backup summary;


List of Backups
===============
Key     TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
------- -- -- - ----------- --------------- ------- ------- ---------- ---
35      B  F  A DISK        28-JUN-21       1       1       NO         TAG20210628T224009
36      B  F  A DISK        28-JUN-21       1       1       NO         TAG20210628T224009
37      B  F  A DISK        28-JUN-21       1       1       NO         TAG20210628T224009
38      B  F  A DISK        28-JUN-21       1       1       NO         TAG20210628T224009
39      B  F  A DISK        28-JUN-21       1       1       NO         TAG20210628T224117

If i check expired backups, i dont find any because all files exist on the disk

RMAN> list expired backup;

specification does not match any backup in the repository

Just perform a crosscheck to verify the status ‘AVAILABLE’. If you see ‘EXPIRED’ status, then the backup files are physically no longer present on the disk but logically recorded in the controlfile

RMAN> crosscheck backup;

allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=67 device type=DISK
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/data01/ORCL19X/backupset/2021_06_28/o1_mf_nnndf_TAG20210628T224009_jfn0ml2s_.bkp RECID=35 STAMP=1076452810
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/data01/ORCL19X/backupset/2021_06_28/o1_mf_nnndf_TAG20210628T224009_jfn0ml97_.bkp RECID=36 STAMP=1076452810
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/data01/ORCL19X/backupset/2021_06_28/o1_mf_nnndf_TAG20210628T224009_jfn0ml9k_.bkp RECID=37 STAMP=1076452810
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/data01/ORCL19X/backupset/2021_06_28/o1_mf_nnndf_TAG20210628T224009_jfn0mlf8_.bkp RECID=38 STAMP=1076452810
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/data01/ORCL19X/autobackup/2021_06_28/o1_mf_s_1076452877_jfn0op2g_.bkp RECID=39 STAMP=1076452878
Crosschecked 5 objects

All backuppieces are physically present on disk

[oracle@orcl19x oradata]$ ls -lrt /data01/ORCL19X/backupset/2021_06_28/
total 1535536
-rw-r----- 1 oracle oinstall   1089536 Jun 28 22:40 o1_mf_nnndf_TAG20210628T224009_jfn0ml2s_.bkp
-rw-r----- 1 oracle oinstall   5406720 Jun 28 22:40 o1_mf_nnndf_TAG20210628T224009_jfn0ml97_.bkp
-rw-r----- 1 oracle oinstall 668778496 Jun 28 22:41 o1_mf_nnndf_TAG20210628T224009_jfn0ml9k_.bkp
-rw-r----- 1 oracle oinstall 897114112 Jun 28 22:41 o1_mf_nnndf_TAG20210628T224009_jfn0mlf8_.bkp

Example of expired backup status

RMAN> crosscheck backup;

allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=427 device type=DISK
crosschecked backup piece: found to be 'EXPIRED'
backup piece handle=/data01/FRA/ORCL19X1/backupset/2020_12_20/o1_mf_nnnd0_TAG20201220T221356_hxyztglx_.bkp RECID=17 STAMP=1059689638
crosschecked backup piece: found to be 'EXPIRED'
backup piece handle=/data01/FRA/ORCL19X1/backupset/2020_12_20/o1_mf_nnnd0_TAG20201220T221356_hxyztgmc_.bkp RECID=18 STAMP=1059689638
crosschecked backup piece: found to be 'EXPIRED'
backup piece handle=/data01/FRA/ORCL19X1/backupset/2020_12_20/o1_mf_annnn_TAG20201220T221704_hxz008cn_.bkp RECID=19 STAMP=1059689824
crosschecked backup piece: found to be 'EXPIRED'
backup piece handle=/data01/FRA/ORCL19X1/autobackup/2020_12_20/o1_mf_s_1059689829_hxz00gdt_.bkp RECID=21 STAMP=1059689830
crosschecked backup piece: found to be 'EXPIRED'
backup piece handle=/data01/FRA/ORCL19X1/autobackup/2021_01_13/o1_mf_s_1061743135_hzxo6bgc_.bkp RECID=22 STAMP=1061743138
Crosschecked 5 objects

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s