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)
No comments:
Post a Comment