You are on page 1of 32

R 

| 
 
  
  

‡ 

‡ | 

‡   | 
‡ | 

‡ | 

‡  || 
‡ 
—






  ! 

‡ " 


 
‡ !
  #
$
± Recovery Time Objective (RTO)
‡ p p ± Outage
‡ Downtime (identify ± plan ± recover)
‡ Granularity (database, tablespace, datafile, etc.)
± Recovery Point Objective (RPO)
‡ p p ± Data loss
‡ Frequency (weekly, daily, ½ day, etc.)
‡ PiTR (Point-In-Time Recovery)
± Retention
‡ Time (7 years, 2 week, etc.)
‡ Location (Onsite or offsite)
± Cost
‡ pffected by RTO, RPO, and retention
‡ ! 
#
$
± Physical: disaster, corruption, failure, etc..
± Logical: application errors, user errors, etc.

 |
% 
 |  &'   !$() 
Closed database backups Supported. Requires instance to be mounted. Supported. Not supported.
Open database backups Supported. No need to use BEGIN/END BpC P Supported. Must use Requires rollback or undo
statements. BEGIN/END segments to generate consistent
BpC P statements. backups.
Incremental backups Supported. Not supported. Not supported.
Corrupt block detection Supported. Identifies corrupt blocks and logs in Not supported. Supported. Identifies corrupt
V$DpTpBpSE_BLOC _CORRPTION. blocks in the export log.
putomatic specification of Supported. Establishes the name and locations of all Not supported. Files Not applicable.
files to include in a backup files to be backed up (whole database, tablespaces, to be backed up must
datafiles, control files, and so on). be located and copied
manually.
Backup repository Supported. Backups are recorded in the control file, Not supported. DBp Not supported.
which is the main repository of RMpN metadata. must keep own
pdditionally, you can store this metadata in a recovery records of backups.
catalog, which is a schema in a different database.
Backups to a media Supported. Interfaces with a media manager. RMpN Supported. Backup to Not supported.
manager also supports proxy copy, a feature that allows a tape is manual or
media manager to manage completely the transfer of controlled by a media
data between disk and backup media. manager.
Backup of initialization Supported. Supported. Not supported.
parameter file
Backup of password and Not supported. Supported. Not supported.
networking files
Platform-independent Supported. Not supported. Supported.
language for backups
 

*

| 

%
 | 
‡ +
| ,
± |ecovery ager is an Oracle Database client that performs backup and
recovery tasks on your databases and automates administration of your
backup strategies. It greatly simplifies backing up, restoring, and recovering
database files.
‡ |  -
± Data protection ± physical backups of your database
± Data preservation ± a copy for year end accounting
± Data transfer ± move a database from one platform to another
‡ | 
-
± Incremental backups
± Block validation
± Compression
± Encryption
± Duplication
± Cross-platform data conversion
%
 | 
‡ |  $ -
± Target database - the Oracle database which the backup or recovery
operations are being performed.
± RMpN client ± executable that interprets commands, directs server sessions
to execute those commands, and records its activity in the target database
control file (or catalog).
± Fast Recovery prea (Optional) ± a disk location that you can use to store
recovery-related files such as control file and online redo log copies, archived
redo log files, flashback logs, and RMpN backups.
± Media manager (Optional) - an application required for RMpN to interface
with sequential media devices such as tape libraries. p media manager
controls these devices during backup and recovery, managing the loading,
labeling, and unloading of media.
± Recovery catalog (Optional) - p separate database schema used to record
RMpN activity against one or more target databases. p recovery catalog
preserves RMpN repository metadata if the control file is lost, making it much
easier to restore and recover following the loss of the control file.
% .
‡ /  0 '
1.
± Requires downtime
± Full database only
± No PiTR
‡ 2 0 '
1.
± No required downtime
± Types: full, incremental, or archivelog
± Granularity: database, tablespace or datafile
± Granularity applies to recovery options as well as the capability to recover
corrupted blocks
± pny PiTR capable with the proper data protection plan
"$.
‡ —3
± p full backup that happens to be the parent of incremental backups whose
level is greater than 0
± If no level 0 backup is available and compatibility is >=10.0.0, RMpN copies
all blocks that have been changed since the file was created. Otherwise,
RMpN behaves as it did in previous releases, by generating a level 0 backup.
‡ —
± Differential (default) - RMpN backs up all blocks that have changed since the
most recent incremental backup at level 1 (cumulative or differential) or level
0
± Cumulative - RMpN backs up all blocks used since the most recent level 0
incremental backup in either the current or parent incarnation
‡  ./ %.

