19211804 Oracle Rman Backup

Published on June 2016 | Categories: Documents | Downloads: 74 | Comments: 0 | Views: 603
of 5
Download PDF   Embed   Report

Comments

Content

ORACLE RMAN BACKUP This article shows how to setup and configure RMAN backups. A. ENABLING ARCHIVELOG MODE When you enable ARCHI !"#$ Mode% you will pre&ent R!'# logs to be o&erwritten. To enable archi&ing let(s first check the current archi&ing )ode* +,"- +!"!CT "#$.M#'! /R#M +0+. 1'ATA2A+!3 "#$.M#'! 444444444444 N#ARCHI !"#$ After ensuring that we are on N#ARCHI !"#$ )ode% we can enable archi&ing* +,"- startup )ount #RAC"! instance started. Total +yste) $lobal Area 567879:;< bytes /i=ed +i>e 5:??9@6 bytes ariable +i>e 58;6@?76? bytes 'atabase 2uffers @85<86@7 bytes Redo 2uffers @<@577 bytes 'atabase )ounted. +,"- alter database archi&elog3 'atabase altered. +,"- alter database open3 'atabase altered. After opening database% let(s check if we were successful* B. SCHEDULING RMAN BACKUP a. RMAN SCHEDULING VIA ORACLE ENTERPRISE MANAGER (OEM) In order to schedule RMAN backup &ia oracle enterprise )anager% you need to login to #!M successfully with your +0+ account. After loging in% na&igate to AMaintenance4- +chedule 2ackupB. To perfor) successful backup% you need to infor) #racle about your operating syste) login credentials because #racle will need to access database files through your os file security syste). ATTENTION: When you change your operating syste) password% do not forget to update your #+ credentials info on #!M pre&iously scheduled RMAN Cobs. "ater on% choose Acusto)i>ed backupD to specify your backup strategy and choose Awhole databaseD as the obCect you want to backup unless you ha&e another specific purpose. Now you will see the page which will allow you to sa&e all the details you want your RMAN backup schedule has. "ets e=plore these properties in details one by one* Backup Type: There are two types of backups strategi>es you can choose which are full backups and incre)ental backups. We will go in )ore details on incre)ental backups because it has a a)a>ing algorith) inside. !u"" Backup#

4 I$c%e&e$'a" Backup#: RMAN incre)ental backups back up only datafile blocks that ha&e changed since a specified pre&ious backup. 0ou can )ake incre)ental backups of databases% indi&idual tablespaces or datafiles. The goal of an incre)ental backup is to back up only those data blocks that ha&e changed since a pre&ious backup. I$c%e&e$'a" Backup A"()%*'+&: !ach data block in a datafile contains a syste) change nu)ber E+CNF% which is the +CN at which the )ost recent change was )ade to the block. 'uring an incre)ental backup% RMAN reads the +CN of each data block in the input file and co)pares it to the checkpoint +CN of the parent incre)ental backup. If the +CN in the input data block is greater than or eGual to the checkpoint +CN of the parent% then RMAN copies the block. Note that if you enable the block change tracking feature% RMAN can refer to the change tracking file to identify changed blocks in datafiles without scanning the full contents of the datafile. #nce enabled% block change tracking does not alter how you take or use incre)ental backups% other than offering increased perfor)ance. Incre)ental backups either be "e&el ? Esa)e as full back upF or "e&el 5 Edetails are belowF. D*,,e%e$'*a" )% Cu&u"a'*-e Le-e". I$c%e&e$'a" Backup#: H A differential backup% which backs up all blocks changed after the )ost recent incre)ental backup at le&el 5 or ?. H A cu)ulati&e backup% which backs up all blocks changed after the )ost recent incre)ental backup at le&el ?. Incre)ental backups are differential by default. HINT: Cu)ulati&e backups are preferable to differential backups when reco&ery ti)e is )ore i)portant than disk space% because during reco&ery each differential backup )ust be applied in succession. Ise cu)ulati&e incre)ental backups instead of differential% if enough disk space is a&ailable to store cu)ulati&e incre)ental backups. H Backup M)/e: If your database is in ARCHI !"#$ )ode% you can take #N"IN! backups which )eans you can ha&e your in #J!N )ode during backup. #n the other hand% if your database is in N#ARCHI !"#$ )ode% when your backup Cob starts it will shutdown your database and start up your database in )ount state. After finishing backup procedure% your backup Cob will alter your database to open state. 0 A/-a$ce/: If you )ark AAlso backup all archi&ed logs on diskD option% r)an will backup your achi&ed logs. If you also )ark A'elete all archi&ed logs fro) disk after successfully backing upD r)an will delete the) after backing up. This option is useful when you start to ha&e disk si>e proble)s. Marking AIse Jro=y copy supported by )edia )anage)ent software to perfor) a backupD will let you enable RMAN turns o&er control of the data transfer to a )edia )anager that supports this feature. When you )ark A'elete obsolete backupsD option% the retention policy deter)ines which backups and i)age copies are obsolete. If selected% the obsolete backups and copies will be deleted when the backup is finished. When you click N!KT button% you will see a screen which will ask you about where would you like to store your backup files% you can either choose disk backup or tape backup* Third step is setting the Cob schedule* "ater on% fourth step is checking the RMAN script and sub)itting the Cob* 1. RMAN SCHEDULING VIA RMAN SCRIPTING If you no longer ha&e a particular archi&elog file you can let RMAN catalog know this by issuing the following co))and at the r)an pro)pt after connecting to the r)an catalog and the target database 4 change archi&elog all crosscheck 3 C. R!+T#RIN$LR!C# !RIN$ /R#M RMAN 2ACMIJ a. Connecting to RMAN

