Chapter 15 · RMAN Backup, Restore, Recovery, and Disaster-Recovery Engineering
RMAN Architecture, Repository, Channels, Backup Sets vs Image Copies, and Incrementals
Build an RMAN mental model around the target database, repository, channels, backup sets/pieces, image copies, and level 0/1 incrementals, then create a small real backup and prove what LIST/REPORT metadata actually establishes.
Learning outcomes
ServiceHub has nightly shell scripts that copy a few
.dbf files and call the directory a “backup.”
Nobody can answer which SCN the copies represent, whether
required archived redo exists, or how Oracle would find them
after loss of the control file. Recovery Manager (RMAN) is
Oracle's recovery-aware backup client: it coordinates server
sessions, understands database file/SCN metadata, records backup
provenance in an RMAN repository, and knows how backup artifacts
can participate in restore/recovery.
Identify the RMAN client, target database, optional recovery catalog, repository, channels, and server sessions.
Distinguish backup sets/pieces from image copies and explain the restore implications of each.
Explain level 0 and differential/cumulative level 1 incrementals without confusing a full backup with an incremental base.
Create a small current-control-file backup and image copy, then inspect LIST/REPORT evidence.
Keep channel parallelism/compression decisions tied to storage/CPU/device measurements and current licensing.
Mandatory work targets Oracle AI Database Free 26ai, reviewed against RU 23.26.3, SQL Developer 26.2, and SQLcl 26.2.1. Free is limited to 2 foreground CPU cores, 2 GB combined SGA/PGA memory, 12 GB user data, and one installation per logical environment; Oracle supplies neither patches nor Support service requests for Free. The course CDB/PDB baseline is FREE/FREEPDB1. RMAN work is performed with SYSBACKUP or SYSDBA and never from the ServiceHub runtime account. Disk backup sets and image copies need filesystem/Fast Recovery Area capacity outside the SQL user-data model, so every lab begins with destination/free-space evidence. Mandatory diagnostics do not require AWR, ASH, Diagnostics Pack, Tuning Pack, RAC, Data Guard, Exadata, or a media-management vendor.
1. RMAN is a client; database server sessions perform the I/O
The RMAN client parses RMAN commands and
coordinates work. The target database is the
database being backed up/recovered. RMAN allocates one or more
channels; each channel corresponds to a
database server session that reads/writes database or backup
files using a device type such as DISK or an SBT
media-management interface.
RMAN metadata is the RMAN repository. A current copy is stored in the target control file. An optional recovery catalog stores additional/longer-lived repository metadata in a separate database schema. The catalog stores metadata—not the backup payload itself.
rman target /
SHOW ALL;REPORT SCHEMA;LIST INCARNATION;
SHOW ALL is configuration evidence.
REPORT SCHEMA proves what RMAN currently believes
the datafile/tablespace structure is. Neither proves a
recoverable backup exists.
2. Backup sets contain backup pieces in RMAN format
A backup set is an RMAN logical container whose physical files are backup pieces. RMAN can omit never-used blocks in datafile backup sets and can multiplex input files into pieces. Backup sets can be written to disk or SBT devices and are the default RMAN backup type.
A backup piece is not a datafile you can simply attach to the database. During restore, RMAN reads the piece and reconstructs the requested database file.
BACKUP AS BACKUPSET CURRENT CONTROLFILE TAG 'SH15_CF_BACKUPSET';LIST BACKUP OF CONTROLFILE;LIST BACKUP SUMMARY;
The current control file is deliberately small enough for a safe
lab. The output should show a backup set/piece with the tag and
status AVAILABLE. That proves RMAN created/recorded
the artifact; it does not yet prove you can bootstrap a disaster
or restore application data.
3. Image copies are file-form copies recorded in the repository
An RMAN image copy is a file-form copy of a
datafile, control file, or archived log. Unlike a backup piece,
it is not stored in RMAN's backup-set format. RMAN-created image
copies are validated during creation and registered in the
repository. Image copies can support
SWITCH ... TO COPY strategies and incrementally
updated backups.
BACKUP AS COPY CURRENT CONTROLFILE TAG 'SH15_CF_IMAGE_COPY';LIST COPY OF CONTROLFILE;
Image copies generally use more disk than compressed backup sets, but restore can sometimes avoid reconstructing the file from a backup piece. The operational tradeoff is recovery design, storage, transport, and update strategy—not “copy always faster.”
4. Full backup is not the same thing as incremental level 0
An ordinary full datafile backup includes every allocated block that RMAN chooses to back up, but it is not a parent in an incremental strategy. An incremental level 0 also captures the base data blocks and is specifically marked as the parent for later level 1 incrementals.
A default/differential level 1 backs up blocks changed since the most recent level 0 or level 1. A cumulative level 1 backs up all blocks changed since the most recent level 0. Cumulative backups are larger but can simplify/reduce the number of incremental sets needed during recovery.
BACKUP INCREMENTAL LEVEL 0 PLUGGABLE DATABASE FREEPDB1 TAG 'SH15_FREEPDB1_L0';BACKUP INCREMENTAL LEVEL 1 PLUGGABLE DATABASE FREEPDB1 TAG 'SH15_FREEPDB1_L1_DIFF';BACKUP INCREMENTAL LEVEL 1 CUMULATIVE PLUGGABLE DATABASE FREEPDB1 TAG 'SH15_FREEPDB1_L1_CUM';
These PDB backups are intentionally optional in the mandatory low-footprint lab because their disk requirement depends on the learner's current FREEPDB1 size. Estimate destination capacity first and remember that backup storage is separate from the 12-GB user-data limit but still consumes real host/container disk.
5. Channels define I/O streams; parallelism is not free throughput
SHOW DEFAULT DEVICE TYPE;SHOW DEVICE TYPE;SHOW CHANNEL;
Increasing disk channel parallelism can increase read/write concurrency, CPU usage, memory, and contention on the same underlying volume. Four channels pointed at one slow disk are not four independent devices. On Free, the two-foreground-CPU limit also makes high parallelism a poor production-performance experiment.
RUN { ALLOCATE CHANNEL sh15_c1 DEVICE TYPE DISK; BACKUP CURRENT CONTROLFILE TAG 'SH15_MANUAL_CHANNEL'; RELEASE CHANNEL sh15_c1;}
6. Compression has two licensing/performance classes
RMAN backup sets support binary compression. The
BASIC algorithm is the portable default compression
path and does not require the Oracle Advanced Compression
option. The LOW, MEDIUM, and
HIGH algorithms belong to the Advanced Compression
option in offerings where that option is separately licensed.
Oracle AI Database Free includes Advanced Compression, but an
EE/EE-ES production deployment must check entitlement.
CONFIGURE COMPRESSION ALGORITHM 'BASIC';BACKUP AS COMPRESSED BACKUPSET CURRENT CONTROLFILE TAG 'SH15_CF_BASIC_COMP';
Compression consumes CPU to save storage/I/O/network. Oracle explicitly advises testing on the target workload rather than applying universal compression-ratio or throughput expectations.
7. Deliberately wrong: copy live datafiles with the OS and delete the control-file record trail
A raw OS copy of an open datafile can be inconsistent relative
to the rest of the database and is not automatically known to
RMAN. Even a valid user-managed copy must be cataloged before
RMAN can use it conveniently, and CATALOG alone
does not prove the copy was created correctly or validate every
block.
CATALOG DATAFILECOPY '/verified/path/users01_copy.dbf';LIST COPY OF DATAFILE '/verified/path/users01_copy.dbf';
Do not run this with an arbitrary copy of a live file. The safe path is RMAN-created backups/copies or a documented storage snapshot procedure whose consistency rules are understood.
8. Repository evidence after the small lab
LIST BACKUP TAG 'SH15_CF_BACKUPSET';LIST COPY TAG 'SH15_CF_IMAGE_COPY';LIST BACKUP TAG 'SH15_CF_BASIC_COMP';LIST BACKUP SUMMARY;
AVAILABLE means the repository currently considers
the file available; Lesson 4 will show why
CROSSCHECK is required to reconcile metadata with
actual media and why VALIDATE is a stronger
integrity check.
9. Production judgment
Choose backup sets when storage efficiency, tape/SBT, transport, or compression matters; image copies when switch-to-copy or incrementally updated image strategies improve recovery. Use level 0/1 incrementals only when the measured changed-block pattern and RTO justify them. Size channel parallelism against independent I/O paths, CPU and media-manager behavior.
No management pack or COMPATIBLE change is required
for the mandatory small backups. BASIC compression is the
portable licensing path. Lesson 2 now protects the metadata/redo
needed to bootstrap recovery when the current control file or
server parameter file is gone.
Check your understanding
- What is an RMAN channel?
- Can a backup piece be mounted directly as a database datafile?
- What is the important difference between a full backup and incremental level 0?
- What does an RMAN recovery catalog store?
- Does BASIC RMAN backup compression require the Advanced Compression option?
Review the answers
It is an RMAN I/O stream implemented by a database server session for a device type such as DISK or SBT.
No. A backup piece is in RMAN backup-set format; RMAN restores database files from it.
Level 0 is marked as the base for later level 1 incrementals; an ordinary full backup is not an incremental parent.
It stores RMAN repository metadata for target databases, not the backup payload files themselves.
No. BASIC/default RMAN backup compression is the portable no-Advanced-Compression-option algorithm.
Authoritative references
- Getting Started with RMAN — RMAN architecture and quick-start backup workflow
- RMAN Backup Concepts — backup sets, pieces, image copies and incrementals
- Backing Up the Database — CDB/PDB/datafile backup scopes
- Configuring RMAN — Advanced — channels, parallelism and compression
- Licensing Information — RMAN compression/encryption option boundaries