4. 4
A P R O C E D U R E F O R M A K I N G E X T R A C O P I E S
O F D A T A F O R T H E P U R P O S E O F
R E S T O R A T I O N I N C A S E O F L O S S D A M A G E .
BACKUP
5. BACKUP TERMINOLOGY
• Hot Backup
• Cold Backup
• Full Backup
• Incremental Backup
• Differential Backup
• Backup Window
• Backup Job
• On-line
• Off-line
• Off-Site
• Data Compression
• Data Deduplication
• Data Encryption
5
6. TYPES OF BACKUP
• A full backup (level 0) is a complete copy of a
partition.
• An incremental backup (level 1) is an archive of only
the files that have changed since the last full
backup.
• A differential backup (level 2, 3, etc) is an archive of
only the file that have changed since the last
backup (not necessarily full backup.
6
Backup Sun (F) Mon Tue Wed Thu Fri Sat
Full 2TB 2TB 2TB 2TB 2TB 2TB 2TB
Incr. 2TB 1GB 1.2GB 1.6GB 1.9GB 2.3GB 2.8GB
Diff 2TB 1GB 0.2GB 0.4GB 0.3GB 0.4GB 0.5GB
7. SHORT-SIGHTED BACKUPS – WHY?
• Why are each of these a bad backup strategy?
Advantages / Disadvantages?
Only taking Cold, Full Backups
One Full Offsite backup
Just hot backups
Full backups monthly, differentials daily.
7
8. LET’S TALK STRATEGY
• Ideally we’d like to backup everything all the time
and keep it around forever.
• Realistically, we cannot do that.
• You need a combination of short-term and long-
term strategies. For example:
• At least 3 copies of the data, 1 off site.
• Hot backups for convince, cold backups for insurance D/R.
• Test your restore process, at multiple levels.
• Others?
8
9. DATABASE BACKUP AND RECOVERY
• Important database administration support tasks
include:
• Backup
• Offline/cold
• Online/hot
• Recovery
• Restore Entire tablespaces
• Build test / dev environments from restores
• Recover missing / erroneous data in tables.
9
10. CREATING OFFLINE (COLD) BACKUPS
1. Shut down database instance
2. Copy specific database files to alternate disk
location
1. Parameter file
2. Control files
3. Datafiles
4. Not redo logs
3. Restart database instance
10
11. CREATING ONLINE (HOT) BACKUPS
1. Place database instance in ARCHIVELOG
mode
2. Back up control file
3. Back up datafiles
4. Instruct database to write current contents of
redo log files to archive files
- Create backup copies of archive log files
11
12. DATABASE RECOVERY
• Process of restoring database from either cold or
hot backup files
• Necessary after database failure
• Cold backup recovery:
• Shut down database
• Restore backed up control file and datafiles to
database server
• Restart database
12
13. DATABASE RECOVERY (CONTINUED)
• Hot backup recovery:
• Recover database to point at which last hot backup
created
• Use control trace file to generate new copy of control
file
• Restore backup copies of datafiles
• Perform media recovery
13
14. DEMO – START AND STOP ORACLE
• Let’s use OEM to start and stop your Oracle
instance, then create a cold backup
14
15. ORACLE BACKUP STRATEGIES
• Cold backups
• Simplest to perform
• Satisfactory for databases whose:
• Contents do not change very much
• Users can tolerate downtime while DBA creates cold
backup files
• Hot backups
• Complex to perform
• Better suited for dynamic, mission-critical databases
• If you setup a clustered environment you can
perform cold backups without loss of service.
15