Rman backup: compression
- WHen you compress backups you can use RMAN to do the compression.
- There are 4 levels of compression for rman: BASIC, LOW, MEDIUM and HIGH. BASIC is free and the others require the "Advanced Compression" license. This will explained here.
- However, it is much better to enable compression at the storage level, for example when you use a ZFS Storage Appliance. You get roughly the same compression ratio, but the compression occurs at the storage tier, saving precious cpu cycles on the database tier.
How to configure backup compression
You can find out the current setting with the statement below:
RMAN> show compression algorithm; using target database control file instead of recovery catalog RMAN configuration parameters for database with db_unique_name PRDDB are: CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
You can change this configuration as follows:
RMAN> CONFIGURE COMPRESSION ALGORITHM 'LOW'; old RMAN configuration parameters: CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE; new RMAN configuration parameters: CONFIGURE COMPRESSION ALGORITHM 'LOW' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE; new RMAN configuration parameters are successfully stored
How to perform a compressed backup
You use the same statement for any of the 4 backup settings. The statement simply applies the type of compression that is configured:
RMAN> backup as compressed backupset database plus archivelogs delete input;
The backup sizing and performance depends per system. So you will have to do some reseach yourself. But see below some info I got from another website. It turns out that the BASIC compression is not too bad,
Compression level Backup Size Backup Duration ======================================================= NORMAL 4 GB 279 sec BASIC 636 MB 419 sec LOW 797 MB 189 sec MEDIUM 674 MB 238 sec HIGH 485 MB 3129 sec