cinder.backup.api module

cinder.backup.api module

Handles all requests relating to the volume backups service.

class API

Bases: Base

API for interacting with the volume backup manager.

create(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) Backup

Make the RPC call to create a volume backup.

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

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: RequestContext, backup_id: str) Backup
get_all(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) BackupList
get_available_backup_service_host(host: str, az: str) str
import_record(context: RequestContext, backup_service: str, backup_url: str) Backup

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:
reset_status(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: 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: RequestContext, backup_id: str, fields: list) Service
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.