Está en la página 1de 5

08/01/2015

BACKUP OF FULL DATABASE USING RMAN IN ORACLE 11G | Open Source Databases And Applications

BACKUP OF FULL DATABASE USING RMAN IN


ORACLE 11G
ORACLE DBA, RMAN

January 7, 2015

1 Comment

In this post we will explore how to perform backup and restoration of full database of ORACLE 11G using
RMAN utility.
There might be so many tutorial on internet about RMAN Backup and restoration but here i have
simplified it so that one can understand and perform the task without any issue.
RMAN utilitiy can be use to perform FULL BACKUP, INCREMENTAL BACKUP etc
Now to perform FULL DATABASE BACKUP USING RMAN FOLLOW BELOW GIVEN STEPS.
First connect to RMAN console by issuing RMAN from OS console.
[oracle@oracle ~]$ rman
Recovery Manager: Release 11.2.0.1.0 Production on Wed Jan 7 17:57:12 2015
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
RMAN> connect target /
connected to target database: ZAHID (DBID=860604843)
Now configure RMAN parameter for backup location etc..
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON;
old RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
new RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
new RMAN configuration parameters are successfully stored
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO
/oracle/zahid_bkp/%F';
old RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO /oracle/archlog_zahid/%F';
new RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO /oracle/zahid_bkp/%F';
new RMAN configuration parameters are successfully stored
RMAN> configure channel device type disk format /oracle/zahid_bkp/%U';
data:text/html;charset=utf-8,%3Ch1%20class%3D%22post-title%22%20style%3D%22clear%3A%20both%3B%20font-weight%3A%20normal%3B%20font-famil 1/5

08/01/2015

BACKUP OF FULL DATABASE USING RMAN IN ORACLE 11G | Open Source Databases And Applications

new RMAN configuration parameters:


CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT /oracle/zahid_bkp/%U';
new RMAN configuration parameters are successfully stored
RMAN> CONFIGURE SNAPSHOT CONTROLFILE NAME TO /oracle/zahid_bkp/snapcf_zahid.f';
old RMAN configuration parameters:
CONFIGURE SNAPSHOT CONTROLFILE NAME TO /oracle/archlog_zahid/snapcf_zahid.f';
new RMAN configuration parameters:
CONFIGURE SNAPSHOT CONTROLFILE NAME TO /oracle/zahid_bkp/snapcf_zahid.f';
new RMAN configuration parameters are successfully stored
Since all the parameter have set for backup. you can check if all the parameters have set properly or not.
RMAN> show all;
RMAN configuration parameters for database with db_unique_name ZAHID are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO /oracle/zahid_bkp/%F';
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT /oracle/zahid_bkp/%U';
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM AES128; # default
CONFIGURE COMPRESSION ALGORITHM BASIC AS OF RELEASE DEFAULT OPTIMIZE FOR LOAD TRUE ; #
default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO /oracle/zahid_bkp/snapcf_zahid.f';
whatever changes we have made for RMAN backup, they are getting reflected.
Now issue backup database command to perform backup.
RMAN> backup database plus archivelog;
Starting backup at 07/01/2015 18:03:46
current log archived
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=40 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=1 RECID=8 STAMP=865811371
input archived log thread=1 sequence=2 RECID=9 STAMP=865987124
input archived log thread=1 sequence=3 RECID=10 STAMP=866046633
data:text/html;charset=utf-8,%3Ch1%20class%3D%22post-title%22%20style%3D%22clear%3A%20both%3B%20font-weight%3A%20normal%3B%20font-famil 2/5

08/01/2015

BACKUP OF FULL DATABASE USING RMAN IN ORACLE 11G | Open Source Databases And Applications

input archived log thread=1 sequence=4 RECID=11 STAMP=867011737


input archived log thread=1 sequence=5 RECID=12 STAMP=867087541
input archived log thread=1 sequence=6 RECID=13 STAMP=867097576
input archived log thread=1 sequence=7 RECID=14 STAMP=867098765
input archived log thread=1 sequence=8 RECID=15 STAMP=867098955
input archived log thread=1 sequence=9 RECID=16 STAMP=867099842
input archived log thread=1 sequence=10 RECID=17 STAMP=867100014
input archived log thread=1 sequence=11 RECID=18 STAMP=867100137
input archived log thread=1 sequence=12 RECID=19 STAMP=867106101
input archived log thread=1 sequence=13 RECID=20 STAMP=867106463
input archived log thread=1 sequence=14 RECID=21 STAMP=867106695
input archived log thread=1 sequence=15 RECID=22 STAMP=867271604
input archived log thread=1 sequence=16 RECID=23 STAMP=867272506
input archived log thread=1 sequence=17 RECID=24 STAMP=867303149
input archived log thread=1 sequence=18 RECID=25 STAMP=867361536
input archived log thread=1 sequence=19 RECID=26 STAMP=867385843
input archived log thread=1 sequence=20 RECID=27 STAMP=867405861
input archived log thread=1 sequence=21 RECID=28 STAMP=867420308
input archived log thread=1 sequence=22 RECID=29 STAMP=867449104
input archived log thread=1 sequence=23 RECID=30 STAMP=867477727
input archived log thread=1 sequence=24 RECID=31 STAMP=867497483
input archived log thread=1 sequence=25 RECID=32 STAMP=867521157
input archived log thread=1 sequence=26 RECID=33 STAMP=867551470
input archived log thread=1 sequence=27 RECID=34 STAMP=867600102
input archived log thread=1 sequence=28 RECID=35 STAMP=867623360
input archived log thread=1 sequence=29 RECID=36 STAMP=867628453
input archived log thread=1 sequence=30 RECID=37 STAMP=867684663
input archived log thread=1 sequence=31 RECID=38 STAMP=867708286
input archived log thread=1 sequence=32 RECID=39 STAMP=867745857
input archived log thread=1 sequence=33 RECID=40 STAMP=868382337
input archived log thread=1 sequence=34 RECID=41 STAMP=868384151
input archived log thread=1 sequence=35 RECID=42 STAMP=868384151
input archived log thread=1 sequence=36 RECID=43 STAMP=868385030
channel ORA_DISK_1: starting piece 1 at 07/01/2015 18:03:53
channel ORA_DISK_1: finished piece 1 at 07/01/2015 18:08:34
piece handle=/oracle/zahid_bkp/0bps5089_1_1 tag=TAG20150107T180352 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:04:41
Finished backup at 07/01/2015 18:08:34
Starting backup at 07/01/2015 18:08:35
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=/home/oracle/app/oracle/oradata/zahid/system01.dbf
input datafile file number=00007 name=/oracle/tblspace/LIVE02.dbf
input datafile file number=00008 name=/oracle/home/products/11.2.0/db_1/dbs/users02.dbf
data:text/html;charset=utf-8,%3Ch1%20class%3D%22post-title%22%20style%3D%22clear%3A%20both%3B%20font-weight%3A%20normal%3B%20font-famil 3/5

