The cinder.backup.drivers.google Module

The cinder.backup.drivers.google Module

Implementation of a backup service using Google Cloud Storage(GCS)

Google Cloud Storage json apis are used for backup operations. Authentication and authorization are based on OAuth2.0. Server-centric flow is used for authentication.

class GoogleBackupDriver(context, db=None)

Bases: cinder.backup.chunkeddriver.ChunkedBackupDriver

Provides backup, restore and delete of backup objects within GCS.

check_for_setup_error()

Method for checking if backup backend is successfully installed.

delete_object(*args, **kwargs)
get_container_entries(*args, **kwargs)
get_extra_metadata(backup, volume)

GCS driver does not use any extra metadata.

get_gcs_proxy_info()
get_object_reader(bucket, object_name, extra_metadata=None)

Return reader object.

Returns a reader object that retrieves a chunk of backed-up volume data from a GCS object store.

get_object_writer(bucket, object_name, extra_metadata=None)

Return a writer object.

Returns a writer object that stores a chunk of volume data in a GCS object store.

put_container(*args, **kwargs)
update_container_name(backup, bucket)

Use the bucket name as provided - don’t update.

class GoogleMediaIoBaseDownload(fd, request, chunksize=524288)

Bases: googleapiclient.http.MediaIoBaseDownload

next_chunk(num_retries=None)

Get the next chunk of the download.

Args:
num_retries: Integer, number of times to retry with randomized
exponential backoff. If all retries fail, the raised HttpError represents the last request. If zero (default), we attempt the request only once.
Returns:
(status, done): (MediaDownloadStatus, boolean)
The value of ‘done’ will be True when the media has been fully downloaded.
Raises:
googleapiclient.errors.HttpError if the response was not a 2xx. httplib2.HttpLib2Error if a transport error has occured.
class GoogleObjectReader(bucket, object_name, conn, reader_chunk_size, num_retries)

Bases: object

read(*args, **kwargs)
class GoogleObjectWriter(bucket, object_name, conn, writer_chunk_size, num_retries, resumable)

Bases: object

close(*args, **kwargs)
write(data)
gcs_logger(func)
get_backup_driver(context)
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.