RMAN delete obsolete

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

RMAN delete obsolete

Roshan
Oracle DB 12.1.0.2
Solaris

Hello Erman,

can you please advise why delete obsolete does now work?

$ORACLE_HOME/bin/rman target / <<EOF >> /scripts/logdelobsolete.log
#CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT='/backup2/dwaredr/dwareARC_%U';
ALLOCATE CHANNEL FOR MAINTENANCE TYPE DISK;
delete noprompt obsolete device type disk;
exit;
EOF

I see full backups still on disk for October. Window size is 7 days.

total 15910802656
-rw-r-----   1 ora12c   nobody   705439232 Oct 11 00:05 dwareFULL_g00bac55_1_1
-rw-r-----   1 ora12c   nobody   100888705024 Oct 11 00:06 dwareFULL_ft0ba7lg_1_1
-rw-r-----   1 ora12c   nobody   321475264512 Oct 17 20:18 dwareFULL_iu0bs8u6_1_1
-rw-r-----   1 ora12c   nobody   374881878016 Oct 17 20:30 dwareFULL_it0bs8u5_1_1
-rw-r-----   1 ora12c   nobody   357041684480 Oct 17 20:40 dwareFULL_is0bs8u5_1_1
-rw-r-----   1 ora12c   nobody   362161225728 Oct 17 20:47 dwareFULL_ir0bs8u3_1_1
-rw-r-----   1 ora12c   nobody   461285097472 Oct 17 22:22 dwareFULL_iv0bsdhl_1_1
-rw-r-----   1 ora12c   nobody   423047561216 Oct 17 22:42 dwareFULL_j10bsepq_1_1
-rw-r-----   1 ora12c   nobody   340355809280 Oct 24 20:30 dwareFULL_vc0ceni9_1_1
-rw-r-----   1 ora12c   nobody   425351364608 Oct 24 20:38 dwareFULL_vd0cenia_1_1
-rw-r-----   1 ora12c   nobody   432131850240 Oct 24 20:48 dwareFULL_vb0ceni7_1_1
-rw-r-----   1 ora12c   nobody   404707688448 Oct 24 20:53 dwareFULL_va0ceni6_1_1
-rw-r-----   1 ora12c   nobody   396234686464 Oct 24 22:09 dwareFULL_vf0cetag_1_1
-rw-r-----   1 ora12c   nobody   397793427456 Oct 24 22:11 dwareFULL_ve0cess4_1_1
-rw-r-----   1 ora12c   nobody   318682955776 Oct 24 22:13 dwareFULL_vg0cettf_1_1
-rw-r-----   1 ora12c   nobody   371382386688 Oct 24 22:29 dwareFULL_vh0ceu5r_1_1
-rw-r-----   1 ora12c   nobody   25393254912 Oct 24 22:51 dwareFULL_vl0cf3qr_1_1
-rw-r-----   1 ora12c   nobody   29089207296 Oct 24 22:51 dwareFULL_vk0cf3qq_1_1
-rw-r-----   1 ora12c   nobody   383203704832 Oct 31 20:31 dwareFULL_c90d1662_1_1
-rw-r-----   1 ora12c   nobody   406526623744 Oct 31 20:48 dwareFULL_c70d1660_1_1
-rw-r-----   1 ora12c   nobody   363666718720 Oct 31 21:59 dwareFULL_cb0d1bgm_1_1
-rw-r-----   1 ora12c   nobody   357607374848 Oct 31 22:15 dwareFULL_cc0d1ch3_1_1
-rw-r-----   1 ora12c   nobody   299100667904 Oct 31 23:29 dwareFULL_ce0d1hk7_1_1
-rw-r-----   1 ora12c   nobody   430489370624 Oct 31 23:42 dwareFULL_cd0d1gmk_1_1

Regards,

Roshan
Reply | Threaded
Open this post in threaded view
|

Re: RMAN delete obsolete

ErmanArslansOracleBlog
Administrator
Maybe, RMAN doesn't know about those backups and that's why they are still in the filesystem and maybe that's why they are not deleted when you issue delete obsolete command.. maybe..

1)send me the rman "show all" output
2)send me list backup output.
Reply | Threaded
Open this post in threaded view
|

Re: RMAN delete obsolete

Roshan
Please find attached output.

output.log
Reply | Threaded
Open this post in threaded view
|

Re: RMAN delete obsolete

ErmanArslansOracleBlog
Administrator
I think Full backups (Incr 0) are not the actual problem. They are ok.. They are needed for recovery.. (for providing the recovability for 7 days)
However; the incremental(Incr 1) ones are weird ..
Also the backups in your filesystem is weird.. We don't have any backups for Oct 11 for instance.. I guess those backups are left there, rman doesn't know about them..

As for the old incremental backups that RMAN reports (for instance the ones in 25-OCT-21); did you delete the obsolete backups?
Reply | Threaded
Open this post in threaded view
|

Re: RMAN delete obsolete

Roshan
yes I did delete obsolete.
Reply | Threaded
Open this post in threaded view
|

Re: RMAN delete obsolete

ErmanArslansOracleBlog
Administrator
Ensure you have no offline datafiles /or Tablespaces.. Offline Tablespace and datafiles may prevent rman making old backups obsolete.

It seems some of your backups are on SBT / Tape, and some of them are on Disk.

Check this one, ensure it is not related with your case : OLD ARCHIVELOGS BACKUPS NOT RECOGNIZED AS OBSOLETE (Doc ID 2102055.1)

Run the following commands to diagnose;

list backup of archivelog all summary;
show retention policy;
list backup of database summary;
report obsolete;

İf still weird, enable debug on RMAN and re-issue report obsolete command and check the debug trace.

(Example : rman target / debug trace=/tmp/erm.log)

Do you run Streams processes in this database? -> Check -> Report/Delete obsolete not reporting/deleting obsolete backups of Archivelog Files (Doc ID 1553261.1)

Also check -> RMAN Does Not Delete The Obsolete Archivelog Due To Incomplete Full Backup (Doc ID 2448376.1)
RMAN Not Deleting Archive Log Backups due to READ ONLY Tablespace (Doc ID 2751210.1)
RMAN Retains Archivelog Backups Beyond Recovery Window for PDB(PDB$SEED) Recovery (Doc ID 2492130.1)

Also read this sentence ->

The retention policy is not responsible for deleting or rendering obsolete archived redo logs and incremental level 1 backups. Rather, these files become obsolete when no full backups exist that need them. Besides affecting full or level 0 data file and control file backups, the retention policy affects archived redo logs and level 1 incremental backups. First, RMAN decides which data file and control file backups are obsolete. Then, RMAN considers as obsolete all archived logs and incremental level 1 backups that are not needed to recover the oldest data file or control file backup that must be retained.