After connecting to RMAN co))and pro)pt% we can set retention policy to reco&ery window% redundancy and controlfile autobackup on options as below* SOURCE 5. !nabling ARCHI !"#$ Mode% http*LLwww.cuddletech.co)LarticlesLoracleLnode86.ht)l @. #racleN 'atabase 2ackup and Reco&ery 2asics% http*LLdownload4 uk.oracle.co)LdocsLcdL259:?<.?5Lbackup.5?@Lb5759@Lbkup??7.ht) ORACLE RMAN BACKUP This article shows how to setup and configure RMAN backups. A. ENABLING ARCHIVELOG MODE When you enable ARCHI !"#$ Mode% you will pre&ent R!'# logs to be o&erwritten. To enable archi&ing let(s first check the current archi&ing )ode* +,"- +!"!CT "#$.M#'! /R#M +0+. 1'ATA2A+!3 "#$.M#'! 444444444444 N#ARCHI !"#$ After ensuring that we are on N#ARCHI !"#$ )ode% we can enable archi&ing* +,"- startup )ount #RAC"! instance started. Total +yste) $lobal Area 567879:;< bytes /i=ed +i>e 5:??9@6 bytes ariable +i>e 58;6@?76? bytes 'atabase 2uffers @85<86@7 bytes Redo 2uffers @<@577 bytes 'atabase )ounted. +,"- alter database archi&elog3 'atabase altered. +,"- alter database open3 'atabase altered. After opening database% let(s check if we were successful* B. SCHEDULING RMAN BACKUP a. RMAN SCHEDULING VIA ORACLE ENTERPRISE MANAGER (OEM) In order to schedule RMAN backup &ia oracle enterprise )anager% you need to login to #!M successfully with your +0+ account. After loging in% na&igate to AMaintenance4- +chedule 2ackupB. To perfor) successful backup% you need to infor) #racle about your operating syste) login credentials because #racle will need to access database files through your os file security syste). ATTENTION: When you change your operating syste) password% do not forget to update your #+ credentials info on #!M pre&iously scheduled RMAN Cobs. "ater on% choose Acusto)i>ed backupD to specify your backup strategy and choose Awhole databaseD as the obCect you want to backup unless you ha&e another specific purpose. Now you will see the page which will allow you to sa&e all the details you want your RMAN

