2.4. Backup Drivers

This section describes how to configure the cinder-backup service and its drivers.
The volume drivers are included with the Cinder repository (https://github.com/openstack/cinder). To set a backup driver, use the backup_driver flag. By default there is no backup driver enabled.

2.4.1. Ceph Backup Driver

The Ceph backup driver supports backing up volumes of any type to a Ceph backend store. It is also capable of detecting whether the volume to be backed up is a Ceph RBD volume and if so, attempts to perform incremental/differential backups.
Support is also included for the following in the case of source volume being a Ceph RBD volume:
  • backing up within the same Ceph pool (not recommended)
  • backing up between different Ceph pools
  • backing up between different Ceph clusters
At the time of writing, differential backup support in Ceph/librbd was quite new so this driver accounts for this by first attempting differential backup and falling back to full backup/copy if the former fails.
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 and restoring the volume takes a far reduced amount of time compared to a full copy.
Note that Cinder supports restoring to a new volume or the original volume the backup was taken from. For the latter case, a full copy is enforced since this was deemed the safest action to take. It is therefore recommended to always restore to a new volume (default).
To enable the Ceph backup driver, include the following option in cinder.conf:
The following configuration options are available for the Ceph backup driver.

Table 2.18. Description of configuration options for backups_ceph

Configuration option=Default value Description
backup_ceph_chunk_size=134217728 (IntOpt) the chunk size in bytes that a backup will be broken into before transfer to backup store
backup_ceph_conf=/etc/ceph/ceph.conf (StrOpt) Ceph config file to use.
backup_ceph_pool=backups (StrOpt) the Ceph pool to backup to
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
restore_discard_excess_bytes=True (BoolOpt) If True, always discard excess bytes when restoring volumes.
Here is an example of the default options for the Ceph backup driver.