08/01/2015

BACKUP OF FULL DATABASE USING RMAN IN ORACLE 11G | Open Source Databases And Applications

input datafile file number=00006 name=/oracle/tblspace/LIVE01.dbf


input datafile file number=00002 name=/home/oracle/app/oracle/oradata/zahid/sysaux01.dbf
channel ORA_DISK_1: starting piece 1 at 07/01/2015 18:08:36
channel ORA_DISK_1: finished piece 1 at 07/01/2015 18:10:53
piece handle=/oracle/zahid_bkp/0cps50h4_1_1 tag=TAG20150107T180835 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:02:18
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00009 name=/oradata/FUNDCUST/user_tablespace/LIVE02.DBF
input datafile file number=00004 name=/home/oracle/app/oracle/oradata/zahid/users01.dbf
channel ORA_DISK_1: starting piece 1 at 07/01/2015 18:10:54
channel ORA_DISK_1: finished piece 1 at 07/01/2015 18:10:57
piece handle=/oracle/zahid_bkp/0dps50le_1_1 tag=TAG20150107T180835 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00005 name=/home/oracle/app/oracle/oradata/zahid/example01.dbf
input datafile file number=00003 name=/home/oracle/app/oracle/oradata/zahid/undotbs01.dbf
channel ORA_DISK_1: starting piece 1 at 07/01/2015 18:10:57
channel ORA_DISK_1: finished piece 1 at 07/01/2015 18:11:22
piece handle=/oracle/zahid_bkp/0eps50lh_1_1 tag=TAG20150107T180835 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25
Finished backup at 07/01/2015 18:11:22
Starting backup at 07/01/2015 18:11: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=37 RECID=44 STAMP=868385486
channel ORA_DISK_1: starting piece 1 at 07/01/2015 18:11:28
channel ORA_DISK_1: finished piece 1 at 07/01/2015 18:11:29
piece handle=/oracle/zahid_bkp/0fps50mg_1_1 tag=TAG20150107T181128 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 07/01/2015 18:11:29
Starting Control File Autobackup at 07/01/2015 18:11:30
piece handle=/oracle/zahid_bkp/c-860604843-20150107-00 comment=NONE
Finished Control File Autobackup at 07/01/2015 18:11:37
Now go to path and check if backup files are present or not.
[oracle@oracle zahid_bkp]$ pwd
/oracle/zahid_bkp
[oracle@oracle zahid_bkp]$ ll
total 2542520
-rw-r 1 oracle oinstall 1301288960 Jan 7 18:08 0bps5089_1_1
data:text/html;charset=utf-8,%3Ch1%20class%3D%22post-title%22%20style%3D%22clear%3A%20both%3B%20font-weight%3A%20normal%3B%20font-famil 4/5

08/01/2015

BACKUP OF FULL DATABASE USING RMAN IN ORACLE 11G | Open Source Databases And Applications

-rw-r 1 oracle oinstall 1126555648 Jan 7 18:10 0cps50h4_1_1


-rw-r 1 oracle oinstall 5906432 Jan 7 18:10 0dps50le_1_1
-rw-r 1 oracle oinstall 147300352 Jan 7 18:11 0eps50lh_1_1
-rw-r 1 oracle oinstall 290304 Jan 7 18:11 0fps50mg_1_1
-rw-r 1 oracle oinstall 9830400 Jan 7 18:11 c-860604843-20150107-00
-rw-r 1 oracle oinstall 9781248 Jan 7 18:11 snapcf_zahid.f
Since all the required files are present and backup has been completed succesfully.
Comments and suggestion are welcome

data:text/html;charset=utf-8,%3Ch1%20class%3D%22post-title%22%20style%3D%22clear%3A%20both%3B%20font-weight%3A%20normal%3B%20font-famil 5/5

También podría gustarte