backup schedule has. "ets e=plore these properties in details one by one* Backup Type: There are two types of backups strategi>es you can choose which are full backups and incre)ental backups. We will go in )ore details on incre)ental backups because it has a a)a>ing algorith) inside. !u"" Backup# 4 I$c%e&e$'a" Backup#: RMAN incre)ental backups back up only datafile blocks that ha&e changed since a specified pre&ious backup. 0ou can )ake incre)ental backups of databases% indi&idual tablespaces or datafiles. The goal of an incre)ental backup is to back up only those data blocks that ha&e changed since a pre&ious backup. I$c%e&e$'a" Backup A"()%*'+&: !ach data block in a datafile contains a syste) change nu)ber E+CNF% which is the +CN at which the )ost recent change was )ade to the block. 'uring an incre)ental backup% RMAN reads the +CN of each data block in the input file and co)pares it to the checkpoint +CN of the parent incre)ental backup. If the +CN in the input data block is greater than or eGual to the checkpoint +CN of the parent% then RMAN copies the block. Note that if you enable the block change tracking feature% RMAN can refer to the change tracking file to identify changed blocks in datafiles without scanning the full contents of the datafile. #nce enabled% block change tracking does not alter how you take or use incre)ental backups% other than offering increased perfor)ance. Incre)ental backups either be "e&el ? Esa)e as full back upF or "e&el 5 Edetails are belowF. D*,,e%e$'*a" )% Cu&u"a'*-e Le-e". I$c%e&e$'a" Backup#: H A differential backup% which backs up all blocks changed after the )ost recent incre)ental backup at le&el 5 or ?. H A cu)ulati&e backup% which backs up all blocks changed after the )ost recent incre)ental backup at le&el ?. Incre)ental backups are differential by default. HINT: Cu)ulati&e backups are preferable to differential backups when reco&ery ti)e is )ore i)portant than disk space% because during reco&ery each differential backup )ust be applied in succession. Ise cu)ulati&e incre)ental backups instead of differential% if enough disk space is a&ailable to store cu)ulati&e incre)ental backups. H Backup M)/e: If your database is in ARCHI !"#$ )ode% you can take #N"IN! backups which )eans you can ha&e your in #J!N )ode during backup. #n the other hand% if your database is in N#ARCHI !"#$ )ode% when your backup Cob starts it will shutdown your database and start up your database in )ount state. After finishing backup procedure% your backup Cob will alter your database to open state. 0 A/-a$ce/: If you )ark AAlso backup all archi&ed logs on diskD option% r)an will backup your achi&ed logs. If you also )ark A'elete all archi&ed logs fro) disk after successfully backing upD r)an will delete the) after backing up. This option is useful when you start to ha&e disk si>e proble)s. Marking AIse Jro=y copy supported by )edia )anage)ent software to perfor) a backupD will let you enable RMAN turns o&er control of the data transfer to a )edia )anager that supports this feature. When you )ark A'elete obsolete backupsD option% the retention policy deter)ines which backups and i)age copies are obsolete. If selected% the obsolete backups and copies will be deleted when the backup is finished. When you click N!KT button% you will see a screen which will ask you about where would you like to store your backup files% you can either choose disk backup or tape backup* Third step is setting the Cob schedule* "ater on% fourth step is checking the RMAN script and sub)itting the Cob* 1. RMAN SCHEDULING VIA RMAN SCRIPTING

If you no longer ha&e a particular archi&elog file you can let RMAN catalog know this by issuing the following co))and at the r)an pro)pt after connecting to the r)an catalog and the target database 4 change archi&elog all crosscheck 3 C. R!+T#RIN$LR!C# !RIN$ /R#M RMAN 2ACMIJ a. Connecting to RMAN After connecting to RMAN co))and pro)pt% we can set retention policy to reco&ery window% redundancy and controlfile autobackup on options as below* SOURCE 5. !nabling ARCHI !"#$ Mode% http*LLwww.cuddletech.co)LarticlesLoracleLnode86.ht)l @. #racleN 'atabase 2ackup and Reco&ery 2asics% http*LLdownload4 uk.oracle.co)LdocsLcdL259:?<.?5Lbackup.5?@Lb5759@Lbkup??7.ht)

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close