How to Take Oracle Database Backup Step by Step with RMAN

RMAN is Oracle’s built-in tool for backing up and recovering databases. This step-by-step guide shows how to prepare your database, configure RMAN, run full and incremental backups, verify and automate them, and restore when you need to.

Free Download
for VM, OS, DB, File, NAS, etc.
iris-lee

Updated by Iris Lee on 2026/11/12

Table of contents
  • Oracle Backup Solutions

  • RMAN Backup Types

  • How to Back up Oracle Database Using RMAN?

  • Incrementally Updated Backups

  • How to Restore an Oracle Database from an RMAN Backup

  • Vinchin Automatic Oracle Database Backup

  • Oracle RMAN backup FAQs

  • Conclusion


Oracle Database is one of the most widely used relational databases in the world, and the data it holds is often critical to the business. Oracle Recovery Manager (RMAN) is included with every Oracle Database installation and is the recommended way to back it up. RMAN understands the database’s internal structure, so it can back up a running database consistently, skip unused blocks, detect corruption, and keep track of every backup it makes.

Quick answer: To back up an Oracle database with RMAN, make sure the database runs in ARCHIVELOG mode, connect with rman target /, turn on control file autobackup with CONFIGURE CONTROLFILE AUTOBACKUP ON;, then run BACKUP DATABASE PLUS ARCHIVELOG;. Check the result with LIST BACKUP SUMMARY;, and confirm the backup can be restored with RESTORE DATABASE VALIDATE;

Oracle Backup Solutions

There are two main ways to back up an Oracle database:

1. Oracle Recovery Manager (RMAN): a utility built into Oracle Database that performs backup, restore and recovery.

2. User-managed backup: copying database files with operating system commands, after putting the database in backup mode with SQL*Plus.

RMAN is the better choice in almost every case. It works the same way on every operating system, records every backup in the control file, backs up only used blocks, checks blocks for corruption, and supports incremental backups. This guide focuses on RMAN.

RMAN can’t back up some files outside the database, such as the password file, network configuration files (tnsnames.ora, listener.ora) and the Oracle home, so protect those with a regular file backup.

RMAN Backup Types

RMAN can create several types of backups:

TypeWhat it containsNotes
Full backupAll used blocks of the selected filesCan’t be the base for incremental backups
Incremental level 0All used blocks, like a full backupThe base for later level 1 backups
Differential incremental level 1 (default)Blocks changed since the most recent level 0 or level 1 backupSmallest backups; a restore applies every level 1 in the chain
Cumulative incremental level 1Blocks changed since the most recent level 0 backupLarger backups; a restore needs only level 0 plus the latest cumulative
Archived log backupArchived redo logsNeeded for point-in-time recovery

RMAN writes backups either as backup sets, its own compact format that skips unused blocks and supports compression, or as image copies, exact copies of the datafiles. Backup sets are the usual choice.

Before You Start: Check ARCHIVELOG Mode

To back up a database while it stays open, and to recover it to any point in time, the database must run in ARCHIVELOG mode. In SQL*Plus, connected as SYSDBA, check the mode:

SQL> ARCHIVE LOG LIST;

If it shows “No Archive Mode”, enabling it requires a short restart:

SQL> SHUTDOWN IMMEDIATE;
SQL> STARTUP MOUNT;
SQL> ALTER DATABASE ARCHIVELOG;
SQL> ALTER DATABASE OPEN;

In NOARCHIVELOG mode, you can only take a consistent backup with the database cleanly shut down and mounted, and you can only restore it to the moment of that backup.

Also make sure the backup destination has enough free space, and that you can connect with the SYSDBA or SYSBACKUP privilege.

How to Back up Oracle Database Using RMAN?

1. Start RMAN and connect to the database.

On the database server, connect with OS authentication:

rman target /

To connect over the network instead, use rman target sys@ORCL and enter the password when prompted.

2. Review and set the RMAN configuration.

Show the current settings:

RMAN> SHOW ALL;

Then set the most important ones. These settings are saved and apply to every later backup:

RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON;
RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/u01/backup/%d_%U';
RMAN> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
RMAN> CONFIGURE DEVICE TYPE DISK PARALLELISM 2;
  • Control file autobackup backs up the control file and SPFILE after every backup, so you can restore the database even if the control file is lost. Don’t skip it.

  • %U generates a unique name for each backup piece, and %d adds the database name. Make sure the directory exists and the oracle user can write to it.

  • The retention policy decides which backups RMAN treats as obsolete.

  • To compress all backups by default, add CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET;.

To reset a setting to its default, run the same command with CLEAR, for example CONFIGURE RETENTION POLICY CLEAR;.

3. Run a full backup.

Back up the database and archived logs together, so the backup can be recovered to any point in time:

RMAN> BACKUP DATABASE PLUS ARCHIVELOG;

To delete archived logs from disk once they are backed up, add DELETE INPUT:

RMAN> BACKUP DATABASE PLUS ARCHIVELOG DELETE INPUT;

4. Run incremental backups.

A common schedule is a weekly level 0 backup and a daily level 1 backup:

RMAN> BACKUP INCREMENTAL LEVEL 0 DATABASE PLUS ARCHIVELOG TAG 'WEEKLY_L0';
RMAN> BACKUP INCREMENTAL LEVEL 1 DATABASE PLUS ARCHIVELOG TAG 'DAILY_L1';

For a cumulative level 1 backup, use BACKUP INCREMENTAL LEVEL 1 CUMULATIVE DATABASE;.

On large databases, enable block change tracking so RMAN reads only changed blocks instead of scanning every datafile:

SQL> ALTER DATABASE ENABLE BLOCK CHANGE TRACKING USING FILE '/u01/oradata/ORCL/bct.chg';

5. Back up specific objects, with tags or compression.

RMAN> BACKUP TABLESPACE users;
RMAN> BACKUP DATAFILE 4;
RMAN> BACKUP ARCHIVELOG ALL;
RMAN> BACKUP AS COMPRESSED BACKUPSET DATABASE TAG 'WEEKLY_FULL';

Tags make backups easy to find later. For more on compression levels, see RMAN compressed backup.

6. Check and validate your backups.

RMAN> LIST BACKUP SUMMARY;
RMAN> REPORT NEED BACKUP;
RMAN> RESTORE DATABASE VALIDATE;

RESTORE DATABASE VALIDATE reads the backups and confirms they can be restored, without writing any files. To follow a running backup, query V$SESSION_LONGOPS from another session.

7. Automate the backup.

Save the commands in a script, for example /home/oracle/backup.rman:

BACKUP INCREMENTAL LEVEL 1 DATABASE PLUS ARCHIVELOG;
DELETE NOPROMPT OBSOLETE;

Then run it every night at 2:00 AM with cron:

0 2 * * * . /home/oracle/.bash_profile; rman target / @/home/oracle/backup.rman 
log=/home/oracle/logs/rman_$(date +\%F).log

DELETE OBSOLETE removes backups no longer needed under your retention policy. Check the log after each run. On Windows, use Task Scheduler with a batch file that calls the same RMAN command.

Incrementally Updated Backups

For faster recovery, you can keep an image copy of the database on disk and roll it forward every day with level 1 backups:

RMAN> RUN {
  RECOVER COPY OF DATABASE WITH TAG 'incr_update';
  BACKUP INCREMENTAL LEVEL 1 FOR RECOVER OF COPY WITH TAG 'incr_update' DATABASE;
}

On the first run, RMAN creates the image copy; from then on, each run applies the previous level 1 backup to the copy.

How to Restore an Oracle Database from an RMAN Backup

If the control file is intact and the database is down, a complete restore takes four commands:

RMAN> STARTUP MOUNT;
RMAN> RESTORE DATABASE;
RMAN> RECOVER DATABASE;
RMAN> ALTER DATABASE OPEN;

If the control file is also lost, restore it from the autobackup first:

