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: str | None, description: str | None, volume_id: str, container: str, incremental: bool = False, availability_zone: str | None = None, force: bool = False, snapshot_id: str | None = None, metadata: dict | None = 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:
- get(context: RequestContext, backup_id: str) Backup ¶
- get_all(context: RequestContext, search_opts: dict | None = None, marker: str | None = None, limit: int | None = None, offset: int | None = None, sort_keys: list[str] | None = None, sort_dirs: list[str] | None = 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: str | None = None, name: str | None = None) dict ¶
Make the RPC call to restore a volume backup.
- update(context: RequestContext, backup_id: str, fields: list) Service ¶