904 Bedford St, New York NY 10014

(+1) 5184-453-1514

Delete Backups, Based on Retention Policy – RMAN Backups and Reporting

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.

Search

Popular Posts

  • Recovery Catalog Versions – RMAN Backups and Reporting
    Recovery Catalog Versions – RMAN Backups and Reporting

    I recommend that you create a recovery catalog for each version of the target databases that you are backing up. Doing so will save you some headaches with compatibility issues and upgrades. I have found it easier to use a recovery catalog when the database version of the rman client is the same version used…

  • Registering a Target Database – RMAN Backups and Reporting
    Registering a Target Database – RMAN Backups and Reporting

    Now, you can register a target database with the recovery catalog. Log in to the target database server. Ensure that you can establish connectivity to the recovery catalog database. For instance, one approach is to populate the TNS_ADMIN/tnsnames.ora file with an entry that points to the remote database. On the target database server, register the…

  • Creating a Recovery Catalog – RMAN Backups and Reporting
    Creating a Recovery Catalog – RMAN Backups and Reporting

    When I use a recovery catalog, I prefer to have a dedicated database that is used only for the recovery catalog. This ensures that the recovery catalog is not affected by any maintenance or downtime required by another application (and vice versa). Listed next are the steps for creating a recovery catalog: 1. Create a…

Tags