RMAN> STARTUP NOMOUNT;
RMAN> RESTORE CONTROLFILE FROM AUTOBACKUP;
RMAN> ALTER DATABASE MOUNT;
RMAN> RESTORE DATABASE;
RMAN> RECOVER DATABASE;
RMAN> ALTER DATABASE OPEN RESETLOGS;

To recover to a point in time, for example just before a table was dropped:

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

For more restore scenarios, including restoring single tablespaces and recovering to another server, see how to restore an Oracle database from RMAN backups.

Vinchin Automatic Oracle Database Backup

Vinchin Backup & Recovery is a comprehensive and compatible virtual machine and database protection solution that supports the backup and recovery of Oracle, MySQL, SQL Server, MariaDB, Postgres Pro, and PostgreSQL . If you want backup software to run RMAN for you through the SBT interface, see how RMAN integration works and how to set it up.

Automatic Oracle DB Backup: Vinchin Backup & Recovery automates Oracle database backup with detailed schedules and email notifications that alert you when preset events occur, such as low storage space.

Smart and Flexible Backup Strategies: Choose full, incremental, differential and archived log backups by checking boxes instead of writing commands, and keep backups based on the number of restore points or days. You can also encrypt data in transit.

Saving Backup Storage: Reduce backup size with built-in compression and deduplication, and remove outdated backups automatically according to your retention policy.

Anti-Ransomware Backup Protection: The solution’s I/O monitor only allows Vinchin’s own processes to modify backup data and blocks any other suspicious access.

Advanced Oracle Support: Vinchin Backup & Recovery speeds up transfers with multi-threading and simplifies RAC backup with node authorization, all managed from one console.

Vinchin Backup & Recovery simplifies Oracle backup to 4 steps once the database is prepared:

1. Select the Oracle database

Select Oracle Database

2. Select the backup storage

Select backup storage

3. Select the backup strategiesSelect the backup strategies

4. Submit the job

Submit the job

You can download the 60-day free trial of the solution now below to explore it in your environment.

Oracle RMAN backup FAQs

1. Can you back up an Oracle database automatically with RMAN?

Yes. Save the RMAN commands in a script and schedule it with cron on Linux or Task Scheduler on Windows, or use Oracle Scheduler. Backup software can also schedule RMAN-based backups from a console without scripts.

2. Can you back up an Oracle database while it’s open?

Yes, if the database runs in ARCHIVELOG mode. Users can keep working during the backup. In NOARCHIVELOG mode, the database must be shut down cleanly and mounted.

3. Can you back up an Oracle database to tape with RMAN?

Yes. RMAN writes to tape through an SBT channel and a media management library supplied by Oracle Secure Backup or a third-party backup product.

4. Can you perform Oracle database point-in-time recovery with RMAN?

Yes. With archived logs backed up, use SET UNTIL TIME, SET UNTIL SCN or SET UNTIL SEQUENCE before RESTORE and RECOVER, then open the database with RESETLOGS.

5. How do I encrypt RMAN backups?

Run CONFIGURE ENCRYPTION FOR DATABASE ON; with an Oracle keystore configured, or use SET ENCRYPTION ON IDENTIFIED BY 'password' ONLY; for password-based encryption. After that, regular BACKUP commands produce encrypted backups. Encrypting backups to disk requires the Oracle Advanced Security option.

6. How do I delete old RMAN backups?

Set a retention policy, for example CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;, then run DELETE OBSOLETE; regularly. Never delete backup files or archived logs from the operating system directly, because RMAN’s records would then be out of date.

7. Does a Data Guard standby database replace RMAN backups?

No. A standby protects you from losing the primary server, but deleted data and logical corruption are copied to the standby too. You still need RMAN backups.

Conclusion

RMAN gives you everything you need to protect an Oracle database: online full and incremental backups, validation, retention management and point-in-time recovery. Run your database in ARCHIVELOG mode, turn on control file autobackup, automate your backups, and test restores regularly.

If writing and maintaining RMAN scripts across many databases takes too much time, Vinchin Backup & Recovery schedules Oracle backups from one web console, along with backups for 19+ virtualization platforms, physical servers and NAS. Try it free for 60 days.

Share on:

Categories: Database Tips