| Lesson 6 | Open database backups |
| Objective | List the requirements for a recoverable online RMAN backup. |
An open database backup, also called an online backup, protects database files while Oracle AI Database 26ai remains available to applications. Users can connect, transactions can continue, and RMAN can read data files without requiring a planned database shutdown. This makes online backup the normal choice for self-managed production systems that have demanding availability requirements.
Keeping the database open does not make backup planning simpler. Data blocks can change while RMAN is reading them, so an online data-file backup is generally inconsistent. In this context, inconsistent does not mean damaged or unusable. It means that redo must be applied after the backup is restored to bring all files to a transactionally consistent recovery point.
A recoverable online backup therefore depends on more than a successful copy of the data files. It requires ARCHIVELOG mode, an
available archive destination, protected archived redo, control-file and SPFILE protection, usable RMAN metadata, sufficient destination capacity,
security assets, monitoring, validation, and tested recovery procedures.
ARCHIVELOG mode.SYSBACKUP or SYSDBA privilege.These requirements apply to self-managed Oracle databases where the DBA controls backup configuration and execution. Autonomous AI Database uses an Oracle-managed backup service and does not expose the same host-level workflow.
| Benefits | Operational tradeoffs |
|---|---|
| Database availability: Applications and transactions can continue while RMAN reads the database files. | Resource usage: Backup I/O, CPU consumption, compression, encryption, and network traffic can affect application performance. |
| Flexible scope: RMAN can protect a whole CDB, selected PDBs, tablespaces, or individual data files. | Redo dependency: Recovery requires an unbroken chain of backup data and all redo needed to reach the selected recovery point. |
| Incremental strategies: Level 0 and level 1 backups can reduce routine backup volume and recovery work. | Capacity planning: Backup storage, the fast recovery area, and archive destinations must be monitored for space pressure. |
| Oracle-aware processing: RMAN checks Oracle blocks, records repository metadata, and supports backup sets and image copies. | Recovery dependencies: Control-file metadata, encryption keys, credentials, media services, and runbooks must remain available. |
| Recovery options: Complete or point-in-time recovery is possible when the required backups and redo are available. | Verification: A completed job still requires validation and periodic restore testing before it can be trusted. |
RMAN is Oracle's preferred physical backup and recovery tool. The RMAN client directs database server sessions to read Oracle blocks and write backup sets or image copies through configured channels. RMAN records its operations in the target control file and can also use a recovery catalog for longer-term repository information.
RMAN does not require ALTER TABLESPACE ... BEGIN BACKUP or ALTER DATABASE BEGIN BACKUP. It understands the structure of an
Oracle data block and compares the block header and footer while reading. If a block is being changed and appears fractured, RMAN rereads it. This
Oracle-aware behavior enables RMAN to capture a usable checkpoint for each file without freezing the data-file header.
A physical recovery chain commonly contains:
The password file, TDE wallet or keystore, backup encryption passwords, Oracle Net configuration, storage configuration, cloud credentials, media-management settings, and recovery scripts are supporting disaster-recovery assets. RMAN does not handle all of these assets as ordinary database files, but recovery can still fail if they are unavailable.
Do not treat active online redo log members as backup copies. Redo multiplexing improves availability, but it does not replace a backup. Do not back up temporary tablespaces or tempfiles. Temporary files do not contain permanent objects, and RMAN records enough metadata to recreate missing tempfiles when required during recovery.
An open backup of active data files requires ARCHIVELOG mode. Check the current setting from the CDB root:
SELECT log_mode
FROM v$database;
The result must be ARCHIVELOG. In this mode, Oracle archives a filled online redo log group before that group can be reused. Current
administration does not require the DBA to start an ARCH process manually before each backup. The important operational requirement is that one or
more configured archive destinations remain valid and have enough space and throughput.
ARCHIVE LOG LIST remains available in SQL*Plus as a concise status command. Server Manager is obsolete and is not part of an Oracle
26ai backup procedure.
Enable control-file autobackup unless the environment has an intentionally different, tested design:
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON;
The control file describes the database structure and contains RMAN repository records. The SPFILE contains the initialization settings required to start the instance. An autobackup gives RMAN an independently identifiable copy that can be located during disaster recovery, including cases where the current control file and recovery catalog are unavailable.
RMAN can write to disk, a fast recovery area, configured SBT channels, supported cloud object storage, tape, or Recovery Appliance. The lesson does not require one product or medium, but the destination must have sufficient capacity and must not share every failure mode with the primary database storage.
Keep at least one recoverable copy outside the primary storage failure domain and administrative boundary. Consider the storage system, host, credentials, encryption domain, availability zone or region, accidental deletion, and malicious modification. A different directory on the same vulnerable storage system is not adequate isolation.
Review the persistent RMAN configuration before relying on it:
RMAN> SHOW ALL;
The configuration can define the default device type, channels, parallelism, backup format, retention policy, compression, encryption, and other settings. Test access to every destination and credential before a production backup window begins.
A useful introductory command for a whole-CDB online backup is:
RMAN> BACKUP DATABASE PLUS ARCHIVELOG;
At a high level, RMAN switches and archives the current redo, backs up archived redo, backs up the database while it remains open, switches redo again, and backs up the archived redo generated during the operation. This sequence helps ensure that the data-file backup can be recovered to a consistent point.
The data-file backup and archived redo backups remain separate backup sets. The command does not mix data-file blocks and archived log contents in one backup set. Backup optimization, deletion policies, standby databases, and multiple archive destinations can affect which copies RMAN reads or retains, so the production policy must be tested as a complete system.
Enabling ARCHIVELOG mode does not by itself guarantee complete recovery or zero data loss. Recovery succeeds only when the selected
data-file backups, incrementals, control-file metadata, required redo, encryption material, and destination services are available.
The figure shows a weekly level 0 backup, daily level 1 backups, and archived redo protection throughout the cycle. This is an illustrative pattern, not a universal schedule. The correct frequency depends on data-change rate, recovery-point and recovery-time objectives, backup duration, retention, storage capacity, and measured restore performance.
RMAN> BACKUP INCREMENTAL LEVEL 0
2> DATABASE PLUS ARCHIVELOG;
RMAN> BACKUP INCREMENTAL LEVEL 1
2> DATABASE PLUS ARCHIVELOG;
A level 0 backup contains the data needed to establish the base of an incremental strategy. A differential level 1 backup contains blocks changed since the most recent level 0 or level 1 backup. A full backup and a level 0 backup contain similar data, but only a level 0 participates as the parent of later level 1 backups.
Block change tracking can reduce the number of blocks RMAN must scan to create incremental backups. The change tracking file is an optimization, not a backup. It does not replace the level 0 base, level 1 backups, archived redo, or repository metadata.
User-managed operating-system copies remain supported for appropriate environments, but they use a different consistency mechanism. When an online read/write tablespace is copied with an operating-system or storage tool, place it in backup mode before the copy and end backup mode as soon as the copy finishes:
SQL> ALTER TABLESPACE users BEGIN BACKUP;
-- Copy every data file belonging to the USERS tablespace.
SQL> ALTER TABLESPACE users END BACKUP;
Backup mode causes whole changed blocks to be written into the redo stream, increasing redo volume. Monitor the operation and do not leave a
tablespace in backup mode longer than necessary. The dynamic-performance view V$BACKUP reports the backup-mode state of data files.
| Topic | RMAN online backup | User-managed online copy |
|---|---|---|
| Database mode | ARCHIVELOG |
ARCHIVELOG |
| Database availability | Open | Open |
| Backup mode required | No | Yes for online read/write data files |
| Fractured-block handling | RMAN detects and rereads blocks | Backup mode and subsequent redo recovery protect usability |
| File discovery | RMAN reads Oracle database metadata | The DBA must inventory and copy every required file |
| Incremental backups | Supported | Not supplied by a basic operating-system copy |
| Repository metadata | Recorded automatically | Must be documented; compatible copies can be cataloged when appropriate |
| Normal role | Preferred Oracle backup method | Specialized alternative |
Do not combine these methods. In particular, do not put tablespaces in backup mode before a normal RMAN backup. Conversely, do not copy an online read/write data file with a basic operating-system utility while omitting the required user-managed backup-mode procedure.
Oracle AI Database 26ai uses the multitenant architecture. For a whole-CDB backup, connect RMAN to the CDB root as a common user with
SYSBACKUP or SYSDBA privilege. BACKUP DATABASE then protects the database files included in that CDB operation,
including the root, seed, and applicable PDB data files.
RMAN can also back up selected PDBs. A connection made directly to a PDB limits BACKUP DATABASE to that PDB, and a PDB-scoped backup does
not itself back up archived redo logs. The DBA must understand whether the recovery objective applies to one PDB, several PDBs, or the complete CDB
and design the recovery chain accordingly.
An online backup does not automatically enable point-in-time recovery. Database point-in-time recovery requires an appropriate data-file backup, control-file or catalog metadata, and all redo needed to reach the selected time, SCN, or log sequence. Missing redo can force recovery to stop before the intended target.
Flashback Database can reverse some unwanted changes more quickly when it is configured and its flashback logs are available. Data Pump exports can help move objects or recover selected logical content. Neither Flashback Database nor Data Pump replaces tested physical backups for media failure and complete database reconstruction.
Current dynamic-performance and data dictionary views help the DBA verify requirements and investigate problems:
V$DATABASE reports the logging mode and database-level state.V$DATAFILE identifies data files known to the control file.DBA_DATA_FILES maps permanent data files to tablespaces in the current container.V$CONTROLFILE lists current control-file members.V$ARCHIVED_LOG reports archived redo log history and backup-related information.V$ARCHIVE_DEST_STATUS reports archive-destination status and errors.V$RECOVERY_FILE_DEST reports fast recovery area capacity and usage.V$RMAN_BACKUP_JOB_DETAILS reports RMAN job status, timing, input, output, and throughput.V$BACKUP reports data-file backup-mode state for user-managed procedures.For example, check active archive destinations and their errors:
SELECT dest_id, status, destination, error
FROM v$archive_dest_status
WHERE status <> 'INACTIVE'
ORDER BY dest_id;
Review recent RMAN jobs:
SELECT session_key, input_type, status, start_time, end_time
FROM v$rman_backup_job_details
ORDER BY session_key DESC
FETCH FIRST 10 ROWS ONLY;
If a fast recovery area is configured, monitor its capacity:
SELECT name, space_limit, space_used, space_reclaimable
FROM v$recovery_file_dest;
A successful job is evidence that a backup command ran, not proof that the database can be restored within its recovery-time objective. Inspect the job output, confirm that expected backup records exist, and synchronize repository records with storage:
RMAN> LIST BACKUP SUMMARY;
RMAN> CROSSCHECK BACKUP;
RMAN> RESTORE DATABASE VALIDATE;
CROSSCHECK BACKUP updates repository status according to whether recorded backups are accessible. RESTORE DATABASE VALIDATE
reads the backup data RMAN would use for a restore without writing restored data files. Validation can reveal missing or corrupt backup pieces, but
it does not prove that every recovery dependency and operational procedure works together.
Periodically restore and recover the database in an isolated environment. Verify the control file, SPFILE, archived redo, TDE keystore, credentials, network access, media-management system, destination capacity, and PDB service configuration. Record the elapsed restore and recovery time and compare it with the required recovery-time objective.
The next lesson explains open database backup options.