Databases Reference
In-Depth Information
Assuming you are using a media manager that supports version 2 of the SBT API, the media manager will
automatically write the two identical backup copies resulting from the previous
run
block to different tape drives.
If you're using a disk channel instead, you must specify the
format
parameter to direct the copies to their destination
physical disk locations.
When you use the
set
command from the RMAN command line by using a command such as
set backup
copies=2
, the configuration specified by the
set
command will remain in force until the end of the session. If you use
the same
set
command in a
run
block, the configuration will be in force until the
run
block completes executing.
How It Works
Whenever RMAN creates a backup set (but not an image copy), you can take advantage of RMAN's built-in
duplexed
backup
set
feature to make multiple copies of that backup set. You can specify a maximum of four copies of each
backup piece in a backup set. This applies to backups of data files, archived redo log files, and control files. You can
use the
configure...backup copies
command to persistently configure backup duplexing, as explained in Recipe
5-11. If you'd rather not persistently configure multiple backup copies, you can use either of the two commands
shown in the Solution section of this recipe—
set backup copies
or
backup copies
—to configure duplexed backup
sets. By default, the
configure...backup copies
is set to 1 for both disk and tape backups. You can use the
configure
command to change the default duplexing level of 1 for all future backups. You can also use either the
backup copies
command or the
set backup copies
command to override the configured setting for multiple copies.
Here's the order of precedence for the three ways in which you can configure RMAN backup duplexing, with settings
higher in the list overriding the others:
backup copies
set backup copies
configure ... backup copies
You can't use the
as copy
option when duplexing, since you can duplex only backup sets and not image copies.
You also can't use duplexing when creating backup files in the fast recovery area. However, this is true only when
making image copies (using the
backup as copy
command). You can duplex backups as a backup set when the fast
recovery area is the destination. The following example shows this:
RMAN> run {
allocate channel d1 type disk;
set backup copies = 2;
backup
as backupset
datafile 2
format '+BACKUP',
'+BACKUP';
release channel d1;
}
allocated channel: d1
channel d1: SID=124 device type=DISK
executing command: SET BACKUP COPIES
Starting backup
...
released channel: d1
RMAN>