Why we need backup
The primary purpose of taking backups is to protect the database from data loss and ensure the ability to reconstruct the database in case of corruption, errors, or failures.
Categories of Database Failure:
Data loss can occur at any time
Human errors, accidental deletions, logical corruption, hardware failures, or storage issues can lead to partial or complete data loss.
Backups preserve data integrity
When data corruption or inconsistencies arise, backups enable you to restore the database to a consistent and trustworthy state.
Support for disaster recovery
In the event of serious failures—like server crashes, media corruption, or site outages—backups are the foundation for bringing the database back online.
Compliance and business continuity
Many industries require proper backup policies to meet audit standards and ensure uninterrupted business operations.
Backup Types:
Oracle backups are broadly classified into two categories:
1. Logical Backups
Logical backups extract database objects in a logical format.
Examples: Table-level, Schema-level and Tablespace-level export
Tools Used: Data Pump (expdp / impdp) and Export/Import (exp / imp)
Logical backups are mainly used for:
Application-level migrations
Object-level recoveries
Copying data between databases
2. Physical Backups
Physical backups involve copying actual database files at the OS level.
Files Included Datafiles, Control files, SPFILE and Archived redo logs
Types of Physical Backups
RMAN Backups (most recommended)
Hot Backup (User‑Managed Online Backup)
Cold Backup (User‑Managed Offline Backup)
Hot and Cold Backups
Hot and Cold backups are known as manual backups, as they are performed manually without using RMAN or any backup tool.
Cold Backup (Consistent Backup)
Database is shut down.
All database files are copied at OS level.
Backup is consistent.
No recovery required during restore.
Also referred to as a consistent backup.
Hot Backup (Inconsistent Backup)
Database is open and available to users.
Tablespaces are placed in backup mode.
Datafiles are copied manually at OS level.
Recovery is required because the backup is inconsistent.
Archived logs are needed for full recovery.
Backup States / Backup Types in Oracle
Oracle backups fall under two main categories based on the state of the database:
1) Consistent Backup
A backup is consistent when: The database is shut down cleanly using SHUTDOWN IMMEDIATE / NORMAL / TRANSACTIONAL.
All files (datafiles, control files, redo logs) are synchronized.
2) Inconsistent Backup
A backup is inconsistent when the database is in OPEN or MOUNT mode during the backup.
Files are not synchronized; hence recovery is mandatory.
Examples
Hot Backup (User‑managed online backup)
RMAN Backups (always inconsistent unless database is closed)
Oracle RMAN (Recovery Manager)
Oracle Recovery Manager (RMAN) is a powerful, built‑in Oracle database utility used for performing backup, restore, and recovery operations. It is a no‑cost, command‑line tool provided by Oracle to help DBAs protect critical database files—including datafiles, control files, SPFILEs, and archived redo logs.
RMAN integrates tightly with the Oracle database engine, enabling advanced features such as:
Block‑level corruption detection
RMAN scans blocks during backup and restore operations, identifying corrupted blocks early and ensuring data integrity.
Automated backup retention policies
You can define retention periods or redundancy levels, and RMAN will automatically manage obsolete backups.
Backup compression
Built‑in compression reduces storage costs and speeds up backup operations.
Parallelization
File identification
Block recovery
Media recovery
RMAN can run backup and restore operations across multiple channels, improving performance and meeting high‑availability needs.
What to Backup
Parameter file / SPfile , Control file , archive log files and data files
What file needed in different stages of database
1) Shutdown - Nothing needed
2) No Mount - Pfile or SPfile
3) Mount - Control file
4) Open - Data and redo log files
Recovery:
1. Complete Recovery
--- Recovering the database exactly till the point of failure
2. Incomplete Recovery
--- It cannot recover the database till the point of failure
--- You can recover the database till the time you had taken the backup