Tuesday, December 13, 2016

Backup container database in oracle 12c



Container Database (CDB) Backup

Backup of a Container Database (CDB) is essentially the same as a non-Container Database. The main thing to remember is, by doing a full backup of the CDB you are also doing a full backup of all PDBs.

Connect to RMAN using OS authentication and take a full backup using the following command. This means you are connecting to the root container with "AS SYSDBA" privilege.

RMAN> backup database plus archivelog;

PDB database backup

Pluggable Database (PDB) Backup

There are two ways to back up pluggable databases. When connected to RMAN as the root container, you can backup one or more PDBs using the following command.

$ rman target=/

RMAN> BACKUP PLUGGABLE DATABASE pdb1;


Starting backup at 11-DEC-16
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=00008 name=/u01/app/oracle/oradata/cdb1/pdb1/sysaux01.dbf
input datafile file number=00007 name=/u01/app/oracle/oradata/cdb1/pdb1/system01.dbf
input datafile file number=00009 name=/u01/app/oracle/oradata/cdb1/pdb1/pdb1_users01.dbf
channel ORA_DISK_1: starting piece 1 at 11-DEC-16
channel ORA_DISK_1: finished piece 1 at 11-DEC-16
piece handle=/media/sf_12cR1/backup/0brn71t3_1_1 tag=TAG20161211T134403 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:45
Finished backup at 11-DEC-16


No comments:

Post a Comment