-
Restore vs. Recover: How RMAN Brings a Database Back
-
Before You Restore: Preview and Validate Your Backups
-
Steps to Restore Oracle Database from RMAN Backup
-
Common RMAN Restore Errors and Fixes
-
How to Backup and Restore Oracle Database Easily?
-
Restore Oracle databases from RMAN FAQs
-
Final Thoughts
Oracle Recovery Manager (RMAN) is Oracle's built-in tool for backing up and restoring databases. When datafiles are lost, a control file is damaged, or someone makes a change that must be undone, RMAN can bring the database back using your existing backups and archived redo logs. If you haven't set up backups yet, start with our Oracle RMAN backup step-by-step guide.
Quick answer: To restore an Oracle database with RMAN, start the instance in MOUNT mode, then run RESTORE DATABASE; to copy the datafiles back from backup and RECOVER DATABASE; to apply archived redo logs, and finally ALTER DATABASE OPEN;. If you also had to restore the control file, open the database with ALTER DATABASE OPEN RESETLOGS; instead.
Restore vs. Recover: How RMAN Brings a Database Back
An RMAN restore always has two parts:
Restore copies files, such as datafiles, the control file, the SPFILE or archived logs, from backup back to disk. The restored files reflect the time the backup was taken.
Recover applies archived and online redo logs to the restored files, bringing them forward to the latest committed transaction or to a point in time you choose.
What you need to run depends on what was lost:
| What was lost or damaged | Database state | Main commands | Open with |
|---|---|---|---|
| Some datafiles or one tablespace | Open or mounted | RESTORE DATAFILE / RESTORE TABLESPACE, then RECOVER | Bring files online |
| All datafiles, control file intact | MOUNT | RESTORE DATABASE; RECOVER DATABASE; | OPEN |
| Control file (all copies) | NOMOUNT | RESTORE CONTROLFILE FROM AUTOBACKUP; then a full restore | OPEN RESETLOGS |
| SPFILE and control file | NOMOUNT | SET DBID, RESTORE SPFILE, RESTORE CONTROLFILE, full restore | OPEN RESETLOGS |
| Need to undo a bad change | MOUNT | SET UNTIL TIME/SCN, RESTORE DATABASE; RECOVER DATABASE; | OPEN RESETLOGS |
Before You Restore: Preview and Validate Your Backups
Check that the backups you need exist and are readable before you start, so a restore doesn’t fail halfway through.
Connect to RMAN:
rman target /
If you use a recovery catalog, connect to it as well: rman target / catalog rcat_user@catdb.
List the backup pieces RMAN would use, without restoring anything:
RMAN> RESTORE DATABASE PREVIEW; RMAN> RESTORE DATABASE PREVIEW SUMMARY;
Read the backups end to end to check for corruption, again without writing any files:
RMAN> RESTORE DATABASE VALIDATE;
To check one backup set, use VALIDATE BACKUPSET <key>; with the key shown by LIST BACKUP. If your backups are password-encrypted, give the password first with SET DECRYPTION IDENTIFIED BY 'password';. For TDE-encrypted backups, make sure the keystore (wallet) is available and open. Also confirm that there is enough free disk space for the restored files.
Steps to Restore Oracle Database from RMAN Backup
Full Database Restore
Use this when most or all datafiles are lost, for example after a disk or server failure. Skip steps 2 and 3 if your SPFILE and control file are intact.
1. Start the instance in NOMOUNT mode
RMAN> STARTUP NOMOUNT;
If the SPFILE is missing, RMAN starts the instance with a temporary default parameter file, which is enough to restore the SPFILE.
2. Restore the SPFILE (if lost)
Set the DBID first. You can find it in old RMAN output or in the autobackup file name, after c-.
RMAN> SET DBID 1234567890; RMAN> RESTORE SPFILE FROM AUTOBACKUP; RMAN> STARTUP FORCE NOMOUNT;
3. Restore the control file (if all copies are lost)
RMAN> RESTORE CONTROLFILE FROM AUTOBACKUP;
To restore from a specific backup piece instead, use RESTORE CONTROLFILE FROM '/backup/rman/ctl_backup.bkp';. For more scenarios, see how to back up and restore the Oracle control file with RMAN.
4. Mount the database
RMAN> ALTER DATABASE MOUNT;
If your control file is intact, start here with STARTUP MOUNT;.
5. Restore the datafiles
RMAN> RESTORE DATABASE;
If the original directories no longer exist, restore the files to new paths:
RUN {
SET NEWNAME FOR DATAFILE 1 TO '/u02/oradata/ORCL/system01.dbf';
SET NEWNAME FOR DATAFILE 2 TO '/u02/oradata/ORCL/sysaux01.dbf';
RESTORE DATABASE;
SWITCH DATAFILE ALL;
}6. Recover the database
RMAN> RECOVER DATABASE;
RMAN applies the archived redo logs it needs, restoring them from backup automatically if they are no longer on disk.
7. Open the database
If you restored the control file, or recovered to a point before the latest log, open with RESETLOGS:
RMAN> ALTER DATABASE OPEN RESETLOGS;
Otherwise, open normally with ALTER DATABASE OPEN;. After a RESETLOGS open, take a new full backup right away, because older backups belong to the previous incarnation of the database.
Restore a Tablespace or Datafile
If only part of the database is damaged, restore just that part while the rest stays open.
Tablespace:
RMAN> ALTER TABLESPACE users OFFLINE IMMEDIATE; RMAN> RESTORE TABLESPACE users; RMAN> RECOVER TABLESPACE users; RMAN> ALTER TABLESPACE users ONLINE;
Datafile:
RMAN> ALTER DATABASE DATAFILE 5 OFFLINE; RMAN> RESTORE DATAFILE 5; RMAN> RECOVER DATAFILE 5; RMAN> ALTER DATABASE DATAFILE 5 ONLINE;
The SYSTEM and UNDO tablespaces can’t be taken offline while the database is open. To restore them, mount the database first. Before Oracle 12c, run the ALTER statements in SQL*Plus instead of RMAN.
Restore Archived Redo Logs
RMAN restores the archived logs it needs during RECOVER, but you can also restore them yourself, for example to analyze them or to send them to a standby database:
RMAN> RESTORE ARCHIVELOG ALL; RMAN> RESTORE ARCHIVELOG FROM SEQUENCE 100 UNTIL SEQUENCE 200;
To restore them to a different directory:
RUN {
SET ARCHIVELOG DESTINATION TO '/u03/restored_arch';
RESTORE ARCHIVELOG FROM SEQUENCE 100 UNTIL SEQUENCE 200;
}Replace the SET UNTIL TIME line with SET UNTIL SCN 1234567; or SET UNTIL RESTORE POINT before_upgrade; if you know the SCN or created a restore point. Make sure the archived logs up to the target time are available.
Point-in-time recovery rolls back the whole database, so every change made after the target time is lost. To recover a single table instead, use RECOVER TABLE (see the FAQ below), and for one tablespace use tablespace point-in-time recovery (TSPITR).
Point-in-Time Recovery with RMAN
When data was damaged by a logical error, such as a dropped table or a bad batch job, recover the database to the moment just before it happened. You can stop recovery at a time, an SCN or a named restore point.
RMAN> STARTUP FORCE MOUNT;
RUN {
SET UNTIL TIME "TO_DATE('2026-06-01 10:00:00', 'YYYY-MM-DD HH24:MI:SS')";
RESTORE DATABASE;
RECOVER DATABASE;
}
RMAN> ALTER DATABASE OPEN RESETLOGS;Common RMAN Restore Errors and Fixes
RMAN-06023: no backup or copy of datafile found to restore
RMAN can’t find a usable backup in its repository. Run LIST BACKUP OF DATABASE; to check what it knows about. If the backups were moved or copied from another host, register them with CATALOG START WITH '/backup/path/';. After a RESETLOGS open, also check that you are restoring from the right database incarnation with LIST INCARNATION;.
RMAN-06054: media recovery requesting unknown archived log
Recovery has applied all available logs and is asking for the next one. After a control file restore, this is expected: if no further logs exist, open the database with ALTER DATABASE OPEN RESETLOGS;. If logs are missing in the middle of the sequence, restore them from backup, or recover only up to the last available one with SET UNTIL SEQUENCE.
Backup pieces not found on disk
Files were deleted or moved outside RMAN. Run CROSSCHECK BACKUP; to mark missing pieces as expired, then catalog any pieces in their new location so RMAN can use other available backups.
How to Backup and Restore Oracle Database Easily?
RMAN backup is a popular Oracle database backup solution but it sitll not a very professional solution because it is complicated to execute backup and restore jobs and can't meet higher data protection requirements so you can choose a professional solution to replace it.
Vinchin Backup & Recovery is a versatile data solution that supports backup and recovery for 19+ virtualization platforms and for Oracle, MySQL, SQL Server, MariaDB, PostgreSQL, PostgresPro and TiDB databases with automated and simplified procedures, smart strategies, user-friendly management, and anti-ransomware backup protection.
To backup the Oracle databases, you just need 4 steps to create the a backup job:
1. Select the databases you need to backup

