-
What is RMAN Compressed Backup?
-
Why Use RMAN Backup Compression?
-
RMAN Backup Compression Types
-
How to Compress Oracle Backup With Rman Command?
-
Rman Backup Compression Best Practices
-
Enhance RMAN Compressed Backup Efficiency With Vinchin Backup & Recovery
-
RMAN backup compression FAQS
-
Conclusion
Backups keep data safe, but they also consume storage and network resources. Oracle’s RMAN offers built-in compression to balance space savings against CPU use, and external tools let you apply OS-level compression when needed. In this article, you’ll learn what RMAN compression is, when to choose external methods, how to configure each compression level across Oracle versions, best practices for real-world performance, and how to monitor and troubleshoot your compressed backups.
What is RMAN Compressed Backup?
RMAN Compressed Backup is a feature of Oracle Recovery Manager (RMAN) that reduces the size of backup files by compressing backup data during the backup process. It helps save storage space and reduce network bandwidth consumption when transferring backups.
Compressed backups are commonly used for:
Saving backup storage costs
Accelerating backup transfers to remote or cloud storage
Improving backup management efficiency in enterprise environments
However, compression also increases CPU usage because RMAN must compress data while creating the backup.
Why Use RMAN Backup Compression?
Compressed backups take up less space on disk or tape and move faster over the network, which matters when you keep many backups online, send them to a remote site or the cloud, or work with limited storage. The trade-off is CPU: RMAN uses extra processor time to compress data during the backup and to decompress it during a restore. That’s why many teams run compressed backups outside business hours.
Why not just compress backup files with gzip? You can compress RMAN backup pieces with OS tools after the backup finishes, but RMAN can’t restore from those files until you decompress them again, which slows down recovery. RMAN’s built-in compression is transparent: compressed backup sets are restored directly, with no extra steps. If you don’t have the Advanced Compression license, the BASIC algorithm is still available at no extra cost.
RMAN Backup Compression Types
RMAN supports two main types of compression:
BASIC compression: included in all Oracle Database editions at no extra cost, and used by default when you run:
BACKUP AS COMPRESSED BACKUPSET DATABASE;
Advanced Compression (LOW, MEDIUM, HIGH levels) : provides higher compression efficiency and performance optimization, but requires the Oracle Advanced Compression option.
How Can I Enable It?
You can enable compression permanently:
RMAN> CONFIGURE COMPRESSION ALGORITHM 'MEDIUM'; RMAN> CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET;
Or for one-time backups:
RMAN> BACKUP AS COMPRESSED BACKUPSET DATABASE PLUS ARCHIVELOG;
Compression Levels Overview
The following table summarizes each level:
| Level | Advanced Compression license | CPU usage | Compression ratio | Best for |
|---|---|---|---|---|
| BASIC | Not required | Medium to high | Good | The default choice without the Advanced Compression Option |
| LOW | Required | Lowest | Lowest | Fast backups when CPU is limited |
| MEDIUM | Required | Medium | Good | Most workloads; the usual recommendation with the license |
| HIGH | Required | Highest | Best | Slow networks or tight storage, in off-peak windows |
Precompression Block Processing
Starting with Oracle 12c, RMAN can consolidate the free space inside each block before compressing it, which improves the compression ratio for tablespaces with many partially empty blocks. This precompression processing is turned on with the OPTIMIZE FOR LOAD FALSE clause of CONFIGURE COMPRESSION ALGORITHM (see Level 3 below). Null-block compression skips never-written blocks; unused-block compression omits allocated but empty blocks. Both occur before the chosen binary algorithm, maximizing space savings without extra license fees .
How to Compress Oracle Backup With Rman Command?
Below are step-by-step instructions for various skill levels.
Level 1: Basic Oracle database compression
First, configure the default algorithm:
RMAN> CONFIGURE COMPRESSION ALGORITHM 'BASIC';
Then enable it on disk:
RMAN> CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET;
Finally, run:
RMAN> BACKUP DATABASE;
This uses BASIC compression by default, giving you decent savings without an Advanced Compression license.
Level 2: One-off compressed backup
For a one-off compressed backup without altering defaults, run:
RMAN> BACKUP AS COMPRESSED BACKUPSET DATABASE PLUS ARCHIVELOG;
To use a different algorithm for one backup without changing the configured default, set it inside a RUN block:
RMAN> RUN {
SET COMPRESSION ALGORITHM 'HIGH';
BACKUP AS COMPRESSED BACKUPSET DATABASE PLUS ARCHIVELOG;
}(Note: COMPRESSED FOR syntax is supported in Oracle 12.2, 18c, 19c, and later).
Level 3: Advanced Oracle Database Compression
To enable precompression block processing for better compression ratios (Oracle 12c and later), add the OPTIMIZE FOR LOAD FALSE clause when configuring the algorithm:
RMAN> SET OPTIMIZE FOR LOAD FALSE; RMAN> BACKUP AS COMPRESSED BACKUPSET DATABASE;
The default, OPTIMIZE FOR LOAD TRUE, skips this extra processing to save CPU.
To switch compression levels mid-session:
RMAN> RUN {
SET COMPRESSION ALGORITHM 'HIGH';
BACKUP AS COMPRESSED BACKUPSET DATABASE;
}Monitor CPU versus time to choose the best level for OLTP or batch windows.
Rman Backup Compression Best Practices
Effective compression comes from testing and monitoring:
Test each level on staging before production.
Use MEDIUM for mixed workloads; reserve HIGH for off-peak archives.
Choose LOW when the backup window is tight and CPU is limited; it compresses less but runs fastest.
Schedule runs with HIGH in windows of low user activity.
Combine with incremental backups to limit full backup frequency.
Check the actual compression ratio of recent backup jobs:
SELECT start_time, input_type, status, input_bytes_display, output_bytes_display, ROUND(compression_ratio, 2) AS compression_ratio FROM V$RMAN_BACKUP_JOB_DETAILS ORDER BY start_time DESC;
Diagnose high CPU with V$SESSION_LONGOPS and OS tools like top, pidstat, and iostat to pinpoint RMAN channels causing load spikes.
If you also encrypt backups, RMAN automatically compresses the data before encrypting it, so you get the full space savings regardless of the order in which you configure the two features.
Enhance RMAN Compressed Backup Efficiency With Vinchin Backup & Recovery
Although the RMAN compressed backup feature built in Oracle Recovery Manager can efficiently reduce backup volumes, relying solely on native command line tools in enterprise environments fail to satisfy the needs for large-scale, long-term, and centralized data protection. For this reason, many organizations introduce professional enterprise-level backup solutions to optimize the management and recovery process of Oracle’s RMAN.
Vinchin Backup & Recovery is such a powerful database backup solution that supports mainstream databases, including Oracle, MySQL, SQL Server, MariaDB, PostgreSQL, and PostgresPro and TiDB. It offers data compression and deduplication technologies to reduce data size and optimize storage space, and you can choose from flexible backup types (full, incremental, log, and archived log backup) for your Oracle database.
As to the data security, Vinchin is equipped with ransomware protection and malware scan features, preventing critical production data from being attacked throughout backup and recovery procedures. The Vinchin web console is simple and intuitive. To back up an Oracle database, you typically:
1. Go to Database Backup>Backup, and select the Oracle database as the backup source.

