The cinder.backup.api Module

Handles all requests relating to the volume backups service.

class API(db_driver=None)

Bases: cinder.db.base.Base

API for interacting with the volume backup manager.

create(context, name, description, volume_id, container, incremental=False, availability_zone=None, force=False, snapshot_id=None)

Make the RPC call to create a volume backup.

delete(context, backup, force=False)

Make the RPC call to delete a volume backup.

Call backup manager to execute backup delete or force delete operation. :param context: running context :param backup: the dict of backup that is got from DB. :param force: indicate force delete or not :raises: InvalidBackup :raises: BackupDriverException :raises: ServiceNotFound

export_record(context, backup_id)

Make the RPC call to export a volume backup.

Call backup manager to execute backup export.

Parameters:
  • context – running context
  • backup_id – backup id to export
Returns:

dictionary – a description of how to import the backup

Returns:

contains ‘backup_url’ and ‘backup_service’

Raises:

InvalidBackup

get(context, backup_id)
get_all(context, search_opts=None, marker=None, limit=None, offset=None, sort_keys=None, sort_dirs=None)
import_record(context, backup_service, backup_url)

Make the RPC call to import a volume backup.

Parameters:
  • context – running context
  • backup_service – backup service name
  • backup_url – backup description to be used by the backup driver
Raises:

InvalidBackup

Raises:

ServiceNotFound

Raises:

InvalidInput

reset_status(context, backup_id, status)

Make the RPC call to reset a volume backup’s status.

Call backup manager to execute backup status reset operation. :param context: running context :param backup_id: which backup’s status to be reset :parma status: backup’s status to be reset :raises: InvalidBackup

restore(context, backup_id, volume_id=None, name=None)

Make the RPC call to restore a volume backup.

update(context, backup_id, fields)
check_policy(context, action)

Previous topic

The cinder.api.views.versions Module

Next topic

The cinder.backup.chunkeddriver Module

This Page