Oracle RMAN – How to Identify and Delete RMAN Files

oraclerman

I need to clean up space and do a full backup of database.

Old backups are safe on tape.

My backups are on 2 specifics directories (2 channels).

So I did:

DELETE EXPIRED BACKUP;
DELETE OBSOLETE;
DELETE BACKUP;
DELETE DATAFILECOPY ALL;

Next LIST BACKUP did not found nothing.

Still, in my directories I have about 4 TB of data. Database is 8 TB.

File has names like:

  • 20160226historyotqusdq7_1_1.bck
  • 20151105historydata_D-HISTDB_I-3526265592_TS-history_2013_FNO-186_pmqlg4jl.bck

And so on, some hundreds of files.

HISTDB is the sid, history_2013 is one of the tablespaces.

How can I indentify what that files are and clean them in a safe way?

Oracle is version 11.2.0.2 on redhat linux, kernel version 2.6.18-238.el5

Best Answer

If the database does not know about those files, you should catalog them in RMAN:

catalog start with '/path/to/files';

After that you can use your above commands for identifying or deleting these files.

Deleting old backups in a safe way is achieved by running DELETE OBSOLETE, with the required retention set in configuration or specified in the command (e.g. DELETE OBSOLETE RECOVERY WINDOW OF 14 DAYS;).