oracle-databaserman

RMAN Backup Compression


SQL Server has built-in database backup compression. Is there an easy way to compress RMAN backups? Does it work well? Is restoring from a compressed backup straight forward? Is it even recommended? Thanks.


Solution

  • Compressing backups is straightforward, and restoring from compressed backups is transparent. There is a tradeoff in terms of performance, since compression requires additional CPU overhead; you'll have to decide what works best for you in your situation. Any compression option other than the basic/default (i.e. any use of the Advanced Compression Option) requires additional licensing.

    See the full documentation here: https://docs.oracle.com/en/database/oracle/oracle-database/19/bradv/backing-up-database.html#GUID-E0D30989-9477-45DD-8FE1-367BDD0A7A8E

    Making Compressed Backups

    When creating backup sets, you can use RMAN support for binary compression of backup sets by including the AS COMPRESSED BACKUPSET option to the BACKUP command.

    RMAN compresses the backup set contents before writing them to disk. The details of which binary compression level is used are automatically recorded in the backup set. There is no need to explicitly mention the type of compression used or how to decompress the backup set in the recovery operation.

    Binary compression creates some performance overhead during backup and restore operations. Binary compression consumes CPU resources, so do not routinely schedule compressed backups when CPU usage is high. However, the following circumstances may warrant paying the performance penalty:

    • You are using disk-based backups when disk space in your fast recovery area or other disk-based backup destination is limited.

    • You are performing your backups to some device over a network when reduced network bandwidth is more important than CPU usage.

    • You are using some archival backup media such as CD or DVD, where reducing backup sizes saves on media costs and archival storage.

    Example 9-7 Making Compressed Backups

    This example backs up the entire database and archived logs to the configured default backup destination (disk or tape), producing compressed backup sets.

    BACKUP    
        AS COMPRESSED BACKUPSET
        DATABASE PLUS ARCHIVELOG;