This website use cookies to help you have a superior and more admissible browsing experience on the website.
Loading...
Oracle Recovery Manager (RMAN) is Oracle’s native, built-in backup and recovery utility for Oracle Database. It is the industry standard for protecting data files, control files, SPFILE, and archived redo logs across all Oracle versions—especially Oracle 19c, the most widely used enterprise release today.
RMAN operates directly with the Oracle kernel, enabling block-level backups, incremental tracking, corruption detection, and automated recovery.
Compared to traditional file-based backups (OS copy, cold backup), RMAN offers:
In Oracle RMAN environments, including commonly used Oracle 19c systems, backup strategies are typically designed based on workload and recovery objectives.
In Oracle RMAN, backup strategies are categorized into three core types, fully supported in Oracle 19c:
Before performing Oracle RMAN backup operations, several database and environment checks should be completed to ensure backup tasks run successfully and recovery operations remain reliable.
First, verify that the Oracle database is open and accessible. RMAN requires the target database instance to be running properly before backup operations can begin.
Run the following query in SQL*Plus:
SELECT NAME, OPEN_MODE FROM V$DATABASE;
The OPEN_MODE value should normally display READ WRITE, indicating that the database is fully operational.
Oracle RMAN relies on archived redo logs for point-in-time recovery and incremental backup operations. Before configuring backups, confirm that the database is running in ARCHIVELOG mode.
Use the following command:
ARCHIVE LOG LIST;
If ARCHIVELOG mode is disabled, enable it with:
SHUTDOWN IMMEDIATE;
STARTUP MOUNT;
ALTER DATABASE ARCHIVELOG;
ALTER DATABASE OPEN;
Enabling ARCHIVELOG mode allows Oracle to continuously archive transaction changes, which is essential for enterprise backup, disaster recovery, and database recovery scenarios.
After confirming the database configuration, connect to the RMAN utility.
For local database connections:
rman target /
For remote database connections:
rman target sys/password@ORCL
A successful RMAN connection allows administrators to configure backup policies, execute backup jobs, and perform recovery operations from the command line.
After completing prerequisite checks, the next step is configuring RMAN backup settings. Proper RMAN configuration improves backup efficiency, storage management, and recovery reliability.
Retention policies determine how long RMAN keeps backup files before marking them as obsolete.
To retain backups for seven days:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
Alternatively, to keep two backup copies:
CONFIGURE RETENTION POLICY TO REDUNDANCY 2;
Retention policies help organizations balance storage usage with recovery requirements and are critical for long-term backup management.
Backup optimization prevents RMAN from repeatedly backing up identical archived logs and backup sets already stored on disk.
Enable backup optimization using:
CONFIGURE BACKUP OPTIMIZATION ON;
This reduces unnecessary storage consumption and shortens backup windows, especially in environments with frequent scheduled backups.
RMAN supports compressed backup sets to reduce storage space requirements.
Enable compressed backups with:
CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET;
Compressed backups are especially useful for large Oracle databases where storage efficiency and network bandwidth optimization are important considerations.
The Oracle control file contains critical database structure and recovery metadata. Enabling automatic control file backups ensures this information is always protected.
Configure control file autobackup using:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
With this setting enabled, RMAN automatically backs up the control file after backup operations and structural database changes, improving recovery reliability in disaster scenarios.
Oracle RMAN provides multiple backup and recovery methods for protecting Oracle databases against data loss, corruption, and unexpected system failures. Common RMAN operations, including the operations on Oracle 19c, include full backups, incremental backups, archive log backups, and database recovery procedures.
Before starting backup operations, connect to the RMAN utility from the Oracle server.
A full RMAN backup creates a complete copy of the Oracle database, including datafiles and archived redo logs.
Run the following command:
BACKUP DATABASE PLUS ARCHIVELOG;
Including archive logs ensures the database can be fully recovered to the latest committed transaction state.
For environments with limited storage capacity, RMAN supports compressed backup sets.
BACKUP AS COMPRESSED BACKUPSET DATABASE;
Compressed backups reduce storage consumption and network transfer size, making them suitable for large production databases.
RMAN backup tasks can be automated through RUN blocks and scheduled scripts.
RUN {
BACKUP DATABASE PLUS ARCHIVELOG;
DELETE OBSOLETE;
}
This example performs a database backup and automatically removes obsolete backup files based on the configured retention policy.
Incremental backups only capture changed data blocks, helping reduce backup time and storage usage.
A level 0 backup acts as the baseline for future incremental backups
BACKUP INCREMENTAL LEVEL 0 DATABASE;
A Level 1 differential backup stores changes since the most recent Level 1 or Level 0 backup.
BACKUP INCREMENTAL LEVEL 1 DATABASE;
A cumulative backup stores all changes since the last Level 0 backup.
BACKUP INCREMENTAL LEVEL 1 CUMULATIVE DATABASE;
Cumulative backups simplify recovery operations because fewer backup sets are required during restoration.
Archive log backups are critical for point-in-time recovery and disaster recovery strategies.
BACKUP ARCHIVELOG ALL;
BACKUP DATABASE PLUS ARCHIVELOG;
BACKUP ARCHIVELOG ALL DELETE INPUT;
Deleting archived logs after backup helps manage storage space while maintaining recovery capability.
RMAN recovery operations allow administrators to restore databases after hardware failures, data corruption, accidental deletion, or ransomware incidents. In Oracle 19c environments, RMAN also supports PDB recovery, block recovery, and advanced point-in-time recovery scenarios.
Complete recovery restores the database to the most recent consistent state.
RESTORE DATABASE;
RECOVER DATABASE;
ALTER DATABASE OPEN;
This recovery method is commonly used after storage failures or full database loss scenarios.
Point-in-time recovery restores the database to a specific timestamp before a failure or unwanted change occurred.
# 示例:ESXi / Linux 命令(请替换为你的实际指令)
RUN {
SET UNTIL TIME "TO_DATE('2026-05-14 10:00:00','YYYY-MM-DD HH24:MI:SS')";
RESTORE DATABASE;
RECOVER DATABASE;
}
PITR is useful for recovering from accidental data deletion, logical corruption, or application errors.
RMAN also supports restoring individual datafiles or tablespaces without recovering the entire database.
RESTORE DATAFILE 1;
RECOVER DATAFILE 1;
This method minimizes downtime by limiting recovery operations to affected database components only.
RMAN block recovery repairs corrupted data blocks without restoring entire datafiles.
BLOCKRECOVER DATAFILE 5 BLOCK 100;
Block media recovery helps reduce recovery time and minimizes the impact of localized block corruption.
While Oracle RMAN is a powerful native tool, it has certain limitations in enterprise-scale environments:
Oracle RMAN provides strong native capabilities for database backup and recovery, covering key operations such as full backups, incremental backups, and point-in-time recovery. However, in enterprise environments, backup requirements often extend beyond basic execution to include centralized control, automation, and consistent protection across multiple systems.
Enterprise backup solutions like i2Backup extend RMAN-based protection by enabling:
This enhances RMAN backup strategies by improving manageability, security, and overall resilience in large-scale deployments.
After completing backup operations, it is important to monitor backup status and validate backup integrity to ensure recoverability when needed.
To ensure reliable and efficient backup operations, the following best practices are recommended:
Oracle RMAN backup is the built-in Oracle tool used for database backup and recovery.
RMAN provides block-level backup and automation, while traditional methods rely on manual file-level backups.
You configure retention policy, backup optimization, and control file autobackup before running backup jobs.
Use shell scripts combined with cron scheduling to automate RMAN backup execution.
Yes, RMAN supports full recovery, incremental recovery, and point-in-time recovery.
Oracle RMAN is the standard backup and recovery solution for Oracle databases, especially in Oracle 19c environments. It supports full, incremental, and archive log backups, along with powerful recovery capabilities.
By combining proper configuration, validation, and automation, organizations can significantly improve database resilience and reduce downtime risk.