cinder.backup.drivers.posix
Module¶Implementation of a backup service that uses a posix filesystem as the backend.
PosixBackupDriver
(context, db=None, backup_path=None)¶Bases: cinder.backup.chunkeddriver.ChunkedBackupDriver
Provides backup, restore and delete using a Posix file system.
delete_object
(container, object_name)¶Delete object from container.
get_container_entries
(container, prefix)¶Get container entry names.
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.
The object reader methods must not have any logging calls, as eventlet has a bug (https://github.com/eventlet/eventlet/issues/432) that would result in failures.
get_object_writer
(container, object_name, extra_metadata=None)¶Returns a writer object which stores the chunk data in backup repository.
The object returned should be a context handler that can be used in a “with” context.
The object writer methods must not have any logging calls, as eventlet has a bug (https://github.com/eventlet/eventlet/issues/432) that would result in failures.
put_container
(container)¶Create the container if needed. No failure if it pre-exists.
update_container_name
(backup, container)¶Allow 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.
get_backup_driver
(context)¶Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.