2. Then select the target node and storage device to specify the backup destination.

3. Configure the backup strategies now; choose either to start the backup immediately or schedule it daily, weekly, or monthly with the full, incremental, or differential backup method.

4. Finally, give a name to the job, check all the details, and click Submit to let the task start.

Vinchin serves a global customer base with top ratings. Try all features free for 60 days; click the button to download and deploy in minutes.
RMAN backup compression FAQS
Q1. How do I restore a compressed backup?
Restore it like any other backup: RMAN decompresses compressed backup sets automatically. Mount the database, then run RESTORE DATABASE;, RECOVER DATABASE; and ALTER DATABASE OPEN;. Use CATALOG START WITH '/path/to/backup'; first only if the backup pieces aren’t recorded in the control file or recovery catalog, for example after moving them to a new server.
Q2. Can I switch compression levels mid-stream?
Yes, for future backups. Use SET COMPRESSION ALGORITHM in a RUN block for a single job, or CONFIGURE COMPRESSION ALGORITHM to change the default. Existing backup sets keep the algorithm they were created with, and RMAN restores them correctly.
Q3. Does RMAN compression affect recovery time?
Yes; higher levels take more CPU on restore, so balance for your recovery-time objectives.
Q4. Can I use compression with encrypted backups?
Yes. When both are enabled, RMAN compresses data first and then encrypts it, so encrypted backups are still as small as possible.
Q5. How do I verify compression effectiveness?
Query the COMPRESSION_RATIO column in V$RMAN_BACKUP_JOB_DETAILS, which compares the input and output sizes of each backup job. Run LIST BACKUP SUMMARY; in RMAN to see which backup sets are compressed.
Conclusion
RMAN’s built-in compression features from BASIC to Advanced levels let you fine-tune the trade-off between storage savings and CPU use while benefiting from block-level optimizations. External compression can fill gaps when licenses are unavailable but adds complexity. Test each level under realistic loads, monitor CPU and throughput metrics, and apply compression before encryption to maximize efficiency. With these practices, you’ll achieve reliable, space-efficient backups that align with your recovery objectives.
Share on: