In the daily life of a DBA there are several kind of requirement from our Clients, Some clients want Spreading the backups, others Duplexing, others N files per Backup piece, and so on. RMAN is a very flexible tool and it let us to accomplish all those requirements. In this article I will show you how to Triplex  our Backups, but if you are interested in reading more articles about RMAN written by me you can take a look in the followings:

There are 3 methods in order to duplexing/Triplexing our Backups, it depends how you like to do it, configuring the parameters in RMAN settings or doing everything manual. 


OPTION 1: "CHANNEL DEVICE TYPE DISK" and "DATAFILE BACKUP COPIES" configured in RMAN.

Let me show you that the parameters have the default value:

RMAN> show device type;

RMAN configuration parameters for database with db_unique_name ORCL are:
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET;

RMAN> show channel;

RMAN configuration parameters for database with db_unique_name ORCL are:
RMAN configuration has no stored or default parameters

RMAN>

Now we will configure the parameters in order to duplexing/triplexing our Backups:

RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/home/oracle/backup1/%U','/home/oracle/backup2/%U','/home/oracle/backup3/%U';

new RMAN configuration parameters:
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/home/oracle/backup1/%U', '/home/oracle/backup2/%U', '/home/oracle/backup3/%U';
new RMAN configuration parameters are successfully stored
released channel: ORA_DISK_1

RMAN>

RMAN> show channel; <<--Confirming the Value

RMAN configuration parameters for database with db_unique_name ORCL are:
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/home/oracle/backup1/%U', '/home/oracle/backup2/%U', '/home/oracle/backup3/%U';

RMAN>

RMAN> CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 3;

new RMAN configuration parameters:
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 3;
new RMAN configuration parameters are successfully stored

RMAN> show datafile backup copies; <<--Confirming the Value

RMAN configuration parameters for database with db_unique_name ORCL are:
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 3;

RMAN>

Currently there is no any File in the 3 Directories we will use in this example:

[oracle@a1 ~]$ ls -ltr /home/oracle/backup*
/home/oracle/backup2:
total 0

/home/oracle/backup3:
total 0

/home/oracle/backup1:
total 0
[oracle@a1 ~]$

Let's create a Backup, since the parameters were set already we don't have to specify extra parameters whenever we perform a backup:

RMAN> backup database;

Starting backup at 23-JAN-15
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=70 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00009 name=+DATA/orcl/datafile/apextbs.463.869105715
input datafile file number=00011 name=+DATA/orcl/datafile/xdbtbs.464.869095177
input datafile file number=00001 name=+DATA/orcl/datafile/system.437.865029795
input datafile file number=00002 name=+DATA/orcl/datafile/sysaux.353.865029795
input datafile file number=00003 name=+DATA/orcl/datafile/undotbs1.354.865029795
input datafile file number=00004 name=+DATA/orcl/datafile/users.256.865029795
input datafile file number=00008 name=+DATA/orcl/datafile/fdatbs.449.867242657
input datafile file number=00005 name=+DATA/orcl/datafile/tbs1.259.869718205
input datafile file number=00012 name=+DATA/orcl/datafile/dgomez.441.869446569
channel ORA_DISK_1: starting piece 1 at 23-JAN-15
channel ORA_DISK_1: finished piece 1 at 23-JAN-15 with 3 copies and tag TAG20150123T063722
piece handle=/home/oracle/backup1/bnptdu12_1_1 comment=NONE
piece handle=/home/oracle/backup2/bnptdu12_1_2 comment=NONE
piece handle=/home/oracle/backup3/bnptdu12_1_3 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 23-JAN-15
channel ORA_DISK_1: finished piece 1 at 23-JAN-15 with 3 copies and tag TAG20150123T063722
piece handle=/home/oracle/backup1/boptdu19_1_1 comment=NONE
piece handle=/home/oracle/backup2/boptdu19_1_2 comment=NONE
piece handle=/home/oracle/backup3/boptdu19_1_3 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 23-JAN-15

Confirming that the files were triplexed:

[oracle@a1 ~]$ ls -ltr /home/oracle/backup*
/home/oracle/backup3:
total 945616
-rw-r----- 1 oracle asmadmin 948445184 Jan 23 06:37 bnptdu12_1_3
-rw-r----- 1 oracle asmadmin 18907136 Jan 23 06:37 boptdu19_1_3

/home/oracle/backup2:
total 945616
-rw-r----- 1 oracle asmadmin 948445184 Jan 23 06:37 bnptdu12_1_2
-rw-r----- 1 oracle asmadmin 18907136 Jan 23 06:37 boptdu19_1_2

