Oracle 12c: Backup de CDB e PDBs

12c

Para verificar o CBD, PDBs, e cada um de seus DATAFILEs:

[ricardo@Melquior ~]$ export ORACLE_SID=PROD
[ricardo@Melquior ~]$ rman target /

Recovery Manager: Release 12.1.0.2.0 - Production on Tue Apr 14 10:06:05 2015

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

connected to target database: PROD (DBID=288827937)

RMAN> report SCHEMA;

Report of database schema for database with db_unique_name PROD

List of Permanent Datafiles
===========================
File Size(MB) Tablespace           RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1    780      SYSTEM               YES     /u01/app/oracle/oradata/PROD/system01.dbf
3    600      SYSAUX               NO      /u01/app/oracle/oradata/PROD/sysaux01.dbf
4    90       UNDOTBS1             YES     /u01/app/oracle/oradata/PROD/undotbs01.dbf
5    250      PDB$SEED:SYSTEM      NO      /u01/app/oracle/oradata/PROD/pdbseed/system01.dbf
6    5        USERS                NO      /u01/app/oracle/oradata/PROD/users01.dbf
7    490      PDB$SEED:SYSAUX      NO      /u01/app/oracle/oradata/PROD/pdbseed/sysaux01.dbf
8    250      DEV1:SYSTEM          NO      /u01/app/oracle/oradata/PROD/DEV1/system01.dbf
9    510      DEV1:SYSAUX          NO      /u01/app/oracle/oradata/PROD/DEV1/sysaux01.dbf
10   250      DEV2:SYSTEM          NO      /u01/app/oracle/oradata/PROD/DEV2/system01.dbf
11   510      DEV2:SYSAUX          NO      /u01/app/oracle/oradata/PROD/DEV2/sysaux01.dbf
12   100      DEV1:TESTE           NO      /u01/app/oracle/oradata/PROD/DEV1/TESTE01.dbf
13   250      DEV3:SYSTEM          NO      /u01/app/oracle/oradata/PROD/DEV3/system01.dbf
14   510      DEV3:SYSAUX          NO      /u01/app/oracle/oradata/PROD/DEV3/sysaux01.dbf
15   100      DEV3:TESTE           NO      /u01/app/oracle/oradata/PROD/DEV3/TESTE01.dbf
16   250      DEV4:SYSTEM          NO      /u01/app/oracle/oradata/PROD/DEV4/system01.dbf
17   510      DEV4:SYSAUX          NO      /u01/app/oracle/oradata/PROD/DEV4/sysaux01.dbf
18   100      DEV4:TESTE           NO      /u01/app/oracle/oradata/PROD/DEV4/TESTE01.dbf
19   1824     DEV1:SOE             NO      /u01/app/oracle/oradata/PROD/DEV1/soe01.dbf

List of Temporary Files
=======================
File Size(MB) Tablespace           Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1    60       TEMP                 32767       /u01/app/oracle/oradata/PROD/temp01.dbf
2    20       PDB$SEED:TEMP        32767       /u01/app/oracle/oradata/PROD/pdbseed/pdbseed_temp012015-04-14_08-14-50-AM.dbf
3    68       DEV1:TEMP            32767       /u01/app/oracle/oradata/PROD/DEV1/pdbseed_temp012015-04-14_08-14-50-AM.dbf
4    20       DEV2:TEMP            32767       /u01/app/oracle/oradata/PROD/DEV2/pdbseed_temp012015-04-14_08-14-50-AM.dbf
5    20       DEV3:TEMP            32767       /u01/app/oracle/oradata/PROD/DEV3/pdbseed_temp012015-04-14_08-14-50-AM.dbf
6    20       DEV4:TEMP            32767       /u01/app/oracle/oradata/PROD/DEV4/pdbseed_temp012015-04-14_08-14-50-AM.dbf


RMAN>

Para fazer BACKUP de tudo, é o velho BACKUP DATABASE.

RMAN> BACKUP DATABASE;

