The cinder.backup.drivers.ceph Module

Ceph Backup Service Implementation.

This 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).

class CephBackupDriver(context, db_driver=None, execute=None)

Bases: cinder.backup.driver.BackupDriver

Backup up Cinder volumes to Ceph Object Store.

This class enables backing up Cinder volumes to a Ceph object store. Backups may be stored in their own pool or even cluster. Store location is defined by the Ceph conf file and Service config options supplied.

If the source volume is itself an RBD volume, the backup will be performed using incremental differential backups which should give a performance gain.

backup(backup, volume_file)

Backup the given volume to Ceph object store.

If the source volume is an RBD we will attempt to do an incremental/differential backup, otherwise a full copy is performed. If this fails we will attempt to fall back to full copy.

static backup_snapshot_name_pattern()

Returns the pattern used to match backup snapshots.

It is essential that snapshots created for purposes other than backups do not have this name format.

delete(backup)

Delete the given backup from Ceph object store.

classmethod get_backup_snaps(rbd_image, sort=False)

Get all backup snapshots for the given rbd image.

NOTE: this call is made public since these snapshots must be deleted
before the base volume can be deleted.
restore(backup, volume_id, volume_file)

Restore the given volume backup from Ceph object store.

get_backup_driver(context)

Previous topic

The cinder.backup.driver Module

Next topic

The cinder.backup.drivers.swift Module

This Page