Skip Headers

Oracle Enterprise Manager Administrator's Guide
Release 9.2.0

Part Number A96670-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to next page

11
Managing Backup and Recovery

Introduction

Recovery Manager (RMAN) is an Oracle utility that can back up, restore, and recover database files. It is a feature of the Oracle database server and does not require separate installation. The Oracle Enterprise Manager Backup Management wizards and property sheets provide a graphical user interface to Recovery Manager. This chapter describes how to use Oracle Enterprise Manager to administer your database backup and recovery environment.

Recovery Manager (RMAN)

Recovery Manager uses database server sessions to perform the work of backup and recovery. It stores metadata about its operations in the control file of the target database and, optionally, in a recovery catalog schema in an Oracle database.

You can invoke RMAN as a command-line executable from the operating system prompt or use RMAN features through the Enterprise Manager GUI. The Oracle Enterprise Manager Backup Management wizards and property sheets provide a graphical user interface to Recovery Manager.

The Recovery Manager environment consists of the various applications and databases that play a role in a backup and recovery strategy. The RMAN environment can be as simple as an RMAN executable connecting to a target database, or as complex as an RMAN executable connecting to multiple media managers and multiple target, recovery catalog, and auxiliary databases, all accessed through Oracle Enterprise Manager.

Possible components of the RMAN environment are listed below.

Of these components, only the RMAN executable and target database are required. RMAN automatically stores its metadata in the target database control file, so the recovery catalog database is optional. Nevertheless, maintaining a recovery catalog is strongly encouraged. If you create a catalog on a separate machine, and if the production machine fails completely, then you have all the restore and recovery information you need in the catalog.

Figure 11-1 Example RMAN Environment

Text description of rman.gif follows.

Text description of the illustration rman.gif



The figure above depicts an example of a realistic RMAN environment. In this environment, five nodes are networked together, with each machine serving a different purpose.

The five nodes share duties as follows:

In this scenario, you can run the RMAN executable from a client machine, and then connect to the target, catalog, and auxiliary databases. You can then run backup and recovery jobs. You can also connect to the client hosting Oracle Enterprise Manager and use the Oracle Enterprise Manager to access RMAN.

About the RMAN Executable

RMAN is the client application that manages backup and recovery operations for a target database. The RMAN executable is automatically included with the Oracle software installation. The RMAN client uses Oracle Net to connect to a target database, so it can be located on any host that is connected to the target host through Oracle Net.

About the Target Database

The target database is made up of the control files, datafiles, and optional archived redo logs that RMAN is in charge of backing up, restoring, or recovering. RMAN uses the target database control file to gather information about the database and to store information about its own operations. The actual work of the backup and recovery jobs is performed by server sessions on the target database. You can use a recovery catalog to manage the metadata of the database.

About Oracle Enterprise Manager

You can use Oracle Enterprise Manager as an interface to RMAN. Access the wizards and property sheets using one of the following methods:

Note: The Backup Management wizards and property sheets are only available when you are connected to a Management Server.

The Backup Management wizards and property sheets consist of:

About the Recovery Catalog Database

A recovery catalog database is a database containing the recovery catalog schema, which contains the metadata that RMAN uses to perform its backup and recovery operations.

About the Recovery Catalog Schema

The Recovery Catalog Schema is the user within the recovery catalog database that owns the metadata tables maintained by RMAN. RMAN uses these metadata tables to store information about the target database and its backup and recovery operations. Among other things, RMAN stores information about:

You can either use a recovery catalog in which to store the repository, or let RMAN store the repository exclusively in the target database control file.

Although RMAN can conduct all major backup and recovery operations using just the control file, note these advantages of using the catalog:

The recovery catalog is maintained solely by RMAN; the target database never accesses it directly. RMAN automatically propagates information about the database structure, archived redo logs, backup sets, and datafile copies into the recovery catalog from the target database's control file.

