RMAN Basics: Connect and Configure

Oracle DBA Certification 13 min min read Updated: Nov 16, 2026 Intermediate
RMAN Basics: Connect and Configure
Intermediate Topic 2 of 8

What is RMAN?

RMAN (Recovery Manager) is Oracle's own backup tool. It knows which blocks are used, skips empty ones, checks for corruption and keeps a catalog of every backup so it can restore for you automatically.

Connect

bash rman target / # or from another machine rman target sys@FREE
Where do I connect? For a full backup of a multitenant database, connect to the root (the CDB service). You can then back up the whole CDB or individual PDBs.

Where RMAN Keeps Its Records

PlaceNotes
Control file (default)Simple. Records are kept for control_file_record_keep_time days (default 7).
Recovery catalogA separate database that stores history for many databases for longer

See and Change Settings

sql RMAN> SHOW ALL; RMAN> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS; RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON; RMAN> CONFIGURE DEVICE TYPE DISK PARALLELISM 2 BACKUP TYPE TO COMPRESSED BACKUPSET; RMAN> CONFIGURE BACKUP OPTIMIZATION ON; RMAN> CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 1 TIMES TO DISK;
SettingWhat it does
RETENTION POLICY ... RECOVERY WINDOW OF 7 DAYSKeep enough backups to restore to any point in the last 7 days
CONTROLFILE AUTOBACKUP ONBack up the control file and SPFILE after every backup
COMPRESSED BACKUPSETSmaller backups, a little more CPU
BACKUP OPTIMIZATION ONSkip files that are already backed up
ARCHIVELOG DELETION POLICYArchives are removed only after they are backed up

The Fast Recovery Area

Set a Fast Recovery Area (FRA) so RMAN has a default home for backups and archives:

sql ALTER SYSTEM SET db_recovery_file_dest_size = 50G SCOPE = BOTH; ALTER SYSTEM SET db_recovery_file_dest = '/opt/oracle/fra' SCOPE = BOTH;

Inspect Backups

sql RMAN> LIST BACKUP SUMMARY; RMAN> LIST BACKUP OF DATABASE; RMAN> LIST ARCHIVELOG ALL; RMAN> REPORT SCHEMA; RMAN> REPORT NEED BACKUP; RMAN> REPORT OBSOLETE;

Keep the Catalog Honest

sql RMAN> CROSSCHECK BACKUP; -- do the files still exist? RMAN> CROSSCHECK ARCHIVELOG ALL; RMAN> DELETE EXPIRED BACKUP; -- remove records of missing files RMAN> DELETE OBSOLETE; -- remove backups outside the retention policy
Tip: Run DELETE OBSOLETE after every backup job. Otherwise the recovery area slowly fills up.

Run RMAN from a Script

bash rman target / cmdfile=/home/oracle/scripts/backup.rman log=/home/oracle/logs/backup.log

Conclusion

RMAN is the standard backup tool. Set a retention policy, turn on control file autobackup, use the FRA and keep the catalog clean with CROSSCHECK and DELETE OBSOLETE.

Quick Summary: rman target /, SHOW ALL, CONFIGURE settings, LIST/REPORT to inspect, DELETE OBSOLETE to clean.

Get Newsletter

Subscibe to our newsletter and we will notify you about the newest updates on Edugators