Databases 15 min read

Step-by-Step Oracle RMAN Disaster Recovery: Backup, Restore, and Validation

This guide walks through simulating a catastrophic Oracle database failure, performing incremental RMAN backups, verifying backup completeness, and executing a full restore and recovery—including spfile, controlfile, datafiles, and archived logs—so you can confidently recover a database after total data loss.

ITPUB
ITPUB
ITPUB
Step-by-Step Oracle RMAN Disaster Recovery: Backup, Restore, and Validation

Background

In a catastrophic scenario, disk failures or other issues can cause all database files to be lost or corrupted, requiring restoration from backups. The article demonstrates a complete loss simulation and subsequent recovery using Oracle RMAN.

Environment

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 (64‑bit) with PL/SQL 11.2.0.3.0. Relevant components include CORE, TNS, and NLSRTL.

Backup Procedure

CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/u01/backup/%F_%d_controlfile.bkp';

Allocate backup channels:

allocate channel dev type disk;
allocate channel dev2 type disk;

Run incremental level‑0 backup with archivelog:

backup incremental level 0 database plus archivelog delete input
tag 'sydb_incr_level0'
format '/u01/backup/%d_%s_%U';

Release channels:

release channel dev;
release channel dev2;

The RMAN log shows each step, the files backed up, and the timestamps.

Verification of Recoverability

After the backup, the article removes all datafiles, control files, redo logs, and the spfile to mimic total loss, then proceeds to restore them.

Restore Process

Restore the spfile:

restore spfile from '/u01/backup/c-3634177744-20150529-00_control.bkp';

Restore the control file:

restore controlfile from '/u01/backup/c-3634177744-20150529-00_control.bkp';

Mount the database: alter database mount; Use list backup of database; and list backup of archivelog all; to verify which files and logs are available.

Recovery

Determine the highest archived‑log sequence (20) and recover up to sequence 21:

restore database until sequence 21;
recover database until sequence 21;

RMAN restores each datafile and the necessary archived logs, then completes media recovery.

Open Database with RESETLOGS

Finally, open the database using resetlogs: alter database open resetlogs; The log shows successful opening and the elapsed time.

Conclusion

Database restoration and recovery vary with environment and errors; thorough documentation reading, understanding the underlying mechanisms, and repeated hands‑on experiments are essential for reliable disaster recovery.

SQLBackupOracleDatabase RecoveryRestoreRMAN
ITPUB
Written by

ITPUB

Official ITPUB account sharing technical insights, community news, and exciting events.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.