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:
BackupDriver
DimensionData backup driver.
- Parameters:
key (
str
) – API key or username to used (required)secret (
str
) – Secret password to be used (required)secure (
bool
) – Whether to use HTTPS or HTTP. Note: Some providers only support HTTPS, and it is on by default.host (
str
) – Override hostname used for connections.port (
int
) – Override port used for connections.
- Returns:
None
- 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 setex_client (Instance of
DimensionDataBackupClient
orstr
) – Client of the job to cancel. Not necessary if job is specified. DimensionData only has 1 job per clientex_target (Instance of
BackupTarget
orstr
) – Target to cancel a job from. Not necessary if job is specified.
- Return type:
bool
- 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 Cloudtype (
BackupTargetType
) – Backup target type, only Virtual supportedextra (
dict
) – (optional) Extra attributes (driver specific).
- Return type:
Instance of
BackupTarget
- 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 backuptype (
BackupTargetType
) – Backup target type (Physical, Virtual, …).extra (
dict
) – (optional) Extra attributes (driver specific).
- Return type:
Instance of
BackupTarget
- 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 backuptype (
BackupTargetType
) – Backup target type (Physical, Virtual, …).extra (
dict
) – (optional) Extra attributes (driver specific).
- Return type:
Instance of
BackupTarget
- 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 dataextra (
dict
) – (optional) Extra attributes (driver specific).
- Return type:
Instance of
BackupTargetJob
- delete_target(target)[source]
Delete a backup target
- Parameters:
target (Instance of
BackupTarget
orstr
) – Backup target to delete- Return 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 dataclient (Instance of
DimensionDataBackupClientType
orstr
) – Client to add to the targetstorage_policy (Instance of
DimensionDataBackupStoragePolicy
orstr
) – The storage policy for the clientschedule_policy (Instance of
DimensionDataBackupSchedulePolicy
orstr
) – The schedule policy for the clienttrigger (
str
) – The notify trigger for the clientemail (
str
) – The notify email for the client
- Return type:
bool
- 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 for- Return 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 get- Return 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 for- Return 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 for- Return 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 for- Return 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 frombackup_client (
DimensionDataBackupClient
orstr
) – The backup client to remove
- Return type:
bool
- 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 dataid (Instance of
BackupTarget
) – Backup target with the backup data
- Return type:
BackupTargetJob
- 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 deletestart_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
- list_target_jobs(target)[source]
List the backup jobs on a target
- Parameters:
target (Instance of
BackupTarget
) – Backup target with the backup data- Return 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 deleterecovery_point (Instance of
BackupTarget
) – Backup target with the backup datapath (
str
) – The part of the recovery point to recover (optional)
- Return type:
Instance of
BackupTargetJob
- 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 datarecovery_point (Instance of
BackupTarget
) – Backup target with the backup datarecovery_target (Instance of
BackupTarget
) – Backup target with to recover the data topath (
str
) – The part of the recovery point to recover (optional)
- Return type:
Instance of
BackupTargetJob
- resume_target_job(target, job)[source]
Resume a suspended backup job on a target
- Parameters:
target (Instance of
BackupTarget
) – Backup target with the backup datajob (Instance of
BackupTargetJob
) – Backup target job to resume
- Return type:
bool
- 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 datajob (Instance of
BackupTargetJob
) – Backup target job to suspend
- Return type:
bool
- 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 updatename (
str
) – Name of the targetaddress (
str
) – Hostname, FQDN, IP, file path etc.extra (
dict
) – (optional) Extra attributes (driver specific).
- Return type:
Instance of
BackupTarget
- website = 'https://cloud.dimensiondata.com/'