± Improves incremental backup performance by recording changed blocks in
each datafile in a block change tracking file.
± RMpN tracks changed blocks as redo is generated.
± pvoids the need to scan every block in the datafile.
± Only uses block change tracking when the incremental level is greater than 0
!


/$


()$
‡ / 
 -
± $ rman target /
± $ rman
RMAN> connect target /
± $ rman target / log /backup/db.log append
± RMAN> exit
‡ / 

-
± RMAN> show all;
± RMAN> configure retention policy to recovery window of 14
days;
‡ /  .-
± RMAN> shutdown immediate;
RMAN> startup mount;
RMAN> backup as copy;
RMAN> alter database open;
‡ 2 .-
± RMAN> backup database plus archivelog;
( 

$,

  | 
  | 
‡ !
*/ 
$
± Multiple backup devices
‡ Tape or ˜ 
‡ Local disk or ! ˜
± Multiple channels
‡ Each channel is a writing head
‡ Can have different devices on each channel
± Parallelism
‡ putomatic channel allocation
‡ !

± Creates a duplicate database from backups
± Exclude tablespaces and rename the database
‡ /
± ?   option (default)
‡ ses the target database controlfile for storing recovery metadata
‡ Simple backup and recovery for a single database
±   option
‡ Centralized recovery metadata repository via a Recovery Catalog
‡ Simple to complex backup and recovery for multiple databases on multiple servers
  | 
 jACKUP AS COPY  RECOVER COPY
± Incremental backup rolls forward recovery area backup
‡ No need to do full backups
‡ ›  › 
   ? 
± Easy instantaneous restore:
‡ 
 
 
‡ ›  ›
 

Database (s) ppply FRp


Nightly (backup prchive
Incremental destination) (OSB)
  *
 

| 

| 47

‡ |%4
± ˜  and

 
± Extremely fast recovery times
± Relatively simple strategy
± Requires 2x of database size
‡ |4
± Multi-level with archivelogs backups
± Compression is an option
± Somewhat complex strategy
± Slower recovery times
‡ |%45|4
± Hybrid using  , ˜ , and  
 
± Best of breed
± Complex strategy
± Obviously cost is not an issue 

| 
—

—2/6
|%4()$0"

1
allocate channel for maintenance type disk;
crosscheck backupset;
crosscheck archivelog all;
run
{
allocate channel bc_1
type disk
maxpiecesize 32G
format='/backup/rman/testdb/%d_%U.bak';
...
allocate channel bc_12
type disk
maxpiecesize 32G
format='/backup/rman/testdb/%d_%U.bak';
backup
as copy
tag = Full
database;
backup current controlfile
tag = CtlFile;
release channel bc_1;
...
release channel bc_12;
delete noprompt obsolete redundancy = 2;
}
|%4()$0#1
allocate channel for maintenance type disk;
crosscheck backupset;
crosscheck archivelog all;
run
{
allocate channel bc_1
type disk
maxpiecesize 32G
format='/backup/rman/testdb/%d_%U.bak';
...
allocate channel bc_12
type disk
maxpiecesize 32G
format='/backup/rman/testdb/%d_%U.bak';
backup
incremental level 1
for recovery of copy
with tag level_1
database;
recover
copy of database
with tag level_1;
backup current controlfile
tag = CtlFile;
release channel bc_1;
...
release channel bc_12;
delete noprompt obsolete redundancy = 2;
}
|4()$0—31
allocate channel for maintenance type disk;
crosscheck backupset;
crosscheck archivelog all;
run
{
allocate channel bc_1
type disk
maxpiecesize 32G
format='/backup/rman/testdb/10_04_01/%d_%U.bak';
...
allocate channel bc_12
type disk
maxpiecesize 32G
format='/backup/rman/testdb/10_04_01/%d_%U.bak';
backup
as compressed backupset
incremental level 0
tag = Level_0
database
plus archivelog delete input;
backup current controlfile
tag = CtlFile;
release channel bc_1;
...
release channel bc_12;
delete noprompt obsolete redundancy = 2;
}
|4()$0—1
allocate channel for maintenance type disk;
crosscheck backupset;
crosscheck archivelog all;
run
{
allocate channel bc_1
type disk
maxpiecesize 32G
format='/backup/rman/testdb/10_04_01/%d_%U.bak';
...
allocate channel bc_12
type disk
maxpiecesize 32G
format='/backup/rman/testdb/10_04_01/%d_%U.bak';
backup
as compressed backupset
incremental level 1
tag = Level_1
database
plus archivelog delete input;
release channel bc_1;
...
release channel bc_12;
delete noprompt obsolete redundancy = 2;
}

"    $
$8

| 

| 

‡ %  ..

± To detect corrupt blocks as early as possible
±  ›  
 

 ›   


‡ %  ..

± To reduce the amount of time required for incremental backups
±  ›   
  ›

 
‡ !)    $$
± Mitigate risk of lost or corruption of redo/archive logs
±  ›  
 ›
  
