cinder.backup.api module

Handles all requests relating to the volume backups service.

class API

Bases: cinder.db.base.Base

API for interacting with the volume backup manager.

create(context: cinder.context.RequestContext, name: Optional[str], description: Optional[str], volume_id: str, container: str, incremental: bool = False, availability_zone: Optional[str] = None, force: bool = False, snapshot_id: Optional[str] = None, metadata: Optional[dict] = None) cinder.objects.backup.Backup

Make the RPC call to create a volume backup.

delete(context: cinder.context.RequestContext, backup: cinder.objects.backup.Backup, force: bool = False) None

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: cinder.context.RequestContext, backup_id: str) dict

Make the RPC call to export a volume backup.

Call backup manager to execute backup export.

  • context – running context

  • backup_id – backup id to export


dictionary – a description of how to import the backup


contains ‘backup_url’ and ‘backup_service’



get(context: cinder.context.RequestContext, backup_id: str) cinder.objects.backup.Backup
get_all(context: cinder.context.RequestContext, search_opts: Optional[dict] = None, marker: Optional[str] = None, limit: Optional[int] = None, offset: Optional[int] = None, sort_keys: Optional[list[str]] = None, sort_dirs: Optional[list[str]] = None) cinder.objects.backup.BackupList
get_available_backup_service_host(host: str, az: str) str
import_record(context: cinder.context.RequestContext, backup_service: str, backup_url: str) cinder.objects.backup.Backup

Make the RPC call to import a volume backup.

  • context – running context

  • backup_service – backup service name

  • backup_url – backup description to be used by the backup driver

reset_status(context: cinder.context.RequestContext, backup_id: str, status: str) None

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 :param status: backup’s status to be reset :raises InvalidBackup:

restore(context: cinder.context.RequestContext, backup_id: str, volume_id: Optional[str] = None, name: Optional[str] = None) dict

Make the RPC call to restore a volume backup.

update(context: cinder.context.RequestContext, backup_id: str, fields: list) cinder.objects.service.Service