2. Select the backup storage

3. Select the backup strategies which is plainly described

4. Submit the job

When you need to restore Oracle database, you can also create a recovery job in 4 steps via the wirzard. There are two modes for database restoration, Override Original Database that restores data to the production server and Create New Database.
In addition to the database protection, the solution also delivers advanced and compatible VM backup and recovery services for users, such as 15s instant recovery, cross-platform V2V migration across 19+ virtualization platforms, data archiving, and more waiting for you to explore in the 60-day free trial below.
Restore Oracle databases from RMAN FAQs
Restore Oracle databases from RMAN FAQs
1. Can I restore a single table from an RMAN backup?
Yes, in Oracle Database 12c and later. RMAN restores the needed tablespaces into a temporary auxiliary instance and imports the table back:
RECOVER TABLE hr.employees UNTIL TIME "TO_DATE('2026-06-01 10:00:00','YYYY-MM-DD HH24:MI:SS')"
AUXILIARY DESTINATION '/u03/aux'
REMAP TABLE hr.employees:employees_restored;You need backups of the SYSTEM, SYSAUX and UNDO tablespaces and of the tablespace that holds the table. See the Oracle documentation for details.
2. What is the difference between restore and recover in RMAN?
RESTORE copies files back from backup, and they reflect the time of the backup. RECOVER then applies redo from archived and online redo logs to bring those files forward to a consistent, more recent state.
3. Can I perform point-in-time recovery with RMAN?
Yes. Use SET UNTIL TIME, SET UNTIL SCN or SET UNTIL RESTORE POINT before RESTORE DATABASE and RECOVER DATABASE, then open with RESETLOGS, as shown above.
4. Can I restore an RMAN backup without shutting down the database?
For a single datafile or a non-system tablespace, yes: take it offline, restore and recover it, then bring it online while the rest of the database stays open. A full database restore requires the database to be mounted, not open.
5. What should I do after opening the database with RESETLOGS?
Take a new full backup immediately. RESETLOGS starts a new incarnation of the database, so you can’t easily use older backups to recover past this point.
Final Thoughts
RMAN can restore anything from a single datafile to a complete database on a new server, and recover it to the latest transaction or to a chosen point in time. The key is to preview and validate your backups before you need them, and to know which steps your situation requires.
If you’d rather not run these commands under pressure, Vinchin Backup & Recovery automates Oracle backup and restore from one web console. Try it free for 60 days.
Share on: