Skip Headers
Oracle® Database 2 Day DBA
10g Release 2 (10.2)

Part Number B14196-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

Managing Your Backups

Managing RMAN backups, with or without Enterprise Manager, consists of two tasks: managing the backups of your database that are stored on disk or tape, and managing the record of those backups in the RMAN repository. Enterprise Manager simplifies both backup management tasks.

Backup Management: Concepts

A backup recorded in the RMAN repository can be in one of the following states:

  • Available, meaning that the backup is still present on disk or tape, as recorded in the repository

  • Expired, meaning that the backup no longer exists on disk or tape but is still listed in the repository

  • Unavailable, meaning that the backup is temporarily not available for data recovery operations (because, for example, it is stored on a tape that is stored off-site or a disk that is not mounted at the moment)

Backups can also be obsolete. An obsolete backup is one which, based on the currently configured retention policy, is no longer needed to satisfy data recovery goals.

Backup maintenance tasks that you can perform in Enterprise Manager include the following:

  • Viewing details about your backups

  • Crosschecking your repository, which checks whether backups listed in the repository exist and are accessible and marks as expired any backups not accessible at the time of the crosscheck

  • Deleting the record of expired backups from your RMAN repository

  • Deleting obsolete backups from the repository and from disk

  • Validating backups, to ensure that a given backup is still available and has not been corrupted

Note:

If a backup no longer exists, immediately delete the record of that backup from the RMAN repository. Without an accurate record of available backups, you may discover that you no longer have complete backups of your database when you try to perform a database recovery operation.

Note that if you use a flash recovery area for your backup storage, many maintenance activities are reduced or eliminated. The flash recovery area's automatic disk space management mechanisms delete backups and other files as needed, to satisfy demands for space in ongoing database operations, without compromising the retention policy.

Using the Manage Current Backups Page

To access backup management functions, navigate to the database home page and click Maintenance to open the Maintenance property page. In the Backup/Recovery section, click Manage Current Backups.

The Manage Current Backups page has two property pages you can choose: Backup Set and Image Copy. Each serves a similar purpose, listing backups (stored as backup sets or image copies), based on the record in the Recovery Manager repository, and allowing for management of the backups listed. Figure 9-3, "Manage Current Backups Page" shows a typical view of the Backup Set property page.

Figure 9-3 Manage Current Backups Page

Description of Figure 9-3 follows
Description of "Figure 9-3 Manage Current Backups Page"

The Image Copies property page is similar, with the same operations supported. The elements on the Manage Current Backups page can be categorized as follows:

  • Buttons at the top of the page that allow you to perform maintenance tasks related to your entire collection of backups

  • The Search section, which enables you to select a subset of your backup sets or image copies for maintenance actions

  • The Results section, where you can select individual backups for maintenance actions, invoked using buttons at the top of the Results section

Searching for Backups on the Manage Current Backups Page

The Search section of each property page lets you restrict the listed backups based on the following:

  • Backup status (available, unavailable, or expired)

  • The types of files contained in the backup (archived log, datafile, control file, or SPFILE)

  • How recently the backup was completed

By default, all available backups from the last month are listed. Specify criteria as necessary to filter the backup list, and click Go to search the backups.

The Results section of the page lists backups that match the criteria specified in the Search section. Different details are listed for backup sets (on the Backup Sets property page) and for image copies (on the Image Copies property page).

Managing Current Backups: Backup Sets

On the Backup Sets property page, backup sets are identified by the unique value in the Key column (an internally generated number used to identify the backup set in RMAN commands) as well as the value in the Tag column. For each backup, the page lists information such as the type of files backed up, the destination device type, completion time of the backup, and current status.

You can click the value in the Tag column for a given backup set to view details about the backup set, including:

  • The input files backed up (listed in the Input Files section of the page), and details about each input file, including the original file location, size, and file checkpoint time and SCN when the backup was taken

  • The backup pieces produced as output by the backup job, including the output filename, tag, destination device type, size, and status

Managing Current Backups: Image Copies

On the Image Copies property page, image copies are identified by the unique value in the Key column (an internally generated number used to identify the backup set in RMAN commands) as well as the filename in the Name column. For each backup, the file type, tag, completion time and status are also listed. This page also lists the status of each image copy (available, unavailable, or expired) and a Keep column, which shows whether special exceptions to the retention policy for backups apply to this file.

By clicking the value in the Name column, you can also view details about that file, such as datafile number, file size, tablespace name, creation SCN, and last checkpoint SCN and time when the file was backed up.

You can also crosscheck or delete individual backups, or mark individual backups as unavailable if you know that they are temporarily not accessible by RMAN. For example, if you know that some backups are stored on tapes that have been moved offsite for long-term storage, you can mark them as unavailable to prevent RMAN from considering them usable in restore operations. Use the Select checkbox next to the file, and click the appropriate action button at the top of the Results list.

The Image Copy property page presents similar functionality to the Backup Sets property page. The focus in this section is on commands in the Backup Sets property page, where they are substantially similar to those for image copies.

As with the backup and restore commands in Enterprise Manager, the commands to crosscheck, delete and change the status of backups are ultimately translated to RMAN commands. The commands are submitted as RMAN jobs that can be run immediately or scheduled. Some tasks, such as periodic crosschecks of your backups, should be among the regularly scheduled components of your backup strategy.

Validating the Contents of Backup Sets or Image Copies

When you validate a backup, you ensure that the files for the backup are present, have not been corrupted, and can be used in recovery operations. The selected backup files are read in their entirety and checked for errors.

Note:

Validating specific backups only checks whether those backups are readable. It does not test whether the set of available backups meet your recoverability goals.

