libcloud.backup.drivers package¶
Submodules¶
libcloud.backup.drivers.dimensiondata module¶
-
class
libcloud.backup.drivers.dimensiondata.
DimensionDataBackupDriver
(key, secret=None, secure=True, host=None, port=None, api_version=None, region='dd-na', **kwargs)[source]¶ Bases:
libcloud.backup.base.BackupDriver
DimensionData backup driver.
-
api_version
= 1.0¶
-
cancel_target_job
(job, ex_client=None, ex_target=None)[source]¶ Cancel a backup job on a target
Parameters: - job (Instance of
BackupTargetJob
orNone
) – Backup target job to cancel. If it isNone
ex_client and ex_target must be set - ex_client (Instance of
DimensionDataBackupClient
orstr
) – Client of the job to cancel. Not necessary if job is specified. DimensionData only has 1 job per client - ex_target (Instance of
BackupTarget
orstr
) – Target to cancel a job from. Not necessary if job is specified.
Return type: bool
- job (Instance of
-
connectionCls
¶ alias of
DimensionDataConnection
-
create_target
(name, address, type='Virtual', extra=None)[source]¶ Creates a new backup target
Parameters: - name (
str
) – Name of the target (not used) - address (
str
) – The ID of the node in Dimension Data Cloud - type (
BackupTargetType
) – Backup target type, only Virtual supported - extra (
dict
) – (optional) Extra attributes (driver specific).
Return type: Instance of
BackupTarget
- name (
-
create_target_from_container
(container, type='Object', extra=None)[source]¶ Creates a new backup target from an existing storage container
Parameters: - node (
Container
) – The Container to backup - type (
BackupTargetType
) – Backup target type (Physical, Virtual, …). - extra (
dict
) – (optional) Extra attributes (driver specific).
Return type: Instance of
BackupTarget
- node (
-
create_target_from_node
(node, type='Virtual', extra=None)[source]¶ Creates a new backup target from an existing node
Parameters: - node (
Node
) – The Node to backup - type (
BackupTargetType
) – Backup target type (Physical, Virtual, …). - extra (
dict
) – (optional) Extra attributes (driver specific).
Return type: Instance of
BackupTarget
- node (
-
create_target_job
(target, extra=None)[source]¶ Create a new backup job on a target
Parameters: - target (Instance of
BackupTarget
) – Backup target with the backup data - extra (
dict
) – (optional) Extra attributes (driver specific).
Return type: Instance of
BackupTargetJob
- target (Instance of
-
delete_target
(target)[source]¶ Delete a backup target
Parameters: target (Instance of BackupTarget
orstr
) – Backup target to deleteReturn type: bool
-
ex_add_client_to_target
(target, client_type, storage_policy, schedule_policy, trigger, email)[source]¶ Add a client to a target
Parameters: - target (Instance of
BackupTarget
orstr
) – Backup target with the backup data - client (Instance of
DimensionDataBackupClientType
orstr
) – Client to add to the target - storage_policy (Instance of
DimensionDataBackupStoragePolicy
orstr
) – The storage policy for the client - schedule_policy (Instance of
DimensionDataBackupSchedulePolicy
orstr
) – The schedule policy for the client - trigger (
str
) – The notify trigger for the client - email (
str
) – The notify email for the client
Return type: bool
- target (Instance of
-
ex_get_backup_details_for_target
(target)[source]¶ Returns a backup details object for a target
Parameters: target ( BackupTarget
orstr
) – The backup target to get details forReturn type: DimensionDataBackupDetails
-
ex_get_target_by_id
(id)[source]¶ Get a target by server id
Parameters: id ( str
) – The id of the target you want to getReturn type: BackupTarget
-
ex_list_available_client_types
(target)[source]¶ Returns a list of available backup client types
Parameters: target ( BackupTarget
orstr
) – The backup target to list available types forReturn type: list
ofDimensionDataBackupClientType
-
ex_list_available_schedule_policies
(target)[source]¶ Returns a list of available backup schedule policies
Parameters: target ( BackupTarget
orstr
) – The backup target to list available policies forReturn type: list
ofDimensionDataBackupSchedulePolicy
-
ex_list_available_storage_policies
(target)[source]¶ Returns a list of available backup storage policies
Parameters: target ( BackupTarget
orstr
) – The backup target to list available policies forReturn type: list
ofDimensionDataBackupStoragePolicy
-
ex_remove_client_from_target
(target, backup_client)[source]¶ Removes a client from a backup target
Parameters: - target (
BackupTarget
orstr
) – The backup target to remove the client from - backup_client (
DimensionDataBackupClient
orstr
) – The backup client to remove
Return type: bool
- target (
-
get_supported_target_types
()[source]¶ Get a list of backup target types this driver supports
Returns: list
of :class:BackupTargetType
-
get_target_job
(target, id)[source]¶ Get a specific backup job by ID
Parameters: - target (Instance of
BackupTarget
) – Backup target with the backup data - id (Instance of
BackupTarget
) – Backup target with the backup data
Return type: BackupTargetJob
- target (Instance of
-
list_recovery_points
(target, start_date=None, end_date=None)[source]¶ List the recovery points available for a target
Parameters: - target (Instance of
BackupTarget
) – Backup target to delete - start_date (
datetime.datetime
) – The start date to show jobs between (optional) - end_date (
datetime.datetime`
) – The end date to show jobs between (optional)
Return type: list
ofBackupTargetRecoveryPoint
- target (Instance of
-
list_target_jobs
(target)[source]¶ List the backup jobs on a target
Parameters: target (Instance of BackupTarget
) – Backup target with the backup dataReturn type: list
ofBackupTargetJob
-
name
= 'Dimension Data Backup'¶
-
network_domain_id
= None¶
-
recover_target
(target, recovery_point, path=None)[source]¶ Recover a backup target to a recovery point
Parameters: - target (Instance of
BackupTarget
) – Backup target to delete - recovery_point (Instance of
BackupTarget
) – Backup target with the backup data - path (
str
) – The part of the recovery point to recover (optional)
Return type: Instance of
BackupTargetJob
- target (Instance of
-
recover_target_out_of_place
(target, recovery_point, recovery_target, path=None)[source]¶ Recover a backup target to a recovery point out-of-place
Parameters: - target (Instance of
BackupTarget
) – Backup target with the backup data - recovery_point (Instance of
BackupTarget
) – Backup target with the backup data - recovery_target (Instance of
BackupTarget
) – Backup target with to recover the data to - path (
str
) – The part of the recovery point to recover (optional)
Return type: Instance of
BackupTargetJob
- target (Instance of
-
resume_target_job
(target, job)[source]¶ Resume a suspended backup job on a target
Parameters: - target (Instance of
BackupTarget
) – Backup target with the backup data - job (Instance of
BackupTargetJob
) – Backup target job to resume
Return type: bool
- target (Instance of
-
selected_region
= None¶
-
suspend_target_job
(target, job)[source]¶ Suspend a running backup job on a target
Parameters: - target (Instance of
BackupTarget
) – Backup target with the backup data - job (Instance of
BackupTargetJob
) – Backup target job to suspend
Return type: bool
- target (Instance of
-
type
= 'dimensiondata'¶
-
update_target
(target, name=None, address=None, extra=None)[source]¶ Update the properties of a backup target, only changing the serviceplan is supported.
Parameters: - target (Instance of
BackupTarget
orstr
) – Backup target to update - name (
str
) – Name of the target - address (
str
) – Hostname, FQDN, IP, file path etc. - extra (
dict
) – (optional) Extra attributes (driver specific).
Return type: Instance of
BackupTarget
- target (Instance of
-
website
= 'https://cloud.dimensiondata.com/'¶
-
libcloud.backup.drivers.dummy module¶
-
class
libcloud.backup.drivers.dummy.
DummyBackupDriver
(api_key, api_secret)[source]¶ Bases:
libcloud.backup.base.BackupDriver
Dummy Backup driver.
>>> from libcloud.backup.drivers.dummy import DummyBackupDriver >>> driver = DummyBackupDriver('key', 'secret') >>> driver.name 'Dummy Backup Provider'
Parameters: - api_key (
str
) – API key or username to used (required) - api_secret (
str
) – Secret password to be used (required)
Return type: None
-
name
= 'Dummy Backup Provider'¶
-
website
= 'http://example.com'¶
- api_key (
libcloud.backup.drivers.ebs module¶
-
class
libcloud.backup.drivers.ebs.
EBSBackupDriver
(access_id, secret, region)[source]¶ Bases:
libcloud.backup.base.BackupDriver
-
cancel_target_job
(job)[source]¶ Cancel a backup job on a target
Parameters: job (Instance of BackupTargetJob
) – Backup target job to cancelReturn type: bool
-
connectionCls
¶ alias of
EBSConnection
-
create_target
(name, address, type='Volume', extra=None)[source]¶ Creates a new backup target
Parameters: - name (
str
) – Name of the target - address (
str
) – The volume ID. - type (
BackupTargetType
) – Backup target type (Physical, Virtual, …). - extra (
dict
) – (optional) Extra attributes (driver specific).
Return type: Instance of
BackupTarget
- name (
-
create_target_from_container
(container, type='Object', extra=None)[source]¶ Creates a new backup target from an existing storage container
Parameters: - node (
Container
) – The Container to backup - type (
BackupTargetType
) – Backup target type (Physical, Virtual, …). - extra (
dict
) – (optional) Extra attributes (driver specific).
Return type: Instance of
BackupTarget
- node (
-
create_target_from_node
(node, type='Virtual', extra=None)[source]¶ Creates a new backup target from an existing node
Parameters: - node (
Node
) – The Node to backup - type (
BackupTargetType
) – Backup target type (Physical, Virtual, …). - extra (
dict
) – (optional) Extra attributes (driver specific).
Return type: Instance of
BackupTarget
- node (
-
create_target_job
(target, extra=None)[source]¶ Create a new backup job on a target
Parameters: - target (Instance of
BackupTarget
) – Backup target with the backup data - extra (
dict
) – (optional) Extra attributes (driver specific).
Return type: Instance of
BackupTargetJob
- target (Instance of
-
delete_target
(target)[source]¶ Delete a backup target
Parameters: target (Instance of BackupTarget
) – Backup target to delete
-
get_supported_target_types
()[source]¶ Get a list of backup target types this driver supports
Returns: list
of :class:BackupTargetType
-
get_target_job
(target, id)[source]¶ Get a specific backup job by ID
Parameters: - target (Instance of
BackupTarget
) – Backup target with the backup data - id (Instance of
BackupTarget
) – Backup target with the backup data
Return type: BackupTargetJob
- target (Instance of
-
list_recovery_points
(target, start_date=None, end_date=None)[source]¶ List the recovery points available for a target
Parameters: - target (Instance of
BackupTarget
) – Backup target to delete - start_date (
datetime.datetime
) – The start date to show jobs between (optional) - end_date (
datetime.datetime`
) – The end date to show jobs between (optional)
Return type: list
ofBackupTargetRecoveryPoint
- target (Instance of
-
list_target_jobs
(target)[source]¶ List the backup jobs on a target
Parameters: target (Instance of BackupTarget
) – Backup target with the backup dataReturn type: list
ofBackupTargetJob
-
name
= 'Amazon EBS Backup Driver'¶
-
recover_target
(target, recovery_point, path=None)[source]¶ Recover a backup target to a recovery point
Parameters: - target (Instance of
BackupTarget
) – Backup target to delete - recovery_point (Instance of
BackupTarget
) – Backup target with the backup data - path (
str
) – The part of the recovery point to recover (optional)
Return type: Instance of
BackupTargetJob
- target (Instance of
-
recover_target_out_of_place
(target, recovery_point, recovery_target, path=None)[source]¶ Recover a backup target to a recovery point out-of-place
Parameters: - target (Instance of
BackupTarget
) – Backup target with the backup data - recovery_point (Instance of
BackupTarget
) – Backup target with the backup data - recovery_target (Instance of
BackupTarget
) – Backup target with to recover the data to - path (
str
) – The part of the recovery point to recover (optional)
Return type: Instance of
BackupTargetJob
- target (Instance of
-
resume_target_job
(job)[source]¶ Resume a suspended backup job on a target
Parameters: job (Instance of BackupTargetJob
) – Backup target job to resumeReturn type: bool
-
suspend_target_job
(job)[source]¶ Suspend a running backup job on a target
Parameters: job (Instance of BackupTargetJob
) – Backup target job to suspendReturn type: bool
-
update_target
(target, name, address, extra)[source]¶ Update the properties of a backup target
Parameters: - target (Instance of
BackupTarget
) – Backup target to update - name (
str
) – Name of the target - address (
str
) – Hostname, FQDN, IP, file path etc. - extra (
dict
) – (optional) Extra attributes (driver specific).
Return type: Instance of
BackupTarget
- target (Instance of
-
website
= 'http://aws.amazon.com/ebs/'¶
-
libcloud.backup.drivers.gce module¶
-
class
libcloud.backup.drivers.gce.
GCEBackupDriver
(user_id, key=None, project=None, auth_type=None, scopes=None, credential_file=None, **kwargs)[source]¶ Bases:
libcloud.backup.base.BackupDriver
Parameters: - user_id (
str
) – The email address (for service accounts) or Client ID (for installed apps) to be used for authentication. - key (
str
) – The RSA Key (for service accounts) or file path containing key or Client Secret (for installed apps) to be used for authentication. - project (
str
) – Your GCE project name. (required) - auth_type (
str
) – Accepted values are “SA” or “IA” or “GCE” (“Service Account” or “Installed Application” or “GCE” if libcloud is being used on a GCE instance with service account enabled). If not supplied, auth_type will be guessed based on value of user_id or if the code is being executed in a GCE instance. - scopes (
list
) – List of authorization URLs. Default is empty and grants read/write to Compute, Storage, DNS. - credential_file (
str
) – Path to file for caching authentication information used by GCEConnection.
-
cancel_target_job
(target, job)[source]¶ Cancel a backup job on a target
Parameters: - target (Instance of
BackupTarget
) – Backup target with the backup data - job (Instance of
BackupTargetJob
) – Backup target job to cancel
Return type: bool
- target (Instance of
-
connectionCls
¶ alias of
GCEConnection
-
create_target
(name, address, type='Volume', extra=None)[source]¶ Creates a new backup target
Parameters: - name (
str
) – Name of the target - address (
str
) – The volume ID. - type (
BackupTargetType
) – Backup target type (Physical, Virtual, …). - extra (
dict
) – (optional) Extra attributes (driver specific).
Return type: Instance of
BackupTarget
- name (
-
create_target_from_container
(container, type='Object', extra=None)[source]¶ Creates a new backup target from an existing storage container
Parameters: - node (
Container
) – The Container to backup - type (
BackupTargetType
) – Backup target type (Physical, Virtual, …). - extra (
dict
) – (optional) Extra attributes (driver specific).
Return type: Instance of
BackupTarget
- node (
-
create_target_from_node
(node, type='Virtual', extra=None)[source]¶ Creates a new backup target from an existing node
Parameters: - node (
Node
) – The Node to backup - type (
BackupTargetType
) – Backup target type (Physical, Virtual, …). - extra (
dict
) – (optional) Extra attributes (driver specific).
Return type: Instance of
BackupTarget
- node (
-
create_target_job
(target, extra=None)[source]¶ Create a new backup job on a target
Parameters: - target (Instance of
BackupTarget
) – Backup target with the backup data - extra (
dict
) – (optional) Extra attributes (driver specific).
Return type: Instance of
BackupTargetJob
- target (Instance of
-
delete_target
(target)[source]¶ Delete a backup target
Parameters: target (Instance of BackupTarget
) – Backup target to delete
-
get_supported_target_types
()[source]¶ Get a list of backup target types this driver supports
Returns: list
of :class:BackupTargetType
-
get_target_job
(target, id)[source]¶ Get a specific backup job by ID
Parameters: - target (Instance of
BackupTarget
) – Backup target with the backup data - id (Instance of
BackupTarget
) – Backup target with the backup data
Return type: BackupTargetJob
- target (Instance of
-
list_recovery_points
(target, start_date=None, end_date=None)[source]¶ List the recovery points available for a target
Parameters: - target (Instance of
BackupTarget
) – Backup target to delete - start_date (
datetime.datetime
) – The start date to show jobs between (optional) - end_date (
datetime.datetime`
) – The end date to show jobs between (optional)
Return type: list
ofBackupTargetRecoveryPoint
- target (Instance of
-
list_target_jobs
(target)[source]¶ List the backup jobs on a target
Parameters: target (Instance of BackupTarget
) – Backup target with the backup dataReturn type: list
ofBackupTargetJob
-
name
= 'Google Compute Engine Backup Driver'¶
-
recover_target
(target, recovery_point, path=None)[source]¶ Recover a backup target to a recovery point
Parameters: - target (Instance of
BackupTarget
) – Backup target to delete - recovery_point (Instance of
BackupTarget
) – Backup target with the backup data - path (
str
) – The part of the recovery point to recover (optional)
Return type: Instance of
BackupTargetJob
- target (Instance of
-
recover_target_out_of_place
(target, recovery_point, recovery_target, path=None)[source]¶ Recover a backup target to a recovery point out-of-place
Parameters: - target (Instance of
BackupTarget
) – Backup target with the backup data - recovery_point (Instance of
BackupTarget
) – Backup target with the backup data - recovery_target (Instance of
BackupTarget
) – Backup target with to recover the data to - path (
str
) – The part of the recovery point to recover (optional)
Return type: Instance of
BackupTargetJob
- target (Instance of
-
resume_target_job
(target, job)[source]¶ Resume a suspended backup job on a target
Parameters: - target (Instance of
BackupTarget
) – Backup target with the backup data - job (Instance of
BackupTargetJob
) – Backup target job to resume
Return type: bool
- target (Instance of
-
suspend_target_job
(target, job)[source]¶ Suspend a running backup job on a target
Parameters: - target (Instance of
BackupTarget
) – Backup target with the backup data - job (Instance of
BackupTargetJob
) – Backup target job to suspend
Return type: bool
- target (Instance of
-
update_target
(target, name, address, extra)[source]¶ Update the properties of a backup target
Parameters: - target (Instance of
BackupTarget
) – Backup target to update - name (
str
) – Name of the target - address (
str
) – Hostname, FQDN, IP, file path etc. - extra (
dict
) – (optional) Extra attributes (driver specific).
Return type: Instance of
BackupTarget
- target (Instance of
-
website
= 'http://cloud.google.com/'¶
- user_id (