Oracle RMAN Backup Strategy Step by Step: Level 0, Level 1 and Archivelog Backups
Updated: Oct 24
A database backup strategy is only as good as the restore it makes possible. In this post we build a complete, production-style RMAN (Recovery Manager) backup strategy for an Oracle Database 19c or 23ai database, one step at a time. Every step explains what the command does, why it is needed, and what you should see when it works.
The strategy we will build is the one most Oracle shops use:
A weekly level 0 incremental backup (a full copy of every used block).
A daily level 1 incremental backup (only the blocks that changed).
Archived redo log backups several times a day, so you can recover to any point in time.
Control file and SPFILE autobackups after every backup.
Regular validation, so you know the backups can actually be restored.
Before You Begin
You need:
OS access as the oracle software owner and a SYSDBA (or SYSBACKUP) connection.
Enough disk space for the fast recovery area (FRA). A good starting size is two times the database size plus three days of archived redo.
The environment set for the target database (ORACLE_HOME, ORACLE_SID, PATH).
Tip: Run the queries in this post from SQL*Plus connected as SYSDBA. RMAN commands are run from the rman client connected to the target database.
Step 1: Check Whether the Database Is in ARCHIVELOG Mode
Point-in-time recovery and online (hot) backups are only possible when the database archives its online redo logs. In NOARCHIVELOG mode you can only take backups with the database mounted, and you can only restore to the moment of the backup. So the first thing to check is the log mode.
SQL |
sqlplus / as sysdba
SELECT name, log_mode, open_mode FROM v$database;
ARCHIVE LOG LIST |
Expected output |
NAME LOG_MODE OPEN_MODE
--------- ------------ --------------------
ORCL ARCHIVELOG READ WRITE
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 1842
Next log sequence to archive 1844
Current log sequence 1844What to expect: LOG_MODE shows either ARCHIVELOG or NOARCHIVELOG. ARCHIVE LOG LIST also shows the archive destination and the current log sequence. If the database is already in ARCHIVELOG mode, skip to Step 3.
Step 2: Enable ARCHIVELOG Mode (If Needed)
Changing the log mode requires a short outage because the database must be mounted, not open. Plan this in a maintenance window. On RAC, stop the database with srvctl and start only one instance in mount mode.
SQL |
SHUTDOWN IMMEDIATE STARTUP MOUNT ALTER DATABASE ARCHIVELOG; ALTER DATABASE OPEN;
ARCHIVE LOG LIST |
Expected output |
Database closed.
Database dismounted.
ORACLE instance shut down.
ORACLE instance started.
Total System Global Area 8589930576 bytes
Database mounted.
Database altered.
Database altered.
Database log mode Archive Mode
Automatic archival EnabledWhat this does: SHUTDOWN IMMEDIATE closes the database cleanly. STARTUP MOUNT reads the control file without opening the datafiles. ALTER DATABASE ARCHIVELOG records the new mode in the control file, and ALTER DATABASE OPEN makes the database available again. From now on, every filled online redo log is copied to the archive destination before it can be reused.
Tip: Take a level 0 backup as soon as possible after enabling ARCHIVELOG mode. Older backups taken in NOARCHIVELOG mode cannot be rolled forward with the new archived logs.
Step 3: Configure the Fast Recovery Area
The fast recovery area (FRA) is a disk location that Oracle manages for recovery files: archived logs, backup pieces, control file autobackups and flashback logs. Oracle automatically deletes files in the FRA that are no longer needed by the retention policy when space runs low, which makes day-to-day space management much simpler.
SQL |
-- The size must be set before the destination ALTER SYSTEM SET db_recovery_file_dest_size = 500G SCOPE=BOTH SID='*'; ALTER SYSTEM SET db_recovery_file_dest = '+FRA' SCOPE=BOTH SID='*';
-- On a file system instead of ASM, use a directory: -- ALTER SYSTEM SET db_recovery_file_dest = '/u03/fra' SCOPE=BOTH SID='*';
SELECT name, space_limit/1024/1024/1024 AS limit_gb, space_used/1024/1024/1024 AS used_gb, space_reclaimable/1024/1024/1024 AS reclaimable_gb FROM v$recovery_file_dest; |
Expected output |
System altered.
System altered.
NAME LIMIT_GB USED_GB RECLAIMABLE_GB
------ ---------- ---------- --------------
+FRA 500 38.2 12.7What this does: DB_RECOVERY_FILE_DEST_SIZE is a quota, not a physical allocation. Oracle will never write more than this amount into the FRA. Make sure the underlying disk group or file system really has that much free space. The query shows the limit, how much is used and how much Oracle could reclaim if needed.
Step 4: Connect to RMAN and Review the Current Configuration
RMAN keeps persistent settings in the control file (and in the recovery catalog, if you use one). Before changing anything, look at the defaults so you know what you are starting from.
Shell |
rman target /
RMAN> SHOW ALL; |
Expected output |
RMAN configuration parameters for database with db_unique_name ORCL are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/19.0.0/dbhome_1/dbs/snapcf_orcl.f'; # defaultWhat to expect: A list of CONFIGURE commands. Lines ending with "# default" have never been changed. Pay attention to RETENTION POLICY, CONTROLFILE AUTOBACKUP, DEVICE TYPE and ARCHIVELOG DELETION POLICY, because we change all of them in the next step.
Step 5: Set the Persistent RMAN Configuration
Persistent settings mean your backup scripts stay short and every backup behaves the same way. Each setting below solves a specific problem.
RMAN |
RMAN> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 14 DAYS; RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON; RMAN> CONFIGURE BACKUP OPTIMIZATION ON; RMAN> CONFIGURE DEVICE TYPE DISK PARALLELISM 4 BACKUP TYPE TO COMPRESSED BACKUPSET; RMAN> CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 1 TIMES TO DISK; RMAN> CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+DATA/snapcf_orcl.f'; |
Expected output |
new RMAN configuration parameters:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 14 DAYS;
new RMAN configuration parameters are successfully stored
new RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
new RMAN configuration parameters are successfully stored
new RMAN configuration parameters:
CONFIGURE DEVICE TYPE DISK PARALLELISM 4 BACKUP TYPE TO COMPRESSED BACKUPSET;
new RMAN configuration parameters are successfully storedHere is what each one does:
RECOVERY WINDOW OF 14 DAYS tells RMAN to keep every backup and archived log needed to recover to any point in the last 14 days. Anything older becomes "obsolete" and can be deleted.
CONTROLFILE AUTOBACKUP ON backs up the control file and SPFILE automatically after every backup and after structural changes. Without this, restoring from a total loss is much harder.
BACKUP OPTIMIZATION ON skips files that are already backed up and have not changed, such as archived logs and read-only tablespaces.
PARALLELISM 4 ... COMPRESSED BACKUPSET uses four channels at the same time and compresses the backup. BASIC compression is included with Enterprise Edition. The LOW, MEDIUM and HIGH algorithms require the Advanced Compression option.
ARCHIVELOG DELETION POLICY stops RMAN (and the FRA) from deleting an archived log until it has been backed up at least once.
SNAPSHOT CONTROLFILE NAME on shared storage is required for RAC, because any instance may take the backup.
Step 6: Enable Block Change Tracking
Without block change tracking, a level 1 incremental backup must read every block of every datafile to find what changed. With it, Oracle records changed blocks in a small tracking file, and the incremental backup reads only those blocks. On large databases this turns a multi-hour incremental into minutes.
SQL |
ALTER DATABASE ENABLE BLOCK CHANGE TRACKING USING FILE '+DATA';
SELECT status, filename, bytes/1024/1024 AS size_mb FROM v$block_change_tracking; |
Expected output |
Database altered.
STATUS FILENAME SIZE_MB
---------- ------------------------------------------------- -------
ENABLED +DATA/ORCL/CHANGETRACKING/ctf.283.1189345127 11What to expect: STATUS is ENABLED. The file is usually small (tens to hundreds of MB). Block change tracking is an Enterprise Edition feature and works on a physical standby only with Active Data Guard.
Step 7: Take the Weekly Level 0 Backup
A level 0 incremental backup copies every block that has ever been used, exactly like a full backup. The difference is that it can serve as the base for later level 1 backups. We include the archived logs and the current control file so the backup set is self-contained.
RMAN |
RMAN> RUN { BACKUP INCREMENTAL LEVEL 0 DATABASE TAG 'WEEKLY_L0' PLUS ARCHIVELOG TAG 'WEEKLY_L0_ARCH'; BACKUP CURRENT CONTROLFILE TAG 'WEEKLY_L0_CTL'; } |
Expected output |
Starting backup at 20-AUG-26
current log archived
channel ORA_DISK_1: starting compressed archived log backup set
...
Finished backup at 20-AUG-26
Starting backup at 20-AUG-26
channel ORA_DISK_1: starting compressed incremental level 0 datafile backup set
input datafile file number=00001 name=+DATA/ORCL/DATAFILE/system.257.1189340005
...
piece handle=+FRA/ORCL/BACKUPSET/2026_08_20/nnndn0_weekly_l0_0.290.1189346411 tag=WEEKLY_L0 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:41:18
Finished backup at 20-AUG-26
Starting Control File and SPFILE Autobackup at 20-AUG-26
Finished Control File and SPFILE Autobackup at 20-AUG-26What this does: PLUS ARCHIVELOG first switches the current log, backs up all archived logs, then backs up the database, then switches the log again and backs up the new archived logs. That guarantees the backup contains all redo needed to make it consistent. Tags make the backups easy to find later with LIST BACKUP TAG.
Step 8: Take the Daily Level 1 Backup
Level 1 backups contain only blocks changed since a previous backup. There are two types, and you should pick one deliberately:
Differential (the default) backs up blocks changed since the most recent level 1 or level 0. Backups are smaller, but a restore may need to apply several of them.
Cumulative backs up all blocks changed since the last level 0. Backups grow during the week, but a restore applies only one level 1 on top of the level 0.
RMAN |
-- Differential (default) RMAN> BACKUP INCREMENTAL LEVEL 1 DATABASE TAG 'DAILY_L1' PLUS ARCHIVELOG TAG 'DAILY_L1_ARCH';
-- Or cumulative RMAN> BACKUP INCREMENTAL LEVEL 1 CUMULATIVE DATABASE TAG 'DAILY_L1C' PLUS ARCHIVELOG TAG 'DAILY_L1C_ARCH'; |
Expected output |
Starting backup at 21-AUG-26
channel ORA_DISK_1: starting compressed incremental level 1 datafile backup set
input datafile file number=00001 name=+DATA/ORCL/DATAFILE/system.257.1189340005
...
piece handle=+FRA/ORCL/BACKUPSET/2026_08_21/nnndn1_daily_l1_0.301.1189432811 tag=DAILY_L1 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:03:52
Finished backup at 21-AUG-26What to expect: If block change tracking is working, the level 1 finishes much faster than the level 0. You can confirm in Step 11 that the backup used the tracking file.
Step 9: Back Up Archived Logs Several Times a Day
Archived logs are what let you recover to a point in time between backups. If you lose the server just before the nightly backup, the archived logs since the last backup are your only copy of the day's changes. Back them up every few hours and delete the ones already backed up to keep space under control.
RMAN |
RMAN> BACKUP ARCHIVELOG ALL NOT BACKED UP 1 TIMES TAG 'ARCH_HOURLY'; RMAN> DELETE NOPROMPT ARCHIVELOG ALL BACKED UP 1 TIMES TO DEVICE TYPE DISK COMPLETED BEFORE 'SYSDATE-1'; |
Expected output |
Starting backup at 21-AUG-26
channel ORA_DISK_1: starting compressed archived log backup set
input archived log thread=1 sequence=1851 RECID=1851 STAMP=1189440012
input archived log thread=1 sequence=1852 RECID=1852 STAMP=1189443611
...
Finished backup at 21-AUG-26
deleted archived log
archived log file name=+FRA/ORCL/ARCHIVELOG/2026_08_19/thread_1_seq_1838.301.1189261209 RECID=1838 STAMP=1189261209
...
Deleted 12 objectsWhat this does: The first command backs up only archived logs without an existing backup. The second deletes archived logs that are already backed up and older than one day, so you still keep a day of logs on disk for fast recovery.
Tip: If the database has a Data Guard standby, set the deletion policy to TO APPLIED ON ALL STANDBY BACKED UP 1 TIMES TO DISK, so logs are not deleted before the standby has applied them.
Step 10: Schedule the Backups
Put each RMAN job in a script file and call it from a small shell wrapper that sets the environment and writes a log file. Then schedule it with cron (or your enterprise scheduler).
Shell |
# /home/oracle/scripts/rman_l0.rcv RUN { BACKUP INCREMENTAL LEVEL 0 DATABASE TAG 'WEEKLY_L0' PLUS ARCHIVELOG; DELETE NOPROMPT OBSOLETE; }
# /home/oracle/scripts/run_rman.sh #!/bin/bash export ORACLE_SID=orcl export ORAENV_ASK=NO . oraenv > /dev/null LOG=/home/oracle/logs/rman_$(basename $1 .rcv)_$(date +%Y%m%d_%H%M).log rman target / cmdfile=$1 log=$LOG if grep -q "RMAN-" $LOG; then echo "RMAN errors in $LOG" | mail -s "RMAN FAILED on $(hostname)" dba-team@example.com fi
# crontab -e # Level 0 on Sunday 01:00, level 1 Monday-Saturday 01:00, archivelogs every 4 hours 0 1 * * 0 /home/oracle/scripts/run_rman.sh /home/oracle/scripts/rman_l0.rcv 0 1 * * 1-6 /home/oracle/scripts/run_rman.sh /home/oracle/scripts/rman_l1.rcv 0 */4 * * * /home/oracle/scripts/run_rman.sh /home/oracle/scripts/rman_arch.rcv |
What this does: The wrapper sources oraenv for the right environment, saves a time-stamped log per run and sends an e-mail when any RMAN error appears in the log. A backup failure nobody notices is the most common reason a restore fails months later.
Step 11: Check the Backup History
After the first few runs, confirm that the jobs succeeded, how long they took and how large they were. V$RMAN_BACKUP_JOB_DETAILS shows every RMAN job with its status.
SQL |
SELECT session_key, input_type, status, TO_CHAR(start_time,'YYYY-MM-DD HH24:MI') AS started, ROUND(elapsed_seconds/60) AS minutes, input_bytes_display, output_bytes_display FROM v$rman_backup_job_details ORDER BY start_time DESC FETCH FIRST 20 ROWS ONLY;
-- Was block change tracking used by the incremental backups? SELECT file#, used_change_tracking, incremental_level, ROUND(blocks_read/datafile_blocks*100,1) AS pct_read FROM v$backup_datafile WHERE incremental_level = 1 AND completion_time > SYSDATE - 1; |
Expected output |
SESSION_KEY INPUT_TYPE STATUS STARTED MINUTES INPUT OUTPUT
----------- ------------- ---------- ---------------- ------- ------ ------
4512 DB INCR COMPLETED 2026-08-21 01:00 4 412G 9.8G
4498 ARCHIVELOG COMPLETED 2026-08-20 20:00 1 6.1G 1.9G
4471 DB INCR COMPLETED 2026-08-20 01:00 41 412G 96G
FILE# USED_CHANGE_TRACKING INCREMENTAL_LEVEL PCT_READ
----- -------------------- ----------------- --------
1 YES 1 0.8
3 YES 1 1.4What to expect: STATUS should be COMPLETED. COMPLETED WITH WARNINGS or FAILED needs investigation in the RMAN log. For level 1 backups, USED_CHANGE_TRACKING should be YES and PCT_READ should be small.
Step 12: Validate That the Backups Can Be Restored
A backup you have never restored is a hope, not a plan. RMAN can read the backup pieces and check them for corruption without actually writing any datafiles. Run this weekly.
RMAN |
RMAN> RESTORE DATABASE VALIDATE; RMAN> RESTORE ARCHIVELOG FROM TIME 'SYSDATE-1' VALIDATE; RMAN> BACKUP VALIDATE CHECK LOGICAL DATABASE; |
Expected output |
Starting restore at 21-AUG-26
channel ORA_DISK_1: starting validation of datafile backup set
channel ORA_DISK_1: piece handle=+FRA/ORCL/BACKUPSET/2026_08_20/nnndn0_weekly_l0_0.290.1189346411 tag=WEEKLY_L0
channel ORA_DISK_1: validation complete, elapsed time: 00:12:07
Finished restore at 21-AUG-26
List of Datafiles
=================
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
1 OK 0 18011 117760 48213377What this does: RESTORE ... VALIDATE picks the backups RMAN would use for a real restore and reads every block in them. BACKUP VALIDATE CHECK LOGICAL reads the live datafiles and checks for physical and logical corruption. Any corrupt blocks found appear in V$DATABASE_BLOCK_CORRUPTION.
Tip: Validation proves the pieces are readable. Once a quarter, also do a real test restore to another server. That is the only way to prove the whole procedure, including passwords, wallets and documentation, works.
Step 13: Keep the Repository Clean
If someone deletes backup files at the OS level, RMAN still believes they exist. CROSSCHECK compares the repository with reality, and DELETE removes records and files that are expired or obsolete.
RMAN |
RMAN> CROSSCHECK BACKUP; RMAN> CROSSCHECK ARCHIVELOG ALL; RMAN> DELETE NOPROMPT EXPIRED BACKUP; RMAN> DELETE NOPROMPT OBSOLETE; RMAN> REPORT NEED BACKUP; RMAN> LIST BACKUP SUMMARY; |
Expected output |
Crosschecked 214 objects
Deleted 0 EXPIRED objects
RMAN retention policy will be applied to the command
RMAN retention policy is set to recovery window of 14 days
Deleting the following obsolete backups and copies:
...
Deleted 38 objects
RMAN retention policy will be applied to the command
Report of files whose recovery needs more than 14 days of archived logs
File Days Name
---- ----- -----------------------------------------------------
List of Backups
===============
Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
------- -- -- - ----------- --------------- ------- ------- ---------- ---
4471 B 0 A DISK 20-AUG-26 1 1 YES WEEKLY_L0
4512 B 1 A DISK 21-AUG-26 1 1 YES DAILY_L1What this does: CROSSCHECK marks missing pieces as EXPIRED. DELETE EXPIRED removes those records. DELETE OBSOLETE removes backups no longer needed by the 14-day recovery window. REPORT NEED BACKUP lists any datafile that does not meet the retention policy, which is a great final check.
Summary
You now have a full RMAN strategy: ARCHIVELOG mode, a managed fast recovery area, persistent settings with control file autobackup, block change tracking, weekly level 0, daily level 1 and frequent archived log backups, a scheduler with failure alerts, and regular validation. The last piece is practice. Restore to a test server regularly, write down how long it takes, and make sure that time fits the recovery time objective the business expects.
Comments