Databases Reference
In-Depth Information
Chapter 7
Making Backups with RMAN
You can use the backup command to back up data files, archived redo logs, or control files. You can also use the backup
command to make copies of data files and backups of backup sets. Because RMAN provides (since the Oracle9 i
Database release) the default configuration for all backup-related parameters, such as devices, formats, and tags, if you
want you can back up your entire database by simply typing the command backup database at the RMAN prompt.
You must, of course, first connect to the target database before backing it up, and the database must be in mount or
open state if it's running in archivelog mode and must be in the mount state if it's operating in noarchivelog mode.
Key Concepts
Before we discuss various RMAN backup-related recipes in this chapter, we'll quickly review key RMAN backup-related
concepts before jumping into the mechanics of performing the backups.
Backup Sets and Image Copies
The backup command lets you make two types of RMAN backups: backup sets and image copies. By default, all RMAN
backups are in the form of backup sets. Each backup set contains one or more backup pieces, which are files in an
RMAN-specific format. Backup sets are the default backup type for both disk- and tape-based backups.
A backup set is a logical structure that consists of a minimum of one backup piece , which is a physical,
RMAN-specific format file that actually contains the backed-up data. A backup set can contain data from one or more
data files, archived log files, or control files A backup set can't contain a combination of data files and archived log
files. By default, a backup set contains just one backup piece. However, you can limit the size of a backup piece by
using the maxpiecesize parameter. If you do this and the backup set size is larger than the backup piece size specified
by the maxpiecesize parameter, there'll be multiple backup pieces within that backup set.
Each of the objects you back up with the backup command—database, tablespace, archived redo logs, and so
on—will result in at least one backup set if you specify backup set as the backup type. RMAN determines the number
of backup sets for a backup according to an internal algorithm. However, you can limit the size of a backup set by
specifying the maxsetsize parameter. You can also indirectly control the number of backup sets made by RMAN for
each backup by specifying the filesperset parameter, which limits the number of input files (data files, archived redo
log files, and so on) that can be backed up into a single backup set.
The key difference between an image copy and a backup set is that RMAN can write blocks from many files into
the same backup set (known as multiplexing ) but can't do so in the case of an image copy—an image copy is identical,
byte by byte, to the original data file, control file, or archived redo log file. An RMAN image copy and a copy you make
with an operating system copy command, such as dd (which makes image copies), are identical.
Note
RMAN treats all user-made backups as image copies.
 
 
Search WWH ::




Custom Search