Skip to content
DBAExperts
Oracle Backups & recovery

How to restore and recover an Oracle database with RMAN

Restoring copies the datafiles back from the backup; recovering applies the redo logs to bring the database up to date. The two steps are different and both are necessary.

  1. 1

    Start the instance in mount mode

    To restore datafiles the database must be mounted but not open.

    RMAN> STARTUP MOUNT;
  2. 2

    Restore the database

    RMAN copies the datafiles back from the most recent available backup.

    RMAN> RESTORE DATABASE;
  3. 3

    Recover by applying archivelogs

    Apply the archived redo logs to bring the database to a consistent state.

    RMAN> RECOVER DATABASE;
  4. 4

    Open the database

    If you recovered to the latest available point, open normally. After incomplete recovery you need RESETLOGS.

    RMAN> ALTER DATABASE OPEN;
    -- Incomplete recovery:
    RMAN> ALTER DATABASE OPEN RESETLOGS;
  5. 5

    Point-in-time recovery (optional)

    If you need to roll back to before a human error, set the target moment before restoring.

    RMAN> RUN {
      SET UNTIL TIME "TO_DATE('2026-07-04 09:00:00','YYYY-MM-DD HH24:MI:SS')";
      RESTORE DATABASE;
      RECOVER DATABASE;
    }
    RMAN> ALTER DATABASE OPEN RESETLOGS;

// common mistake

OPEN RESETLOGS invalidates prior backups and creates a new incarnation. Take a full backup immediately afterward.

// when it's worth an expert

A production recovery under pressure is not the moment to improvise. At dba.mx we handle recoveries and rehearse the procedure before you ever need it, at a fixed price.

Book an assessment — from USD $550

This guide is for reference and uses example commands. In production, adapt to your version and test in a safe environment first.