Oracle Recovery Manager satisfies the most pressing demands of performance, manageable backup and recovery, for all Oracle data formats.
A complete high availability and disaster recovery strategy requires dependable data backup, restore, and recovery procedures. Oracle Recovery Manager (RMAN), a command-line and Enterprise Manager-based tool, is the Oracle-preferred method for efficiently backing up and recovering your Oracle database. RMAN is designed to work intimately with the server, providing block-level corruption detection during backup and restore. RMAN optimizes performance and space consumption during backup with file multiplexing and compression, and integrates with leading tape and storage media products via the supplied Media Management Library (MML) API.
RMAN takes care of all underlying database procedures before and after backup or restore, freeing dependency on OS and SQL*Plus scripts. It provides a common interface for backup tasks across different host operating systems, and offers features not available through user-managed methods, such as binary file compression, parallelization of backup/recovery data streams, backup files retention policy, and detailed history of all backups.
First introduced in the Oracle8 Database, RMAN has since been updated with numerous enhancements in Oracle9i, including block media recovery, autobackup of control files, and resumable backup/recovery in case of failure. With the latest release of RMAN in Oracle Database 10g, a host of new features allow the DBA to:
· Better organize backups with flash recovery area
· Optimize incremental backup performance via block change tracking
· Reduce the number of full backups to perform with incrementally updated backups
· Administer backup sets and image copies with Enterprise Manager
· Easily convert tablespaces across platforms
Overview of RMAN Functional Components
The RMAN environment consists of the utilities and databases that play a role in backing up your data. At a minimum, the environment for RMAN must include the following:
· The target database to be backed up
· The RMAN client, which interprets backup and recovery commands, directs server sessions to execute those commands, and records your backup and recovery activity in the target database control file.
Some environments will also use these optional components:
· A flash recovery area, a disk location in which the database can store and manage files related to backup and recovery;
· Media management software, required for RMAN to interface with backup devices such as tape drives;
· A recovery catalog database, a separate database schema used to record RMAN activity against one or more target databases.
The following diagram illustrates these components:
The target database is the database that you are backing up, restoring, or recovering with RMAN.
RMAN is a command-line-oriented database client, much like SQL*Plus, with its own command syntax. From the RMAN client you can issue RMAN commands and SQL statements to perform and report on backup and recovery operations.
RMAN can take interactive input or read input from plain text files (called command files). RMAN then communicates with one or more server processes on the target database server which actually perform the work. You can also access RMAN through the Enterprise Manager; for details see Oracle Enterprise Manager Administrator's Guide.
The RMAN executable is typically installed in the same directory as the other database executables. On Unix systems, for example, the RMAN executable is located in $ORACLE_HOME/bin.
RMAN maintains metadata about the target database and its backup and recovery operations in the RMAN repository. Among other things, RMAN stores information about its own configuration settings, the target database schema, archived redo logs, and all backup files on disk or tape. RMAN's LIST, REPORT, and SHOW commands display RMAN repository information.
RMAN repository data is always stored in the control file of the target database. The CONTROL_FILE_RECORD_KEEP_TIME initialization parameter controls how long backup records are kept in the control file before those records are re-used to hold information about more recent backups. The repository can also be kept in a recovery catalog, a separate database that keeps historical data on backup activities much longer than the control file and preserves backup information if the control file is lost.
Flash Recovery Area
The Automatic Disk-Based Backup and Recovery feature simplifies managing disk space and files related to backup and recovery, by managing all backup and recovery related files in a flash recovery area. You set the flash recovery area size and location, using the DB_RECOVERY_FILE_DEST and DB_RECOVERY_FILE_DEST_SIZE initialization parameters. You also specify a retention policy that dictates when backups may be discarded.
RMAN then manages your backup storage, deleting obsolete backups and backups already copied to tape when space is needed, but keeping as many backups on disk as space permits. This minimizes restores from tape during data recovery operations to shorten restore and recovery times.
In addition to RMAN repository records, the recovery catalog can also hold RMAN stored scripts, sequences of RMAN commands for common backup tasks. Centralized storage of scripts in the recovery catalog can be more convenient than working with command files.
Except for stored scripts, all of RMAN's features work equally well with or without a recovery catalog. For more information on the recovery catalog see Oracle Database Backup and Recovery Advanced User's Guide.
To access sequential media devices like tape libraries, RMAN uses third-party media management software. A media manager controls these devices during backup and recovery, managing the loading, labeling and unloading of media, among other functions. Oracle Corporation's Backup Solutions Program (BSP) works with vendors to help them produce media management software for their devices. For enterprises that already use media management software in their enterprise, many of those software products can be directly integrated with RMAN. Contact your media management software vendor for details about whether they participate in the BSP and have an RMAN-compatible media management layer.
RMAN Features & Benefits
1. Guaranteed, accurate backup and recovery
New features for RMAN 10g:
· The Flash Recovery Area, a single directory on disk or ASM disk group, consolidates all recovery-related files, including control, data, archive log, RMAN backup set files; everything needed by RMAN upon recovery can be retrieved from this directory. With a rapidly dropping price, disk has become a more attractive option for primary backup storage, in addition to faster read/write performance than tape. In addition, Flash Recovery Area can automatically warn administrators of disk capacity issues and obsolete outdated backup sets to reclaim space.
· With the automatic channel failover feature, when an error occurs during a disk backup or restore, RMAN will attempt to complete as much of the job as possible, rather than aborting the job. RMAN accomplishes this by utilizing multiple channels, as specified by the CONFIGURE command. This offers a higher level of resiliency when streaming problems arise and better utilization of system resources, versus restarting jobs manually.
· During a restore, when RMAN finds corruption in a backup, or finds that a backup cannot be accessed, RMAN will try to restore the file from a different backup. RMAN will try to restore the desired file from all possible backups before returning an error. This is done automatically whenever RMAN restores file(s) during the RESTORE or RECOVER commands, relieving the need to search for valid backups and performing a manual RESTORE or RECOVER.
These features are in addition to the Oracle9i RMAN resumeable backup/restore. In case of a failed backup job or restore, restarting the job will automatically pickup the operation from the last successfully backed up file.
2. Automatic block corruption detection and repair
Block Media Recovery allows RMAN to fix a corrupted block (detected on backup) while the data file remains online, and non-affected data continues to be available for selecting and updating. This increases data availability and reduces mean time to recover by selectively restoring and recovering the damaged blocks. Minimal I/O is needed because redo is only applied to damaged blocks.
3. Comprehensive reporting
Using special V$ views, users can retrieve information on all currently executing and completed RMAN backup jobs, as well as details on all backed up files and obsolete backup sets. This output can also be easily viewed in Enterprise Manager, under Backup Set Management.
4. Performance-optimized, space-saving operations
RMAN takes advantage of intimate knowledge of Oracle block structures to provide high backup and restore data streaming performance and efficient file compression. By default, when creating backup sets, RMAN backs up only used blocks and saves disk space by merging blocks into as few backup pieces as necessary.
New features for RMAN 10g:
· Binary compression technique reduces backup space usage by 50-75%.
· Block change tracking for incremental backups allows the server to record and read only the changed blocks, rather than performing full data file scans on every operation, thus dramatically shortening completion time.
· With the new DURATION option for the RMAN BACKUP command, DBAs can weigh backup performance against system service level requirements. By specifying a duration, RMAN will automatically calculate the appropriate backup rate; in addition, DBAs can optionally specify whether backups should minimize time or system load.
· For recovery, completion time is reduced through the use of the incrementally updated backup feature; this allows incremental backup information to be continually rolled into data file image copies, thus eliminating the need to apply incrementals on recovery.
5. Intelligent disk consumption monitoring
New for RMAN 10g, Flash Recovery Area allows administrators to setup notifications on disk space usage and automate obsolescence of expired backup sets, via RMAN client command-line or EM interfaces.
6. Simple and centralized management
Administrators can take advantage of the RMAN client command-line interface, whose commands are written in an OS-independent scripting language, or by using the Enterprise Manager Backup and Recovery Management console. With EM, performing backup job scheduling and recovery operations is completely automated via step-by-step wizards.
In addition, EM includes:
· Backup optimization settings
· Retention policy parameters
· Mean-time-to-recovery monitoring
· Archived log multiplexing
· New features for EM 10g:
o Backup set and image copies management
o Flash recovery area settings
o Catalog synchronization
o Catalog crosscheck validation
7. Fine-granular data operations
RMAN provides fine granular, on and offline backups at the database, tablespace, archive log, datafile, control file, and block level. Also, both up-to-the-present and point-in-time recoveries can be performed, based on a date or SCN number, by rolling forward archived logs. RMAN 10g eliminates the need for a DBA to manually create an auxiliary instance for tablespace point-in-time recovery (TSPITR). RMAN takes care of instance creation on the same server as the target database, and removal upon completion of the tablespace recovery.
8. Extensible to third party media managers
Through one standard Media Management Layer API (MML), third-party media management vendors can leverage the functionality of RMAN to provide robust backup solutions for Oracle databases.