Introduction:
By default RMAN takes the backup as BACKUPSETS i.e. it combines of multiple datafiles into one or more backupsets.If you want to take the backup of datafiles as it is then you can take IMAGE backups. To take image backups you have to mention ‘AS COPY’ option in backup command.
Let us take full database image backup using RMAN.
[oracle@trichy Desktop]$ export ORACLE_SID=Test2 [oracle@trichy Desktop]$ sqlplus / as sysdba SQL*Plus: Release 12.2.0.1.0 Production on Tue Dec 08 22:13:50 2020 Copyright (c) 1982, 2016, Oracle. All rights reserved. Connected to an idle instance. SQL> startup ORACLE instance started. Total System Global Area 0883027968 bytes Fixed Size 8795808 bytes Variable Size 671091040 bytes Database Buffers 1795162112 bytes Redo Buffers 7979008 bytes Database mounted. Database opened.
Step 1: Start RMAN by typing the following command
$ export ORACLE_SID=test
$ rman target /
Then RMAN will get connected to the database and it will show the following messages
SQL> Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production [oracle@trichy Desktop]$ rman target / Recovery Manager: Release 12.2.0.1.0 - Production on Tue Dec 08 22:16:03 2020 Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved. connected to target database: TEST2 (DBID=1410161747)
Step 2: Now to take Full database IMAGE backup give the following command.
rman> backup as copy database
RMAN> BACKUP AS COPY DATABASE; Starting backup at 08-DEC-20 using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=57 device type=DISK channel ORA_DISK_1: starting datafile copy input datafile file number=00001 name=/u01/app/oracle/oradata/TEST2/datafile/o1_mf_system_hr3xhqh7_.dbf output file name=/u01/app/oracle/fast_recovery_area/Test2/TEST2/datafile/o1_mf_system_hs8pn6dg_.dbf tag=TAG20201008T221700 RECID=4 STAMP=1054678822 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:03:26 channel ORA_DISK_1: starting datafile copy input datafile file number=00003 name=/u01/app/oracle/oradata/TEST2/datafile/o1_mf_sysaux_hr3xkjn2_.dbf output file name=/u01/app/oracle/fast_recovery_area/Test2/TEST2/datafile/o1_mf_sysaux_hs8ptm85_.dbf tag=TAG20201008T221700 RECID=5 STAMP=1054678980 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:02:35 channel ORA_DISK_1: starting datafile copy input datafile file number=00010 name=/u01/app/oracle/oradata/TEST2/B156015846151E20E0531601A8C0E1BD/datafile/o1_mf_sysaux_hr3yd17x_.dbf output file name=/u01/app/oracle/fast_recovery_area/Test2/TEST2/B156015846151E20E0531601A8C0E1BD/datafile/o1_mf_sysaux_hs8pzgm4_.dbf tag=TAG20201008T221700 RECID=6 STAMP=1054679066 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:01:25 channel ORA_DISK_1: starting datafile copy input datafile file number=00006 name=/u01/app/oracle/oradata/TEST2/datafile/o1_mf_sysaux_hr3xoddc_.dbf output file name=/u01/app/oracle/fast_recovery_area/Test2/TEST2/B155D88CB02F1740E0531601A8C05404/datafile/o1_mf_sysaux_hs8q0823_.dbf tag=TAG20201008T221700 RECID=7 STAMP=1054679206 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:02:25 channel ORA_DISK_1: starting datafile copy input datafile file number=00005 name=/u01/app/oracle/oradata/TEST2/datafile/o1_mf_system_hr3xodgm_.dbf output file name=/u01/app/oracle/fast_recovery_area/Test2/TEST2/B155D88CB02F1740E0531601A8C05404/datafile/o1_mf_system_hs8q6o15_.dbf tag=TAG20201008T221700 RECID=8 STAMP=1054679279 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:01:15 channel ORA_DISK_1: starting datafile copy input datafile file number=00009 name=/u01/app/oracle/oradata/TEST2/B156015846151E20E0531601A8C0E1BD/datafile/o1_mf_system_hr3yd15h_.dbf output file name=/u01/app/oracle/fast_recovery_area/Test2/TEST2/B156015846151E20E0531601A8C0E1BD/datafile/o1_mf_system_hs8q9056_.dbf tag=TAG20201008T221700 RECID=9 STAMP=1054679346 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:01:05 channel ORA_DISK_1: starting datafile copy input datafile file number=00004 name=/u01/app/oracle/oradata/TEST2/datafile/o1_mf_undotbs1_hr3xl9r4_.dbf output file name=/u01/app/oracle/fast_recovery_area/Test2/TEST2/datafile/o1_mf_undotbs1_hs8qc1cb_.dbf tag=TAG20201008T221700 RECID=10 STAMP=1054679384 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:35 channel ORA_DISK_1: starting datafile copy input datafile file number=00008 name=/u01/app/oracle/oradata/TEST2/datafile/o1_mf_undotbs1_hr3xodgp_.dbf output file name=/u01/app/oracle/fast_recovery_area/Test2/TEST2/B155D88CB02F1740E0531601A8C05404/datafile/o1_mf_undotbs1_hs8qd4j4_.dbf tag=TAG20201008T221700 RECID=11 STAMP=1054679410 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:25 channel ORA_DISK_1: starting datafile copy input datafile file number=00011 name=/u01/app/oracle/oradata/TEST2/B156015846151E20E0531601A8C0E1BD/datafile/o1_mf_undotbs1_hr3yd17y_.dbf output file name=/u01/app/oracle/fast_recovery_area/Test2/TEST2/B156015846151E20E0531601A8C0E1BD/datafile/o1_mf_undotbs1_hs8qdxoh_.dbf tag=TAG20201008T221700 RECID=12 STAMP=1054679434 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:25 channel ORA_DISK_1: starting datafile copy input datafile file number=00007 name=/u01/app/oracle/oradata/TEST2/datafile/o1_mf_users_hr3xlbto_.dbf output file name=/u01/app/oracle/fast_recovery_area/Test2/TEST2/datafile/o1_mf_users_hs8qfpss_.dbf tag=TAG20201008T221700 RECID=13 STAMP=1054679438 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01 channel ORA_DISK_1: starting datafile copy input datafile file number=00012 name=/u01/app/oracle/oradata/TEST2/B156015846151E20E0531601A8C0E1BD/datafile/o1_mf_users_hr3yfy9c_.dbf output file name=/u01/app/oracle/fast_recovery_area/Test2/TEST2/B156015846151E20E0531601A8C0E1BD/datafile/o1_mf_users_hs8qfqyl_.dbf tag=TAG20201008T221700 RECID=14 STAMP=1054679440 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01 Finished backup at 08-DEC-20 Starting Control File and SPFILE Autobackup at 08-DEC-20 piece handle=/u01/app/oracle/fast_recovery_area/Test2/TEST2/autobackup/2020_10_08/o1_mf_s_1054679441_hs8qfsy3_.bkp comment=NONE Finished Control File and SPFILE Autobackup at 08-DEC-20 The above command will take full database backup and it will store the backup in the directory mentioned in the DB_RECOVERY_FILE_DEST parameter
Recommended Posts