You can report on backups that RMAN has determined to be obsolete per the retention policy, as follows:
RMAN> report obsolete;
To delete obsolete backups, run the DELETE OBSOLETE command:
RMAN> delete obsolete;
You are prompted with this:
Do you really want to delete the above objects (enter YES or NO)?
If you are scripting the procedure, you can specify the delete not to prompt for input:
RMAN> delete noprompt obsolete;
To have RMAN delete obsolete archivelogs:
RMAN> crosscheck archivelog all; RMAN> delete archivelog all;
Run the CROSSCHECK command before running the DELETE command. Doing so ensures that RMAN is aware of whether a file is on disk.
Use Backup Sets or Image Copies
When you issue an RMAN BACKUP command, you can specify that the backup is one of the following:
• Backup set
• Image copy
A backup set is the default type of RMAN backup. A backup set contains backup pieces, which are binary files that only RMAN can write to or read from.
Backup sets are desirable because they are generally smaller than the data files being backed up. RMAN automatically attempts to create backup pieces with unused block compression.
In this mode, RMAN reads a bitmap to determine which blocks are allocated and reads only from those blocks in the data files.
Contrast the backup set with an image copy. An image copy creates a byte-for-byte identical copy of each data file.
The advantage of creating an image copy is that (if necessary) you can manipulate the image copy without using RMAN (as with an OS copy utility).
Additionally, in the event of a media failure, an image copy is a fast method of restoring data files, because RMAN has only to copy the file back from the backup location (there is no reconstructing of the data file, because it is an exact copy).
The size of the backup to disk is almost always a concern. Backup sets are more efficient regarding disk space consumption.
Because backup sets can take advantage of RMAN compression, there is also less I/O involved, compared with an image copy. In many environments, reducing the I/O so as not to impact other applications is a concern.
However, if you feel that you need direct control over the backup files that RMAN creates or you are in an environment in which the speed of the restore process is paramount, consider using image copies.