Enable data compression for volume backups

Select a compression algorithm for your backups to reduce storage space and network bandwidth usage. Backups use zlib compression by default, but you can change algorithms or disable compression.

About this task

Data compression requires additional CPU power but uses less network bandwidth and storage space.

You can change the data compression algorithm of your backups or disable data compression by using the backup_compression_algorithm parameter in your OpenStackControlPlane CR.

The following options are available for data compression.

Expand
Table 1. Data compression options

Option

Description

none, off, or no

Do not use compression.

zlib or gzip

Use the Deflate compression algorithm.

bz2z or bzip2

Use Burrows-Wheeler transform compression.

zstd

Use the Zstandard compression algorithm.

Note
You cannot specify the data compression algorithm for the Red Hat Ceph Storage back end driver.

Procedure

  1. Open your OpenStackControlPlane CR file, openstack_control_plane.yaml, and add the following parameter to the cinder template to enable data compression. In this example, you enable data compression with an Object Storage service (swift) back end:
    apiVersion: core.openstack.org/v1beta1
    kind: OpenStackControlPlane
    spec:
      cinder:
        template:
          cinderBackup
            customServiceConfig: |
              [DEFAULT]
              backup_driver = cinder.backup.drivers.swift.SwiftBackupDriver
              backup_compression_algorithm = zstd
            networkAttachments:
            - storage
  2. Update the control plane:
    $ oc apply -f openstack_control_plane.yaml -n openstack
  3. Wait until RHOCP creates the resources related to the OpenStackControlPlane CR. Run the following command to check the status:
    $ oc get openstackcontrolplane -n openstack

    The OpenStackControlPlane resources are created when the status is "Setup complete".

    Tip
    Append the -w option to the end of the get command to track deployment progress.