Skip Headers
Oracle® Database Backup and Recovery Basics
10g Release 2 (10.2)

Part Number B14192-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Feedback

Go to previous page
Previous
Go to next page
Next
View PDF

4.1 Overview of RMAN Backups

Backing up all or part of your database is accomplished by using the BACKUP command from within the RMAN client.

RMAN uses the configured settings and channels for your database, the record of previous backups in the RMAN repository and the control file's record of the structure of your database to determine an efficient set of specific steps to perform in response to a BACKUP command, and then carries out those steps.

In many cases, once your database has been configured in accordance with your backup strategy, an RMAN backup of your entire database can often be performed with the following simple command:

RMAN> BACKUP DATABASE;

4.1.1 Files That RMAN Can Back Up

RMAN's BACKUP command supports backing up the following types of files:

  • Database files, including datafiles, control files, and the server parameter file (SPFILE)

  • Archived redo logs

  • Other backups created by RMAN, including such as datafile and control file image copies, and backup sets containing SPFILEs, control files, datafiles and archived logs

Although the database depends on other types of files for operation, such as network configuration files, password files, and the contents of the Oracle home, these files cannot be backed up with RMAN. Likewise, some features of Oracle, such as external tables, may depend upon files other than the datafiles, control files, and redo log for storing information. RMAN cannot back up these files. Use some non-RMAN backup solution for any files not in the preceding list.

4.1.2 About RMAN Backup Formats: Image Copies and Backup Sets

RMAN backups can be stored in one of two formats: as image copies or as backup sets.

4.1.2.1 About Image Copies

An image copy is a bit-for-bit duplicate of a database file, identical to a copy made with an operating system command. (RMAN-created image copies are, however, recorded in the RMAN repository, unlike file copies created using operating system-level commands.)

Image copy backups can only be created on disk. RMAN can create image copies of datafiles and datafile copies, control files and control file copies, archived redo logs, and backup pieces. RMAN creates image copies when the AS COPY option is used with the BACKUP command.


See Also:

Oracle Database Backup and Recovery Advanced User's Guide for more detailed information about RMAN's handling of image copies

4.1.2.2 About Backup Sets

RMAN can also store backup information a logical structure called a backup set. A backup set contains the data from one or more datafiles, archived redo logs, or control files or SPFILE. (Datafiles and archivelogs cannot be mixed together in the same backup set.) You can also back up existing backup sets into another backup set.

A backup set consists of one or more files in an RMAN-specific format, known as backup pieces. By default, a backup set consists of one backup piece. For example, you can back up ten datafiles into a single backup set consisting of a single backup piece (that is, one backup piece will be produced as output, the backup set consists of the single file containing the backup piece, and the backup piece and the backup set that contains it will be recorded in the RMAN repository). A file cannot be split across backup sets.


Note:

The backup set is the smallest unit of a backup. RMAN only records backup sets in the repository that complete successfully. There is no such thing as a partial backup set. You cannot usefully manipulate individual backup pieces.

Only RMAN can create or restore from backup sets. When multiple files are backed up into the same backup set, they are read concurrently and their data is multiplexed together.

Backup sets are the only type of backup that RMAN supports on media manager devices such as tapes. Backup sets can also be created on disk. By default, RMAN creates backups both on both disk and on tape as backup sets.

When backing up datafiles to backup sets, RMAN is able to skip some datafile blocks that do not currently contain data, reducing the size of backup sets and the time required to create them. This behavior, known as unused block compression, means that backups of datafiles as backup sets are generally smaller than image copy backups and take less time to write. This behavior is fundamental to how RMAN writes datafiles into backup pieces, and cannot be disabled. For more information about how and when unused blocks are skipped, see Oracle Database Backup and Recovery Reference.

RMAN also supports binary compression of backup sets, where the backup set contents are compressed before being written to disk using a compression algorithm tuned for compression of datafiles and archived log files. The use of binary compression is described in "Using Compressed Backupsets for RMAN Backup".

4.1.3 About RMAN Full and Incremental Datafile Backups

RMAN backups of datafiles can be either full datafile backups, or incremental backups.

A full backup of a datafile is a backup that includes every used data block in the file. If a full datafile backup is created as an image copy, the entire file contents are reproduced exactly. (If backing the datafile up to a backup set, then unused blocks may be skipped, as described in "About Backup Sets")

An incremental backup of a datafile captures images of blocks in the datafile changed since a specific point in time, usually the time of a previous incremental backup. Incremental backups are always stored as backup sets. The resulting backup sets are generally smaller than full datafile backups, unless every block in the datafile is changed. RMAN can only create incremental backups of datafiles, not of archived redo log files or other files.

During media recovery, RMAN uses the block images from incremental backups, to update changed blocks to their contents at the SCN where the block was created in a single step. Without incremental backups, all changes must be applied one at a time from the archived redo logs. Recovery using incremental backups is therefore much faster than applying changes one at a time from the archived redo logs. Incremental backups also capture changes to data blocks made by NOLOGGING operations, which are not recorded in the redo log. For these reasons, whenever incremental backups are available for use in media recovery, RMAN uses incremental backups instead of archived logs.