How to Configure and Use RMAN Compressed Backup for Oracle?

Oracle backups grow fast, and compression cuts storage and bandwidth. This article covers RMAN’s built-in BASIC, LOW, MEDIUM, and HIGH levels, external methods, setup steps, and best practices to balance CPU and space.

download-icon
Free Download
for VM, OS, DB, File, NAS, etc.
nick-zhao

Updated by Nick Zhao on 2026/05/22

Table of contents
  • 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?

External compression means piping RMAN’s uncompressed output through OS tools like gzip, bzip2, or zip. This approach can work when you lack the Oracle Advanced Compression license or want to offload CPU work to another host. For example, you might use:

rman target / <<EOF | gzip > backup.rman.gz
BACKUP DATABASE;
EOF

However, piping adds a decompression step before recovery, which delays restores and prevents RMAN’s block-aware optimizations from shrinking empty blocks. You lose null-block and unused-block compression, and network bandwidth may increase if compression is applied after encryption.

RMAN Backup Compression Types

RMAN supports two main types of compression:

  • Basic Compression: included with Oracle Database Enterprise Edition and enabled with:

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:

LevelLicense RequiredCPU ImpactCompression RatioBest For
BASICNoModerateMediumEnvironments without Advanced Compression option
LOWYesLowLowFast backups on CPU-constrained systems
MEDIUMYesMediumHighBalanced workloads and cloud backups
HIGHYesHighVery HighStorage-critical backups in off-peak windows

Precompression Block Processing

Before binary compression, RMAN can zero out free space within blocks (OPTIMIZE FOR LOAD FALSE) to improve ratios on fragmented tablespaces. 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 specify MEDIUM or HIGH:

RMAN> BACKUP AS COMPRESSED BACKUPSET DATABASE COMPRESSED FOR MEDIUM;

(Note: COMPRESSED FOR syntax is supported in Oracle 12.2, 18c, 19c, and later).

Level 3: Advanced Oracle Database Compression

To include zeroing of free space:

RMAN> SET OPTIMIZE FOR LOAD FALSE;
RMAN> BACKUP AS COMPRESSED BACKUPSET DATABASE;

To switch compression levels mid-session:

RMAN> SET COMPRESSION ALGORITHM 'HIGH';
RMAN> 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.

  • Avoid LOW on data-intensive loads—its ratio may not justify even its small CPU footprint.

  • Schedule runs with HIGH in windows of low user activity.

  • Combine with incremental backups to limit full backup frequency.

  • Always monitor using:

    SELECT set_count,
           compression_level,
           compressed_bytes,
           uncompressed_bytes
      FROM V$BACKUP_SET
     WHERE compression_level = 'MEDIUM';
  • Diagnose high CPU with V$SESSION_LONGOPS and OS tools like top, pidstat, and iostat to pinpoint RMAN channels causing load spikes.

Compression before encryption yields better overall throughput—set CONFIGURE ENCRYPTION FOR DATABASE ON after configuring compression.

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. 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.

Select Oracle Database

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

Select the backup storage

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.

Select the backup strategies

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

Submit the job

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?
Use CATALOG START WITH '/path/to/backup'; RESTORE DATABASE; RECOVER DATABASE; in RMAN to register and apply the backup.

Q2. Can I switch compression levels mid-stream?
No; RMAN applies the level you specify at backup time and retains it for that backup set.

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; configure compression first, then enable encryption to minimize encrypted data size.

Q5. How do I verify compression effectiveness?
Query V$BACKUP_SET or V$BACKUP_PIECE to compare COMPRESSED_BYTES and UNCOMPRESSED_BYTES ratios.

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:

Categories: Database Backup