openstack.block_storage.v2.backup¶
The Backup Class¶
The Backup
class inherits from Resource
.
- class openstack.block_storage.v2.backup.Backup(_synchronized=False, connection=None, **attrs)¶
Volume Backup
The base resource
- Parameters:
_synchronized (bool) – This is not intended to be used directly. See
new()
andexisting()
.connection (openstack.connection.Connection) – Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of
self._connection
in Resource code should protect itself with a check for None.
- resource_key = 'backup'¶
Singular form of key for resource.
- resources_key = 'backups'¶
Plural form of key for resource.
- base_path = '/backups'¶
The base part of the URI for this resource.
- allow_fetch = True¶
Allow get operation for this resource.
- allow_create = True¶
Allow create operation for this resource.
- allow_delete = True¶
Allow delete operation for this resource.
- allow_list = True¶
Allow list operation for this resource.
- availability_zone¶
Properties backup availability zone
- container¶
The container backup in
- created_at¶
The date and time when the resource was created.
- data_timestamp¶
data timestamp The time when the data on the volume was first saved. If it is a backup from volume, it will be the same as created_at for a backup. If it is a backup from a snapshot, it will be the same as created_at for the snapshot.
- description¶
backup description
- fail_reason¶
Backup fail reason
- force¶
Force backup
- has_dependent_backups¶
has_dependent_backups If this value is true, there are other backups depending on this backup.
- is_incremental¶
Indicates whether the backup mode is incremental. If this value is true, the backup mode is incremental. If this value is false, the backup mode is full.
- links¶
A list of links associated with this volume. Type: list
- name¶
backup name
- object_count¶
backup object count
- size¶
The size of the volume, in gibibytes (GiB).
- snapshot_id¶
The UUID of the source volume snapshot.
- status¶
backup status values: creating, available, deleting, error, restoring, error_restoring
- updated_at¶
The date and time when the resource was updated.
- volume_id¶
The UUID of the volume.
- create(session, prepend_key=True, base_path=None, **params)¶
Create a remote resource based on this instance.
- Parameters:
session (
Adapter
) – The session to use for making this request.prepend_key – A boolean indicating whether the resource_key should be prepended in a resource creation request. Default to True.
base_path (str) – Base part of the URI for creating resources, if different from
base_path
.params (dict) – Additional params to pass.
- Returns:
This
Resource
instance.- Raises:
MethodNotSupported
ifResource.allow_create
is not set toTrue
.
- restore(session, volume_id=None, name=None)¶
Restore current backup to volume
- Parameters:
session – openstack session
volume_id – The ID of the volume to restore the backup to.
name – The name for new volume creation to restore.
- Returns:
Updated backup instance
- force_delete(session)¶
Force backup deletion
- reset(session, status)¶
Reset the status of the backup