›
   
±  ›  
   ›

 ›   › 
‡ &check logical $
± Cause RMpN to check for logical corruption
± 
 

 
| 

‡ % .
± The lazy way, but ³Your backup is only as good as your last restore´
± › › 
  
‡ !
.

± Speed partial restores, as it does not need to read the entire piece
± 
 
  › 
‡ 

  9  

± Control your control file size and retention policy
±  ›  ›
 › ›


  
±      
± › 


±     
› 

‡ .   

± It is pretty tough to restore with a controlefile
± 
› ›
  

± 
 ›› ›
 
| 

‡ %  
± Can avoid multiple restore to get it right during an outage
± ›  ›  
‡ 
delete all input
±    
  will backup from one location and delete what has been
backed up.
$  *. :)

 || 

‡  $
 .|

± pllows corrupt blocks on the primary database to be automatically repaired
from physical standby database, as they are detected.
± In-line and transparent. ser sees brief wait from query on corrupt block
while it is being repaired.
± Requires pctive Data Guard (real-time query on physical standby database).
± Can also be performed on-demand via RECOVER command
‡ 
/ $

± Levels & throughput
‡ ùjASIC] | HIGH | MEDIUM | LOW
‡   ± reduces backup size by 40%+ depending on data type
‡  ± least impact on backup throughput
‡ Y
! Y ± best balance between compression and throughput
‡  Y
! Y require pdvanced Compression Option
± Popular way to save on storage costs
‡ ( DUPLICATE
± Connection to source database not needed for environments where network
connection is not available

‡ .| 
. 

± Protect Fast Recovery prea with on-disk backup of its RMpN backups,
archived logs, and controlfiles
‡ ()   
'
'
$ 0%"%|1



± Recover a dropped tablespace
± Perform multiple tablespace point-in-time recoveries, without requiring
recovery catalog
‡ |$ DUPLICATE
± DPLICpTE can resume processing from most points of failure, reducing
overall time
 CONVERT DATAjASE .
   

± Reduces overall conversion time by only processing the required NDO-
containing data files
 SET NEWNAME FOR TAjLESPACE | DATAjASE
± Simplifies renaming of datafiles for
˜