The cinder.interface.backup_chunked_driver Module

Backup driver with ‘chunked’ backup operations.

class BackupChunkedDriver

Bases: cinder.interface.backup_driver.BackupDriver

Backup driver that supports ‘chunked’ backups.

delete_object(container, object_name)

Delete object from container.

Parameters:
  • container – The container to modify.
  • object_name – The object name delete.
get_container_entries(container, prefix)

Get container entry names.

Parameters:
  • container – The container from which to get entries.
  • prefix – The prefix used to match entries.
get_extra_metadata(backup, volume)

Return extra metadata to use in prepare_backup.

This method allows for collection of extra metadata in prepare_backup() which will be passed to get_object_reader() and get_object_writer(). Subclass extensions can use this extra information to optimize data transfers. Return a json serializable object.

get_object_reader(container, object_name, extra_metadata=None)

Returns a reader object for the backed up chunk.

Parameters:
  • container – The container to read from.
  • object_name – The object name to read.
  • extra_metadata – Extra metadata to be included.
get_object_writer(container, object_name, extra_metadata=None)

Returns a writer which stores the chunk data in backup repository.

Parameters:
  • container – The container to write to.
  • object_name – The object name to write.
  • extra_metadata – Extra metadata to be included.
Returns:

A context handler that can be used in a “with” context.

put_container(container)

Create the container if needed. No failure if it pre-exists.

Parameters:container – The container to write into.
update_container_name(backup, container)

Allows sub-classes to override container name.

This method exists so that sub-classes can override the container name as it comes in to the driver in the backup object. Implementations should return None if no change to the container name is desired.

Previous topic

The cinder.image.image_utils Module

Next topic

The cinder.interface.backup_driver Module

This Page