For Oracle9i and later, a recovery catalog is created if you specify for the Enterprise Manager repository to be located in a local database. The recovery catalog will be created in the CATTBS tablespace for you by default with the recovery catalog user and password of rman/rman.

Figure 11-2 Recovery Catalog

Text description of recovery.gif follows.

Text description of the illustration recovery.gif

Important: The recovery catalog and the Oracle Enterprise Manager repository should not reside in the target database (database to be backed up). The recovery catalog can reside in the same database as your Oracle Enterprise Manager repository. Oracle recommends placing the recovery catalog in a separate tablespace. As with any important data, you should back up your recovery catalog regularly.

To use Recovery Manager with a recovery catalog, you must register your database with the recovery catalog. Refer to "Registering the Recovery Catalog" for more information. No setup is required if you are using the control file.

About the Standby Database

A standby database is a copy of the primary database that is updated using archived logs created by the primary database. RMAN can create or back up a standby database.

About the RMAN Media Management Interface

To store backups on tape, RMAN requires a media manager, which is a vendor-specific application. A media manager is a software program that loads, labels, and unloads sequential media such as tape drives used to back up and recover data. For information on configuring RMAN to make backups to a media manager, refer to the Oracle9i Recovery Manager User's Guide.

When doing backups or restores, the RMAN client connects to the target instance and directs the instance to talk to its media manager. No direct communication occurs between the RMAN client and the media manager: all communication occurs on the target instance.

About the Media Management Catalog

A media management catalog is a vendor-specific repository of information about a media management application.

RMAN Backup

A backup is a copy of data. This copy can include important parts of the database such as the control file and datafiles. A backup is a safeguard against unexpected data loss and application errors. If you lose the original data, then you can reconstruct it by using a backup.

This section contains the following topics:

Backing Up a Database

To back up a database

  1. From the Backup Management menu, choose Backup to access the Backup Wizard.
  2. On the Strategy Choice page, select either Predefined backup strategy or Customize backup strategy.

Figure 11-3 Predefined Strategy in Strategy Choice Page

Text description of backupst.gif follows.

Text description of the illustration backupst.gif

For more information on using a customized backup strategy, see "Backing Up the Database with a Customized Strategy" on page 11-11.

Backing Up a Database Using a Predefined Strategy

Select Predefined backup strategy on the Strategy choice page of the Backup Wizard if you want to back up your entire database without having to make too many decisions. The Backup Frequency page appears with general descriptions from which you can choose.

Figure 11-4 Backup Frequency

Text description of backupfr.gif follows.

Text description of the illustration backupfr.gif

Picking a Description that Fits Your Database.

Pick the description that fit your database in the Backup Frequency page, and RMAN will decide how often to perform a backup based on the general description that you pick.

Specifying the Number of Backups to Retain.

If the selected (target) database is Oracle 9i and later, the Retain at least the specified number of backups for each datafile and delete obsolete backups after every backup checkbox and the Number of backups field are enabled in the Backup Frequency page.

The checkbox is selected by default. The default value is 2 for the number of backups to retain in the Number of backups field.

With this default selection, the retention policy of the target database will be set to redundancy 2. At least the 2 most recent full backups will be retained for each datafile. Older backups will be deleted after each new backup is successfully performed.

Later Steps in the Predefined Strategy.

Later, in the process, wizard pages will appear in which you will have the option to perform the following tasks:

Backing Up the Database with a Customized Strategy

Select Customize backup strategy on the Strategy choice page of the Backup Wizard if you want to select the information you want to back up and the schedule for the execution of the backup.

In order to back up the whole database you must select Entire database on the Backup Selection page.

Figure 11-5 Backup Selection

Text description of backupse.gif follows.

Text description of the illustration backupse.gif

If the target database is 9i or above and the retention policy has been set in the target database, you can also choose to delete obsolete backups after the backup.

For more information, see "Deleting Obsolete Backups and Copies" on page 11-12.

