4. Backup drivers

This section describes how to configure the cinder-backup service and its drivers.

The volume drivers are included with the Block Storage repository (https://github.com/openstack/cinder). To set a backup driver, use the backup_driver flag. By default there is no backup driver enabled.

4.1. Ceph backup driver

The Ceph backup driver backs up volumes of any type to a Ceph back-end store. The driver can also detect whether the volume to be backed up is a Ceph RBD volume, and if so, it tries to perform incremental and differential backups.

For source Ceph RBD volumes, you can perform backups within the same Ceph pool (not recommended) and backups between different Ceph pools and between different Ceph clusters.

At the time of writing, differential backup support in Ceph/librbd was quite new. This driver attempts a differential backup in the first instance. If the differential backup fails, the driver falls back to full backup/copy.

If incremental backups are used, multiple backups of the same volume are stored as snapshots so that minimal space is consumed in the backup store. It takes far less time to restore a volume than to take a full copy.

Note

Block Storage enables you to:

  • Restore to a new volume, which is the default and recommended action.

  • Restore to the original volume from which the backup was taken. The restore action takes a full copy because this is the safest action.

To enable the Ceph backup driver, include the following option in the cinder.conf file:

backup_driver = cinder.backup.drivers.ceph

The following configuration options are available for the Ceph backup driver.

Table 1.16. Description of configuration options for backups_ceph

Configuration option = Default value Description
[DEFAULT]
backup_ceph_chunk_size = 134217728 (IntOpt) The chunk size, in bytes, that a backup is broken into before transfer to the Ceph object store.
backup_ceph_conf = /etc/ceph/ceph.conf (StrOpt) Ceph configuration file to use.
backup_ceph_pool = backups (StrOpt) The Ceph pool where volume backups are stored.
backup_ceph_stripe_count = 0 (IntOpt) RBD stripe count to use when creating a backup image.
backup_ceph_stripe_unit = 0 (IntOpt) RBD stripe unit to use when creating a backup image.
backup_ceph_user = cinder (StrOpt) The Ceph user to connect with. Default here is to use the same user as for Block Storage volumes. If not using cephx this should be set to None.
restore_discard_excess_bytes = True (BoolOpt) If True, always discard excess bytes when restoring volumes i.e. pad with zeroes.

This example shows the default options for the Ceph backup driver.

backup_ceph_conf=/etc/ceph/ceph.conf
backup_ceph_user = cinder
backup_ceph_chunk_size = 134217728
backup_ceph_pool = backups
backup_ceph_stripe_unit = 0
backup_ceph_stripe_count = 0

4.2. IBM Tivoli Storage Manager backup driver

The IBM Tivoli Storage Manager (TSM) backup driver enables performing volume backups to a TSM server.

The TSM client should be installed and configured on the machine running the cinder-backup service. See the IBM Tivoli Storage Manager Backup-Archive Client Installation and User's Guide for details on installing the TSM client.

To enable the IBM TSM backup driver, include the following option in cinder.conf:

backup_driver = cinder.backup.drivers.tsm

The following configuration options are available for the TSM backup driver.

Table 1.17. Description of configuration options for backups_tsm

Configuration option = Default value Description
[DEFAULT]
backup_tsm_compression = True (BoolOpt) Enable or disable compression for backups
backup_tsm_password = password (StrOpt) TSM password for the running username
backup_tsm_volume_prefix = backup (StrOpt) Volume prefix for the backup ID when backing up to TSM

This example shows the default options for the TSM backup driver.

backup_tsm_volume_prefix = backup
backup_tsm_password = password
backup_tsm_compression = True

4.3. Object Storage backup driver

The backup driver for Object Storage back-end performs a volume backup to an Object Storage service system.

To enable the Object Storage backup driver, include the following option in the cinder.conf file:

backup_driver = cinder.backup.drivers.swift

The following configuration options are available for the Object Storage back-end backup driver.

Table 1.18. Description of configuration options for backups_swift

Configuration option = Default value Description
[DEFAULT]
backup_swift_auth = per_user (StrOpt) Object Storage authentication mechanism
backup_swift_container = volumebackups (StrOpt) The default Object Storage container to use
backup_swift_key = None (StrOpt) Object Storage key for authentication
backup_swift_object_size = 52428800 (IntOpt) The size in bytes of Object Storage backup objects
backup_swift_retry_attempts = 3 (IntOpt) The number of retries to make for Object Storage operations
backup_swift_retry_backoff = 2 (IntOpt) The backoff time in seconds between Object Storage retries
backup_swift_url = http://localhost:8080/v1/AUTH_ (StrOpt) The URL of the Object Storage endpoint
backup_swift_user = None (StrOpt) Object Storage user name

This example shows the default options for the Object Storage back-end backup driver.

backup_swift_url = http://localhost:8080/v1/AUTH
backup_swift_auth = per_user
backup_swift_user = <None>
backup_swift_key = <None>
backup_swift_container = volumebackups
backup_swift_object_size = 52428800
backup_swift_retry_attempts = 3
backup_swift_retry_backoff = 2
backup_compression_algorithm = zlib