DBA Hub

📋Steps in this guide1/1

Rman backup in multitenant database oracle 12c DBACLASS

With multitenant 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 ORCL READ WRITE NO 5 PROD_MN […]

oracle clusteringintermediate
by OracleDba
12 views
1

Overview

With multitenant feature introduced in oracle 12c, New commands are there for taking rman backup of pluggable database and root container database.

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
SQL> show pdbs

    CON_ID CON_NAME			  OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
	 2 PDB$SEED			  READ ONLY  NO
	 3 ORCL 			  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 options

---- Connect to root container


[oracle@localhost ~]$ rman target sys/oracle@cdb1

Recovery Manager: Release 12.1.0.2.0 - Production on Fri Aug 28 22:46:04 2015

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 28-AUG-15
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 28-AUG-15
piece handle=/home/oracle/app/oracle/fast_recovery_area/CDB1/backupset/2015_08_28/o1_mf_annnn_TAG20150828T224727_by2kxold_.bkp tag=TAG20150828T224727 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:56
Finished backup at 28-AUG-15

Starting backup at 28-AUG-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=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 28-AUG-15

Starting backup at 28-AUG-15
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 28-AUG-15
channel ORA_DISK_1: finished piece 1 at 28-AUG-15
piece handle=/home/oracle/app/oracle/fast_recovery_area/CDB1/backupset/2015_08_28/o1_mf_annnn_TAG20150828T225804_by2lhdwl_.bkp tag=TAG20150828T225804 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 28-AUG-15

Starting Control File and SPFILE Autobackup at 28-AUG-15
piece handle=/home/oracle/app/oracle/fast_recovery_area/CDB1/autobackup/2015_08_28/o1_mf_s_888965886_by2lhhc8_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 28-AUG-15

---- Connect to root container



[oracle@localhost ~]$ rman target sys/oracle@cdb1

Recovery Manager: Release 12.1.0.2.0 - Production on Fri Aug 28 22:46:04 2015

Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.

connected to target database: CDB1 (DBID=828012650)



RMAN> backup pluggable database ORCL;

Starting backup at 28-AUG-15
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=12 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=00008 name=/home/oracle/app/oracle/oradata/cdb1/orcl/system01.dbf
input datafile file number=00011 name=/home/oracle/app/oracle/oradata/cdb1/orcl/example01.dbf
input datafile file number=00009 name=/home/oracle/app/oracle/oradata/cdb1/orcl/sysaux01.dbf
input datafile file number=00010 name=/home/oracle/app/oracle/oradata/cdb1/orcl/SAMPLE_SCHEMA_users01.dbf
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00008 name=/home/oracle/app/oracle/oradata/cdb1/orcl/system01.dbf
input datafile file number=00011 name=/home/oracle/app/oracle/oradata/cdb1/orcl/example01.dbf
input datafile file number=00009 name=/home/oracle/app/oracle/oradata/cdb1/orcl/sysaux01.dbf
input datafile file number=00010 name=/home/oracle/app/oracle/oradata/cdb1/orcl/SAMPLE_SCHEMA_users01.dbf
input datafile file number=00033 name=/home/oracle/app/oracle/oradata/cdb1/orcl/dataconversion.dbf
input datafile file number=00023 name=/home/oracle/app/oracle/oradata/cdb1/orcl/APEX_3496321052328731.dbf
input datafile file number=00027 name=/home/oracle/app/oracle/oradata/cdb1/orcl/APEX_3638406606618093.dbf
input datafile file number=00029 name=/home/oracle/app/oracle/oradata/cdb1/orcl/APEX_1780406307370394.dbf
input datafile file number=00028 name=/home/oracle/app/oracle/oradata/cdb1/orcl/APEX_3753603687620385.dbf
input datafile file number=00030 name=/home/oracle/app/oracle/oradata/cdb1/orcl/APEX_5372044460374154.dbf
input datafile file number=00024 name=/home/oracle/app/oracle/oradata/cdb1/orcl/APEX_3618122143496338.dbf
input datafile file number=00025 name=/home/oracle/app/oracle/oradata/cdb1/orcl/APEX_3624405313851440.dbf
input datafile file number=00026 name=/home/oracle/app/oracle/oradata/cdb1/orcl/APEX_3632418306476203.dbf
channel ORA_DISK_1: starting piece 1 at 28-AUG-15
channel ORA_DISK_1: finished piece 1 at 28-AUG-15
piece handle=/home/oracle/app/oracle/fast_recovery_area/CDB1/FF72AA85A0370D5BE045000000000001/backupset/2015_08_28/o1_mf_nnndf_TAG20150828T232125_by2mv65d_.bkp tag=TAG20150828T232125 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:15
Finished backup at 28-AUG-15

Starting Control File and SPFILE Autobackup at 28-AUG-15
piece handle=/home/oracle/app/oracle/fast_recovery_area/CDB1/autobackup/2015_08_28/o1_mf_s_888967361_by2mxlpf_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 28-AUG-15



channel ORA_DISK_1: starting piece 1 at 28-AUG-15

RMAN> backup database root
2> ;

Starting backup at 29-AUG-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=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 29-AUG-15





channel ORA_DISK_1: finished piece 1 at 29-AUG-15
piece handle=/home/oracle/app/oracle/fast_recovery_area/CDB1/backupset/2015_08_29/o1_mf_nnndf_TAG20150829T010145_by2sqbd9_.bkp tag=TAG20150829T010145 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:25
Finished backup at 29-AUG-15

Starting Control File and SPFILE Autobackup at 29-AUG-15
piece handle=/home/oracle/app/oracle/fast_recovery_area/CDB1/autobackup/2015_08_29/o1_mf_s_888973391_by2sszjo_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 29-AUG-15

[oracle@localhost admin]$ rman target=sys@ORCL

Recovery Manager: Release 12.1.0.2.0 - Production on Sat Aug 29 01:12:28 2015

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 29-AUG-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=00010 name=/home/oracle/app/oracle/oradata/cdb1/orcl/SAMPLE_SCHEMA_users01.dbf
channel ORA_DISK_1: starting piece 1 at 29-AUG-15
channel ORA_DISK_1: finished piece 1 at 29-AUG-15
piece handle=/home/oracle/app/oracle/fast_recovery_area/CDB1/FF72AA85A0370D5BE045000000000001/backupset/2015_08_29/o1_mf_nnndf_TAG20150829T011323_by2tf3vl_.bkp tag=TAG20150829T011323 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07
Finished backup at 29-AUG-15

Starting Control File and SPFILE Autobackup at 29-AUG-15
piece handle=/home/oracle/app/oracle/fast_recovery_area/CDB1/autobackup/2015_08_29/o1_mf_s_888974011_by2tfcd3_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 29-AUG-15

Comments (0)

Please to add comments

No comments yet. Be the first to comment!