Starting backup at 14-APR-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=00019 name=/u01/app/oracle/oradata/PROD/DEV1/soe01.dbf
input datafile file number=00009 name=/u01/app/oracle/oradata/PROD/DEV1/sysaux01.dbf
input datafile file number=00008 name=/u01/app/oracle/oradata/PROD/DEV1/system01.dbf
input datafile file number=00012 name=/u01/app/oracle/oradata/PROD/DEV1/TESTE01.dbf
channel ORA_DISK_1: starting piece 1 at 14-APR-15
channel ORA_DISK_1: finished piece 1 at 14-APR-15
piece handle=/u01/app/oracle/fast_recovery_area/PROD/13AE81DA90492E01E0530100007FB813/backupset/2015_04_14/o1_mf_nnndf_TAG20150414T101956_blt4zx35_.bkp tag=TAG20150414T101956 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:02:55
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/app/oracle/oradata/PROD/system01.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/PROD/sysaux01.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/PROD/undotbs01.dbf
input datafile file number=00006 name=/u01/app/oracle/oradata/PROD/users01.dbf
channel ORA_DISK_1: starting piece 1 at 14-APR-15
channel ORA_DISK_1: finished piece 1 at 14-APR-15
piece handle=/u01/app/oracle/fast_recovery_area/PROD/backupset/2015_04_14/o1_mf_nnndf_TAG20150414T101956_blt55dt8_.bkp tag=TAG20150414T101956 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:35
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00014 name=/u01/app/oracle/oradata/PROD/DEV3/sysaux01.dbf
input datafile file number=00013 name=/u01/app/oracle/oradata/PROD/DEV3/system01.dbf
input datafile file number=00015 name=/u01/app/oracle/oradata/PROD/DEV3/TESTE01.dbf
channel ORA_DISK_1: starting piece 1 at 14-APR-15
channel ORA_DISK_1: finished piece 1 at 14-APR-15
piece handle=/u01/app/oracle/fast_recovery_area/PROD/13AE81DA904C2E01E0530100007FB813/backupset/2015_04_14/o1_mf_nnndf_TAG20150414T101956_blt58d5p_.bkp tag=TAG20150414T101956 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:56
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00017 name=/u01/app/oracle/oradata/PROD/DEV4/sysaux01.dbf
input datafile file number=00016 name=/u01/app/oracle/oradata/PROD/DEV4/system01.dbf
input datafile file number=00018 name=/u01/app/oracle/oradata/PROD/DEV4/TESTE01.dbf
channel ORA_DISK_1: starting piece 1 at 14-APR-15
channel ORA_DISK_1: finished piece 1 at 14-APR-15
piece handle=/u01/app/oracle/fast_recovery_area/PROD/13AE81DA904D2E01E0530100007FB813/backupset/2015_04_14/o1_mf_nnndf_TAG20150414T101956_blt5b44l_.bkp tag=TAG20150414T101956 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:55
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00011 name=/u01/app/oracle/oradata/PROD/DEV2/sysaux01.dbf
input datafile file number=00010 name=/u01/app/oracle/oradata/PROD/DEV2/system01.dbf
channel ORA_DISK_1: starting piece 1 at 14-APR-15
channel ORA_DISK_1: finished piece 1 at 14-APR-15
piece handle=/u01/app/oracle/fast_recovery_area/PROD/13AE81DA904B2E01E0530100007FB813/backupset/2015_04_14/o1_mf_nnndf_TAG20150414T101956_blt5cvqn_.bkp tag=TAG20150414T101956 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:55
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00007 name=/u01/app/oracle/oradata/PROD/pdbseed/sysaux01.dbf
input datafile file number=00005 name=/u01/app/oracle/oradata/PROD/pdbseed/system01.dbf
channel ORA_DISK_1: starting piece 1 at 14-APR-15
channel ORA_DISK_1: finished piece 1 at 14-APR-15
piece handle=/u01/app/oracle/fast_recovery_area/PROD/13AE56DB9719297DE0530100007F53F7/backupset/2015_04_14/o1_mf_nnndf_TAG20150414T101956_blt5fm10_.bkp tag=TAG20150414T101956 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:56
Finished backup at 14-APR-15

Starting Control File and SPFILE Autobackup at 14-APR-15
piece handle=/u01/app/oracle/fast_recovery_area/PROD/autobackup/2015_04_14/o1_mf_s_876997690_blt5hfgj_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 14-APR-15

RMAN>

Para fazer BACKUP apenas do CBD (também chamado de ROOT):

RMAN> BACKUP DATABASE ROOT;

Starting backup at 14-APR-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=00001 name=/u01/app/oracle/oradata/PROD/system01.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/PROD/sysaux01.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/PROD/undotbs01.dbf
input datafile file number=00006 name=/u01/app/oracle/oradata/PROD/users01.dbf
channel ORA_DISK_1: starting piece 1 at 14-APR-15
channel ORA_DISK_1: finished piece 1 at 14-APR-15
piece handle=/u01/app/oracle/fast_recovery_area/PROD/backupset/2015_04_14/o1_mf_nnndf_TAG20150414T102827_blt5hwjl_.bkp tag=TAG20150414T102827 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:45
Finished backup at 14-APR-15

Starting Control File and SPFILE Autobackup at 14-APR-15
piece handle=/u01/app/oracle/fast_recovery_area/PROD/autobackup/2015_04_14/o1_mf_s_876997813_blt5m7t6_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 14-APR-15

RMAN>

Para fazer backup de apenas um PDB:

RMAN> BACKUP PLUGGABLE DATABASE DEV4;

Starting backup at 14-APR-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=00017 name=/u01/app/oracle/oradata/PROD/DEV4/sysaux01.dbf
input datafile file number=00016 name=/u01/app/oracle/oradata/PROD/DEV4/system01.dbf
input datafile file number=00018 name=/u01/app/oracle/oradata/PROD/DEV4/TESTE01.dbf
channel ORA_DISK_1: starting piece 1 at 14-APR-15
channel ORA_DISK_1: finished piece 1 at 14-APR-15
piece handle=/u01/app/oracle/fast_recovery_area/PROD/13AE81DA904D2E01E0530100007FB813/backupset/2015_04_14/o1_mf_nnndf_TAG20150414T103037_blt5myh1_.bkp tag=TAG20150414T103037 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:55
Finished backup at 14-APR-15

Starting Control File and SPFILE Autobackup at 14-APR-15
piece handle=/u01/app/oracle/fast_recovery_area/PROD/autobackup/2015_04_14/o1_mf_s_876997893_blt5oqx7_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 14-APR-15

RMAN>

Leave a Reply

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *

Esse site utiliza o Akismet para reduzir spam. Aprenda como seus dados de comentários são processados.