Later in the process, wizard pages will appear in which you will have the option to perform the following tasks:

Deleting Obsolete Backups and Copies

If you are using a customized backup strategy and if the target database is 9i or above and the retention policy has been set in the target database, you can choose to have obsolete backups and copies deleted after the backup.

The retention policy determines which backups and image copies are obsolete. The current retention policy setting may be viewed through the Maintenance Wizard on the "Retention Policy" page. The retention policy may be modified through the Maintenance Wizard by submitting an Enterprise Manager job.

Select Delete obsolete backups after this backup on the Backup Selection page of the Backup Wizard. The retention policy determines which backups and image copies are obsolete. If selected, the obsolete backups and copies will be deleted when the backup is finished.

Selecting a Full or Incremental Backup

If you are using a customized strategy for your backup, you can choose to perform a full or an incremental level backup.

Select Full backup or Incremental Backup in the Backup Options page of the Backup Wizard.

Figure 11-6 Backup Options

Text description of backupop.gif follows.

Text description of the illustration backupop.gif

A full backup

A full backup backs up all blocks into the backup set, skipping only datafile blocks that have never been used. The server process does not skip blocks when backing up archived redo logs or control files. A full backup has no effect on subsequent incremental backups, which is why it is not considered part of the incremental strategy. In other words, a full backup does not affect which blocks are included in subsequent incremental backups.

An incremental backup

Incremental backups are a convenient way to conserve storage space because they back up only database blocks that have changed.

The primary reasons for making an incremental backup are

Incremental backups are a method by which you only backup modified blocks. An incremental level 0 backup performs the same function as a full backup in that they both backup all blocks that have ever been used except a level 0 will affect what blocks are copied out by subsequent incremental backups. Incremental backups of levels greater than 0 back up only blocks that have changed since previous incremental backups. Blocks which have not changed will not be backed up.

When you choose to make an incremental backup, you can choose a non-cumulative or a cumulative backup.

A non-cumulative backup is a type of incremental backup in which you back up all blocks that have changed since the most recent backup at level n or lower. For example, in a differential level 2 backup you back up all blocks modified since the last level 2, level 1, or level 0 backup. A non-cumulative backup copies less data and therefore takes a shorter time than the cumulative backup, but recovery time may be longer based on the number of incremental backups that must be applied.

A cumulative backup is a type of incremental backup that allows you to back up all the blocks used since the most recent backup at level n-1 or lower. For example, in a cumulative level 2 backup you back up all blocks used since the most recent level 1 or level 0 backup. A cumulative backup copies more data and therefore takes longer than the non-cumulative backup, but recovery time is shorter.

Incremental Backup Strategy

Choose a backup scheme according to an acceptable MTTR (mean time to recover). For example, you can implement a three-level backup scheme so that a full or level 0 backup is taken monthly, a cumulative level 1 backup is taken weekly, and a cumulative level 2 is taken daily. In this scheme, you never have to apply more than a day's worth of redo for complete recovery.

When deciding how often to take full or level 0 backups, a good rule of thumb is to take a new level 0 whenever 50% or more of the data has changed. If the rate of change to your database is predictable, then you can observe the size of your incremental backups to determine when a new level 0 is appropriate.

Choosing an Online or Offline Mode to Back Up Your Database

If you are making a database backup using a customized strategy and the target database is in ARCHIVELOG mode, you can choose to make an online or an offline backup.

Select Online Backup or Offline Backup in the Backup Options page of the Backup Wizard.

An online backup is a backup of one or more datafiles taken while a database is open and the datafiles are online.

An offline backup is a backup when the database is not open.

Figure 11-7 Backup Options

Text description of backupop.gif follows.

Text description of the illustration backupop.gif

Online Backup is the default selection. If the database is in the OPEN state, the database backup will be performed while the database is OPEN.

