1. Oracle Database
Backup & Recovery with RMAN
Internet & Network Security
Abid Hussain
Syed Muhammad Mohsin
2. Agenda
Types of failures and backups in Oracle
RMAN Architecture
Manual vs. RMAN backups
RMAN backup strategies
Exemplary recovery scanarios
3. Types of failures
Instance Failure
Usually connected with an Oracle process failure
Media Failure
Disk failure, storage array controller failure etc.
Block Corruption
Usually caused by bugs in Oracle software
Human error
In most cases accidentally deleted/updated data
Database user or DBA
Disaster
Fire, flood, earthquake, plane crash etc.
4. Backup options in Oracle
Physical backups
Cold (off-line) backups
Full database only
Require downtime
Do not provide flexibility for point in time recovery (PiTR)
Hot (on-line) backups
Different types of backups: full, incr. (cumulative, differential), archivelogs
Different scopes: full database, tablespace(s) or datafile(s)
Do not require database downtime
Can be used to recover full database, single/multiple
tablespace(s)/datafile(s) or a corrupted block
Database can be recovered to any point in time within assumed backup
retention period
5. Backup options in Oracle (2)
Logical backups
Logical copy of data in the database
Support for different backup granularity
Can be taken either with legacy Export/Import tools or
with Data Pump (10g)
Standby systems (Data Guard)
Physical and logical standby databases
6. How hot backups are possible?
SGA
Serverproc.
DBWR LGWR
RedoLog
RedoLog
Db file
Db file
Db file
Db file
Logarchiver
Archived redo logs
Backupproc.
Tapes
or
disks
system
8. Types of RMAN hot backups
Copy or backupset
Full database backup
Incremental backups (in 10g 2 levels available: 0 and 1)
Cumulative, differential
Can be used to update a copy of the database
Archivelog backups
Tablespace(s), datafile(s) backups
Differential incremental Cumulative incremental
9. Manual vs. RMAN backups
RMAN advantages:
Supports incremental backup strategies
RMAN on-line backups are not so heavy for the system as manual
on-line backups
RMAN can detect corrupted blocks
RMAN automatically track database structure changes
Provides easy, automated backup, restore and recovery operations
Keeps invenotory of taken backups
Can seamlessly work with third party media managers
Disadvantage: something new to learn
RMAN concepts and command syntax sometimes are not intuitive
10. RMAN backup strategies
RMAN allows many types of backups
It possible to build own backup strategy that suits
given database best
There are also Oracle recommended backup
strategies:
Incremental backup strategy: level 0 backups + level 1
backups (cumulative and/or differential) and archivelog
backups inbetween.
Incrementally updated database copy: 1 backup as
copy of the whole database + incremental backups
used to update the copy + archived redo logs.
11. • Automatic failover
– Database down
– Designated health-check
conditions
– Or at request of an
application
• Failed primary
automatically reinstated as
standby database
• All other standby’s
automatically synchronize
with the new primary
Primary
Database
Observer
Primary
Database
Primary
Database
Standby
Database
Data Guard Fast-Start Failover
12. Role
specific
database
services start
automatically
2
Standby
Database
Database Tier- Oracle
Real Application Clusters
Application Tier - Oracle
Application Server Clusters
Database
Services
Primary
Database
Primary Database
Standby
becomes
primary
database
Data Guard
Automatic
Failover
1
FAN breaks clients out
of TCP timeout.
TAF/FCF automatically
reconnects applications
to new primary
3
Standby Database
Data Guard Automatic Failover
13. Real-time
Queries
Production
Database
Continuous redo
shipping, validation & apply
Real-time
Reporting
Fast
Incremental
Backups
•Offload read-only queries to an up-to-date physical standby
Real-time
Reporting
Active Standby
Database
Read-write
Workload
Active Data Guard
•Use fast incremental backups on a physical standby – up to 20x faster