For example, you can have image copies of datafiles for several tablespaces from your database, each of which can be validated. If there are some tablespaces for which no valid backups exist, however, you cannot restore and recover your database.

Validating a restore operation ensures that the set of backups available can actually be used to perform a specified restore operation, such as restoring a specific tablespace or your entire database. For more information on validating restore operations, see "Validating Backups and Testing Your Backup Strategy".

To validate whether specific backups are usable in a restore and recovery operation:

  1. In the Backup/Recovery section of the Maintenance property page, click Manage Current Backups.

    The Manage Current Backups page appears.

  2. Use the search features on this page to identify the backups whose contents you wish to validate, as described in "Using the Manage Current Backups Page".

  3. Select the checkboxes next to each backup of interest in the list of current backups and click Validate.

    The Validate: Specify Job Parameters page appears.

  4. Specify a job name and description, as well as time settings for starting and repeating the operation. You can click Show RMAN Script to view the RMAN commands used to perform your validation or Submit Job to start the job running according to its schedule.

    A message confirms the submission of the job.

  5. Click View Job to display details about the validation.

This process corresponds to the RMAN VALIDATE command. See Oracle Database Backup and Recovery Basics for details on the use of the RMAN VALIDATE command.

Crosschecking Backups

Crosschecking a backup causes RMAN to verify that the actual physical status of the backup matches the record of the backup in the RMAN repository. For example, if a backup on disk has been deleted with an operating system command and is therefore no longer available for use in restore operations, then crosschecking that file detects this condition. After the crosscheck operation, the RMAN repository correctly reflects the state of the backups on disk or tape.

Backups to disk are marked AVAILABLE if they are still present on disk in the location listed in the RMAN repository, and if they have no corruption in the file header. Backups on tape are listed as AVAILABLE if they are still present on tape (though the file headers are not checked for corruption). Backups that are missing or corrupt are marked EXPIRED.

To crosscheck individual files:

  1. Use the search features of the Manage Current Backups page to find the backup sets or image copies whose contents you wish to crosscheck, as described in "Using the Manage Current Backups Page".

  2. Click the Select checkbox next to each backup in the Results list to be included in the crosscheck operation. Enterprise Manager does not support selecting both image copies and backup sets for crosscheck within a single operation.

  3. Click Crosscheck at the top of the Results list. After a confirmation page, Enterprise Manager performs the crosscheck.

You can also crosscheck all backups recorded in the RMAN repository in one step by clicking Crosscheck All at the top of the page. In the Crosscheck All: Specify Job Parameters page, you can schedule the crosscheck to run now or at a later time, or even specify regularly scheduled crosschecks.

Note:

Crosschecking all backups in the RMAN repository may take a long time, especially for tape backups. A crosscheck of all files, unlike crosschecking individual files, is handled as a scheduled job.

This process corresponds to the RMAN CROSSCHECK command. See Oracle Database Backup and Recovery Basics for details.

Deleting Expired Backups

Deleting expired backups removes from the RMAN repository those backups which are marked EXPIRED, that is, those which RMAN found to be inaccessible during a crosscheck operation. No attempt is made to delete the files containing the backup from disk or tape; this action only updates the RMAN repository.

To delete expired backups:

  1. In the Manage Current Backups page, click Delete All Expired. Note that this action deletes both expired backup sets and expired image copies from the RMAN repository, regardless of whether you are viewing the Backup Sets or Image Copies property page when you click Delete All Expired.

    The Delete All Expired: Specify Job Parameters page appears.

  2. Select your scheduling options. Along with the usual scheduling options for an RMAN job, there is a checkbox Perform the operation 'Crosscheck All' before 'Delete All Expired'. Checking this box will cause the operation to take longer, but by performing the crosscheck operation immediately before deleting expired backups from the repository, RMAN will have the most up-to-date information possible about which backups are expired. Click Submit Job.

    A message should appear indicating that your job was successfully submitted.

  3. Click View Job to display details about the deletion operation.

Marking Backups as Available or Unavailable

If you know that one or more specific backups are unavailable because of a temporary condition, such as a disk drive that is temporarily offline or a tape stored off-site, then you can mark those backups as unavailable. RMAN does not try to use unavailable backups in restore and recovery operations. RMAN keeps the record of unavailable backups in the RMAN repository, however, and when you delete expired backups, RMAN does not try to delete backups marked unavailable. When the backups become accessible again, you can mark them as available.

Included among the buttons at the top of the Results section of the Manage Current Backups page are buttons for marking backups as available or unavailable.

Note:

If you have restricted the backups listed by searching only for available backups, only the Change to Unavailable button appears. If you have restricted the backups listed by searching only for unavailable backups, only the Change to Available button appears.

To mark backups as available, click the Select checkbox next to each backup in the Results list of backups, and select Change to Available.

To mark backups as unavailable, click the Select checkbox next to each backup in the Results list of backups, and select Change to Unavailable.

Note:

Backups stored in the flash recovery area cannot be marked as unavailable.

Deleting Obsolete Backups

To delete obsolete backups, that is, backups no longer needed to meet your retention policy, click Delete All Obsolete at the top of the Manage Current Backups page.

When you click Delete All Obsolete, you arrive at the Delete All Obsolete: Specify Job Parameters page. You can run the deletion job immediately or schedule it as you would a backup job.

Note:

All obsolete backups (both backup sets and image copies) will be deleted, regardless of whether you clicked Delete All Obsolete while viewing the Backup Set or Image Copy property page on the Manage Current Backups page.

Note that if you use a flash recovery area as your sole disk-based backup destination, then you never need to delete obsolete backups from disk. The automatic space management of the flash recovery area will keep files as specified by the backup retention policy, and then only delete them when space is needed.