Recovery Manager (RMAN) is a utility that can manage all of your Oracle backup and recovery activities.
RMAN comes with several benefits:
• Incremental backups that only copy data blocks that have changed since the last backup.
• Tablespace are not put in backup mode, thus there is no extra redo log generation during online backups.
• Detection of corrupt blocks during backups.
• Parallelization of I/O operations.
• Automatic logging of all backup and recovery operations.
• Built-in reporting and listing commands.
• Block media recovery, in which a datafile with only a small number of corrupt data blocks can be repaired without being taken offline or restored
from backup
• Unused block compression, where RMAN can in some cases skip unused datafile blocks during backups
• Binary compression, which uses a compression mechanism integrated into the Oracle database server to reduce the size of backups
• Encrypted backups, which uses encryption capabilities integrated into the Oracle database to store backups in an encrypted format
Files That RMAN Can Back Up :
RMAN supports backing up the following types of files ( as of Oracle 10g):
■ Datafiles, and image copies of datafiles
■ Control files, and image copies of control files
■ Archived redo logs
■ The current server parameter file
■ Backup pieces, containing other backups created by RMAN
It can not backup >>>>> network configuration files, password files, and the contents of the Oracle home.
RMAN's architecture is a combination of an executable program (the rman utility) and background processes that interact with one or more databases and with I/O devices.
NOTE : You don't need an extra license for RMAN; it comes as a standard utility with Oracle Database.
RMAN Executable
==============
> The RMAN executable, usually named rman, is the program that manages all backup and recovery operations.
> The executable interacts with the target database, starts the necessary server processes, and performs the operations that you requested.
> RMAN executable records those operations in the target database's control file and the recovery catalog database, if you have one.
RMAN server processes
===================
> RMAN server processes are background processes, started on the server, used to communicate between RMAN and the databases.
> They can also communicate between RMAN and any disk, tape, or other I/O devices.
> Server processes are started under the following conditions:
• When you start RMAN and connect to your target database
• When you connect to your catalog -- if you are using a recovery catalog database
• When you allocate and open an I/O channel during a backup or recovery operation
Channels
========
A channel is an RMAN server process started when there is a need to communicate with an I/O device, such as a disk or a tape. A channel is what reads and writes RMAN backup files. Any time you issue an RMAN allocate channel command, a server process is started on the target database server.
NOTE
Note that RMAN does not back up the online redo logs of the target database
Target Database
=============
The target database is the database on which RMAN performs backup, restore, and recovery operations. This is the database that owns the datafiles, control files, and archived redo files that are backed up, restored, or recovered.
Recovery Catalog Database
======================
The recovery catalog database is an optional repository used by RMAN to record information concerning backup and recovery activities performed on the target. The recovery catalog consists of three components:
• A separate database referred to as the catalog database (from the target database)
• A schema within the catalog database
• Tables (and supporting objects) within the schema that contain data pertaining to RMAN backup and recovery operations performed on the target
The catalog is typically a database that you build on a different host from your target database. The reason for this is that you don't want a failure on the target host to affect your ability to use the catalog. If both the catalog and target are on the same box, a single media failure can put you in a situation from which you can't recover your target database.
The primary reason for implementing a catalog is that it enables the greatest flexibility in backup and recovery scenarios. Using a catalog gives you access to a longer history of backups and allows you to manage all of your backup and recovery operations from one repository.
Media Management Layer (MML)
==========================
> A third-party piece of software that manages the reading and writing of files to and from tape.
> An MML also keeps track of which files have been written to which tapes.
> If you want to back up your database files to tape, RMAN requires you to use an MML.
> If you plan to use RMAN to back up files only to disk, you do not need an MML.
>There are several reasons to back up files to tape and thus require an MML:
• The expense of storing large backups on disk is too costly.
• Your requirement is to back up files somewhere other than on the same server as the target database, thus reducing your risk of losing both the target database and backup files at the same time
> When backing up files to tape, an MML keeps track of which files were written to which tapes. In the event that restoration of a database file is required, RMAN communicates to the MML a list of the backup files that are required to restore the database file. The MML then determines which tapes contain the required backup files, retrieves the requested backup files, and passes them back to RMAN; RMAN then restores the database file.
RMAN backup
===========
A backup of all or part of your database. This results from issuing an RMAN backup command. A backup consists of one or more backup sets.
Backup set
=========
A logical grouping of backup files -- the backup pieces -- that are created when you issue an RMAN backup command. A backup set is RMAN's name for a collection of files associated with a backup. A backup set is composed of one or more backup pieces.
Backup piece
===========
A physical binary file created by RMAN during a backup. Backup pieces are written to your backup medium, whether to disk or tape. They contain blocks from the target database's datafiles, archived redo log files, and control files.
IMPORTANT
• A datafile cannot span backup sets.
• A datafile can span backup pieces as long as it stays within one backup set.
• Datafiles and control files can coexist in the same backup sets.
• Archived redo log files are never in the same backup set as datafiles or control files.
NOTE
RMAN is the only tool that can operate on backup pieces.
If you need to restore a file from an RMAN backup, you must use RMAN to do it.
There's no way for you to manually reconstruct database files from the backup pieces.