If you choose Offline Backup, the database will be backed up in the MOUNT state. If the database is in the OPEN state, it will be shut down and brought to the MOUNT state before the backup is performed. When the backup is finished, the database will be brought back to OPEN state.

Backing Up Individual Files

Your database contains a wide variety of types of data. When developing your backup strategy, you must decide what information you want to back up. The basic principle you should use when deciding what to back up is to prioritize data depending on its importance and the degree to which it changes.

You can backup up individual files with various options.

  1. From the Backup Management menu, choose Backup to access the Backup Wizard.
  2. On the Strategy Choice page, select Customize backup strategy.
  3. On the Backup Selection page, select Datafile or Tablespace.

To back up datafiles or tablespaces, the database must be in ARCHIVELOG mode and the Mount State.

See "Starting Up the Database" and "Setting the Database in ARCHIVELOG Mode" for information on starting the database in Mount mode or putting the database in ARCHIVELOG mode.

Figure 11-8 Select Tablespace in Backup Selection

Text description of backupsa.gif follows.

Text description of the illustration backupsa.gif

If the target database is 9i or above and the retention policy has been set in the target database, you can also choose to delete obsolete backups after the backup.

For more information, see "Deleting Obsolete Backups and Copies" on page 11-12.

  1. Choose tablespaces from the Tablespace page or datafiles from the Datafile page. You may choose to include the Controlfile with the backup.

Figure 11-9 Choosing Tablespaces in Tablespace Page

Text description of backupts.gif follows.

Text description of the illustration backupts.gif

During the process, a few wizard pages will appear in which you will have the option to perform the following tasks:

Backing Up and Deleting Archived Logs

An archived redo log is an online redo log that Oracle has filled with redo entries, rendered inactive, and copied to one or more log archive targets. You should maintain multiple copies if possible.

Archived redo logs are the key to successful media recovery. Back them up regularly. You can back up logs by issuing selecting Archive Logs from a customized backup strategy or by backing up datafiles and control files and specifying to include archive logs in the backup.

Typically, database administrators back up archived logs on disk to a third-party storage medium such as tape. You can also back up archived logs to disk.

Backing Up Archived Logs

To select to back up archive logs and the date and time for the first and last archive logs to be backed up

  1. From the Backup Management menu, choose Backup to access the Backup Wizard.
  2. On the Strategy Choice page, select Customize backup strategy.
  3. On the Backup Selection page, select Archive Logs. This option is available only in ARCHIVELOG mode. Refer to "Setting the Database in ARCHIVELOG Mode" for more information.

Figure 11-10 Archived Logs

Text description of backupar.gif follows.

Text description of the illustration backupar.gif

If you select to include all or selected archived logs in this backup, the Archived Log Deletion page appears.

Deleting Archived Logs

From the Archived Log Deletion page, you can delete the input logs (from the primary archiving destination only) automatically after the backup completes.

Figure 11-11 Archived Log Deletion

Text description of backupaa.gif follows.

Text description of the illustration backupaa.gif

Select one of the following options based on your available disk space and desired recovery time.

Copying a Datafile

An image copy contains a single datafile, archived redo log file, or control file that you can use as-is to perform recovery. RMAN only writes image copies to disk.

  1. From the Backup Management menu, choose Backup to access the Backup Wizard.
  2. On the Strategy Choice page, select Customize backup strategy.
  3. On the Backup Selection page, select Datafile and check the Use an image copy box.

Figure 11-12 Choosing Datafile and Use Image Copy

Text description of backupsb.gif follows.

Text description of the illustration backupsb.gif

Check the Use an image copy box if you want to back up a datafile using an image copy. Oracle supports performing a backup using an image copy of datafiles, or controlfiles. You can only perform an image copy of a controlfile with an image copy of a datafile. Using an image copy of only the controlfile is directly supported from the Backup Wizard. You may submit a "Run Rman Script" job separately from the Console to perform the controlfile image copy. For information on the Rman script, see "RMAN Job Script" on page 11-75.


Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback