- ANKUSH THAVALI
- 23 Nov, 2023
- 0 Comments
- 3 Mins Read
RMAN Backup In Multitenant Database Oracle 12c
As multi-tenant feature introduced in oracle 12c, New commands are there for taking rman backup of pluggable database and root container database.
Backup of complete container( ROOT + ALL PDBS ) :
SQL> show pdbs CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 2 PDB$SEED READ ONLY NO 3 PRIM READ WRITE NO 5 PROD_MN READ WRITE NO SQL> exit Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing optionsNow Connect to root container
[oracle@localhost ~]$ rman target sys/oracle@cdb1 Recovery Manager: Release 12.1.0.2.0 - Production on Thu Nov 23 22:46:04 2023 Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved. connected to target database: CDB1 (DBID=828012650) RMAN> backup database plus archivelog 2> ; Starting backup at 23-NOV-23 current log archived using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=30 device type=DISK channel ORA_DISK_1: starting archived log backup set channel ORA_DISK_1: specifying archived log(s) in backup set input archived log thread=1 sequence=165 RECID=1 STAMP=886318673 input archived log thread=1 sequence=166 RECID=2 STAMP=886319099 input archived log thread=1 sequence=167 RECID=3 STAMP=886320315 input archived log thread=1 sequence=168 RECID=4 STAMP=886321194 channel ORA_DISK_1: finished piece 1 at 23-NOV-23 piece handle=/home/oracle/app/oracle/fast_recovery_area/CDB1/backupset/2023_08_28/o1_mf_annnn_TAG20230828T224727_by2kxold_.bkp tag=TAG20230828T224727 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:56 Finished backup at 23-NOV-23 Starting backup at 23-NOV-23 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=00031 name=/home/oracle/app/oracle/oradata/cdb1/testencry.dbf input datafile file number=00003 name=/home/oracle/app/oracle/oradata/cdb1/sysaux01.dbf input datafile file number=00001 name=/home/oracle/app/oracle/oradata/cdb1/system01.dbf input datafile file number=00004 name=/home/oracle/app/oracle/oradata/cdb1/undotbs01.dbf input datafile file number=00034 name=/home/oracle/app/oracle/oradata/cdb1/dataconversion.dbf input datafile file number=00037 name=/home/oracle/app/oracle/oradata/cdb1/testin1.dbf input datafile file number=00006 name=/home/oracle/app/oracle/oradata/cdb1/users01.dbf channel ORA_DISK_1: starting piece 1 at 23-NOV-23 Starting backup at 23-NOV-23 current log archived using channel ORA_DISK_1 channel ORA_DISK_1: starting archived log backup set channel ORA_DISK_1: specifying archived log(s) in backup set input archived log thread=1 sequence=268 RECID=104 STAMP=888965884 channel ORA_DISK_1: starting piece 1 at 23-NOV-23 channel ORA_DISK_1: finished piece 1 at 23-NOV-23 piece handle=/home/oracle/app/oracle/fast_recovery_area/CDB1/backupset/2023_08_28/o1_mf_annnn_TAG20230828T225804_by2lhdwl_.bkp tag=TAG20230828T225804 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01 Finished backup at 23-NOV-23 Starting Control File and SPFILE Autobackup at 23-NOV-23 piece handle=/home/oracle/app/oracle/fast_recovery_area/CDB1/autobackup/2023_08_28/o1_mf_s_888965886_by2lhhc8_.bkp comment=NONE Finished Control File and SPFILE Autobackup at 23-NOV-23
Taking backup of particular pluggable database:(backup pluggable database PRIM;)
[oracle@node1 admin]$ rman target=sys@PRIM Recovery Manager: Release 12.1.0.2.0 - Production on Sat Aug 29 01:12:28 2023 Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved. target database Password: connected to target database: CDB1 (DBID=828012650) RMAN> backup tablespace USERS; Starting backup at 23-NOV-23 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=00010 name=/home/oracle/app/oracle/oradata/cdb1/PRIM/SAMPLE_SCHEMA_users01.dbf channel ORA_DISK_1: starting piece 1 at 23-NOV-23 channel ORA_DISK_1: finished piece 1 at 23-NOV-23 piece handle=/home/oracle/app/oracle/fast_recovery_area/CDB1/FF72AA85A0370D5BE045000000000001/backupset/2023_08_29/o1_mf_nnndf_TAG20230829T011323_by2tf3vl_.bkp tag=TAG20230829T011323 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07 Finished backup at 23-NOV-23 Starting Control File and SPFILE Autobackup at 23-NOV-23 piece handle=/home/oracle/app/oracle/fast_recovery_area/CDB1/autobackup/2023_08_29/o1_mf_s_888974011_by2tfcd3_.bkp comment=NONE Finished Control File and SPFILE Autobackup at 23-NOV-23