/home/oracle/backup1:
total 945616
-rw-r----- 1 oracle asmadmin 948445184 Jan 23 06:37 bnptdu12_1_1
-rw-r----- 1 oracle asmadmin 18907136 Jan 23 06:37 boptdu19_1_1
[oracle@a1 ~]$

OPTION 2: "DATAFILE BACKUP COPIES" configured in RMAN.

Checking the current parameter' values, I left the copies of datafile set to 3:

RMAN> show channel;

RMAN configuration parameters for database with db_unique_name ORCL are:
RMAN configuration has no stored or default parameters

RMAN> show DATAFILE BACKUP COPIES;

RMAN configuration parameters for database with db_unique_name ORCL are:
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 3;

RMAN>

Creating a Backup specifying the paths:

RMAN> backup database FORMAT '/home/oracle/backup1/%U', '/home/oracle/backup2/%U', '/home/oracle/backup3/%U';

Starting backup at 23-JAN-15
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00009 name=+DATA/orcl/datafile/apextbs.463.869105715
input datafile file number=00011 name=+DATA/orcl/datafile/xdbtbs.464.869095177
input datafile file number=00001 name=+DATA/orcl/datafile/system.437.865029795
input datafile file number=00002 name=+DATA/orcl/datafile/sysaux.353.865029795
input datafile file number=00003 name=+DATA/orcl/datafile/undotbs1.354.865029795
input datafile file number=00004 name=+DATA/orcl/datafile/users.256.865029795
input datafile file number=00008 name=+DATA/orcl/datafile/fdatbs.449.867242657
input datafile file number=00005 name=+DATA/orcl/datafile/tbs1.259.869718205
input datafile file number=00012 name=+DATA/orcl/datafile/dgomez.441.869446569
channel ORA_DISK_1: starting piece 1 at 23-JAN-15
channel ORA_DISK_1: finished piece 1 at 23-JAN-15 with 3 copies and tag TAG20150123T064001
piece handle=/home/oracle/backup1/brptdu61_1_1 comment=NONE
piece handle=/home/oracle/backup2/brptdu61_1_2 comment=NONE
piece handle=/home/oracle/backup3/brptdu61_1_3 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 23-JAN-15
channel ORA_DISK_1: finished piece 1 at 23-JAN-15 with 3 copies and tag TAG20150123T064001
piece handle=/home/oracle/backup1/bsptdu68_1_1 comment=NONE
piece handle=/home/oracle/backup2/bsptdu68_1_2 comment=NONE
piece handle=/home/oracle/backup3/bsptdu68_1_3 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 23-JAN-15


OPTION 3: No configuration in RMAN

Checking the current configuration of RMAN, there is no any configuration set:

RMAN> show channel;

RMAN configuration parameters for database with db_unique_name ORCL are:
RMAN configuration has no stored or default parameters

RMAN> show datafile backup copies;

RMAN configuration parameters for database with db_unique_name ORCL are:
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default

Creating a Backup specifying all the configuration (paths and copies):

RMAN> backup device type disk copies 3 database format '/home/oracle/backup1/%U', '/home/oracle/backup2/%U', '/home/oracle/backup3/%U';

Starting backup at 23-JAN-15
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00009 name=+DATA/orcl/datafile/apextbs.463.869105715
input datafile file number=00011 name=+DATA/orcl/datafile/xdbtbs.464.869095177
input datafile file number=00001 name=+DATA/orcl/datafile/system.437.865029795
input datafile file number=00002 name=+DATA/orcl/datafile/sysaux.353.865029795
input datafile file number=00003 name=+DATA/orcl/datafile/undotbs1.354.865029795
input datafile file number=00004 name=+DATA/orcl/datafile/users.256.865029795
input datafile file number=00008 name=+DATA/orcl/datafile/fdatbs.449.867242657
input datafile file number=00005 name=+DATA/orcl/datafile/tbs1.259.869718205
input datafile file number=00012 name=+DATA/orcl/datafile/dgomez.441.869446569
channel ORA_DISK_1: starting piece 1 at 23-JAN-15
channel ORA_DISK_1: finished piece 1 at 23-JAN-15 with 3 copies and tag TAG20150123T064640
piece handle=/home/oracle/backup1/bvptduig_1_1 comment=NONE
piece handle=/home/oracle/backup2/bvptduig_1_2 comment=NONE
piece handle=/home/oracle/backup3/bvptduig_1_3 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 23-JAN-15
channel ORA_DISK_1: finished piece 1 at 23-JAN-15 with 3 copies and tag TAG20150123T064640
piece handle=/home/oracle/backup1/c0ptduiv_1_1 comment=NONE
piece handle=/home/oracle/backup2/c0ptduiv_1_2 comment=NONE
piece handle=/home/oracle/backup3/c0ptduiv_1_3 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 23-JAN-15