Validating the Contents of Backup Sets or Image Copies
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" on page 9-16.
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" on page 9-25.
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
9-28 Oracle Database 2 Day DBA 9-28 Oracle Database 2 Day DBA
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" on page 9-25.
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.
Performing Backup and Recovery 9-29
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.
Displaying Backup Reports
Backup reports contain summary and detailed information about past backup jobs run by RMAN, including both backups run through Enterprise Manager and the RMAN command-line client.
To view backup reports, from the Maintenance property page, in the Backup and Recovery section, click Backup Reports.
9-30 Oracle Database 2 Day DBA
Figure 9–4 Backup Reports Page
The page contains a list of recent backup jobs. You can use the Filter By section of the page to restrict the backups listed by the time of the backup, the type of data backed up, and the status of the jobs to be listed (whether it succeeded or failed, and whether warnings were generated during the job). Specify any filter conditions and click Go to restrict the list to backups of interest.
The list contains basic information for each backup:
The name, start time and run time of the backup
The type of the backup (such as full or incremental database backup, archived log backup, backup of datafiles only, and so on)
The status of the backup (whether it succeeded or failed, and whether there were warnings associated with it)
The output destination (which can be disk or tape, or * to indicate output on both disk and tape
The size of inputs (files backed up), output (files written to disk or tape) and the rate at which backups were written
Performing Backup and Recovery 9-31
To view detailed information about any backup, click the value in the Backup Name column. The View Backup Report page is displayed for the selected backup. This page contains summary information about this backup (how many files of each type were backed up, how much data total, and the number, size and type of output files created), as well as details about inputs and outputs for the backup job, such as:
Datafiles backed up, by datafile number and tablespace name
Archived logs by sequence and thread number, and range of times and SCNs covered by the logs
Number of corrupt blocks found in input files
Tags, backup piece names or filenames for outputs
Size of output files and compression ratios For recent jobs, you can also view a log of RMAN output for the job, by clicking the
value in the Status column. Note: The control file view V$RMAN_OUTPUT contains the output of
recent RMAN jobs. The contents of this view are not preserved if the instance is restarted. Therefore, the output from past RMAN jobs may not be available.
The View Backup Report page also contains a Filter By section that you can use to quickly run a search for another backup or backups from a specific date range. The resulting report contains aggregate information for backups matching the search criteria.
Backup and Recovery: Oracle by Example Series
Oracle by Example (OBE) has a series on the Oracle Database 2 Day DBA book. This OBE steps you through the tasks in this chapter, and includes annotated screen shots.
To view the Backup and Recovery OBE, point your browser to the following location: http://www.oracle.com/technology/obe/10gr2_2day_dba/backup/backup.htm
9-32 Oracle Database 2 Day DBA