cinder.backup.manager module¶
Backup manager manages volume backups.
Volume Backups are full copies of persistent volumes stored in a backup store e.g. an object store or any other backup store if and when support is added. They are usable without the original object being available. A volume backup can be restored to the original volume it was created from or any other available volume with a minimum size of the original volume. Volume backups can be created, restored, deleted and listed.
Related Flags
- backup_manager:
 The module name of a class derived from
manager.Manager(default:cinder.backup.manager.Manager).
- class BackupManager(*args, **kwargs)¶
 Bases:
SchedulerDependentManagerManages backup of block storage devices.
- RPC_API_VERSION = '2.4'¶
 
- check_support_to_force_delete(context)¶
 Check if the backup driver supports force delete operation.
- Parameters:
 context – running context
- continue_backup(context, backup, backup_device)¶
 This is the callback from the volume manager to continue.
- create_backup(context, backup)¶
 Create volume backups using configured backup service.
- delete_backup(context, backup)¶
 Delete volume backup from configured backup service.
- export_record(context, backup)¶
 Export all volume backup metadata details to allow clean import.
Export backup metadata so it could be re-imported into the database without any prerequisite in the backup database.
- Parameters:
 context – running context
backup – backup object to export
- Returns:
 backup_record - a description of how to import the backup
- Returns:
 contains ‘backup_url’ - how to import the backup, and
- Returns:
 ‘backup_service’ describing the needed driver.
- Raises:
 
- import_record(context, backup, backup_service, backup_url, backup_hosts)¶
 Import all volume backup metadata details to the backup db.
- Parameters:
 context – running context
backup – The new backup object for the import
backup_service – The needed backup driver for import
backup_url – An identifier string to locate the backup
backup_hosts – Potential hosts to execute the import
- Raises:
 
- init_host(**kwargs)¶
 Run initialization needed for a standalone service.
- is_working()¶
 Method indicating if service is working correctly.
This method is supposed to be overridden by subclasses and return if manager is working correctly.
- publish_service_capabilities(context)¶
 Collect driver status and then publish.
- reset()¶
 Method executed when SIGHUP is caught by the process.
We’re utilizing it to reset RPC API version pins to avoid restart of the service when rolling upgrade is completed.
- reset_status(context, backup, status)¶
 Reset volume backup status.
- Parameters:
 context – running context
backup – The backup object for reset status operation
status – The status to be set
- Raises:
 AttributeError –
- restore_backup(context, backup, volume_id, volume_is_new)¶
 Restore volume backups from configured backup service.
- Parameters:
 context – RequestContext for the restore operation
backup – Backup that we’re restoring
volume_id – The ID of the volume into which we’re restoring
volume_is_new – The volume does not have stale data, so sparse backups can be restored as such.
- setup_backup_backend(ctxt)¶
 
- target = <Target version=2.4>¶