troveclient.v1.backups module

class troveclient.v1.backups.Backup(manager, info, loaded=False)

Bases: Resource

Backup is a resource used to hold backup information.

class troveclient.v1.backups.Backups(api)

Bases: ManagerWithFind

Manage Backups information.

backup_create_workflow = 'trove.backup_create'
create(name, instance, description=None, parent_id=None, incremental=False, swift_container=None, restore_from=None, restore_ds_version=None, restore_size=None)

Create or restore a new backup.

Parameters:
  • name – name for backup.

  • instance – instance to backup.

  • description – (optional).

  • parent_id – base for incremental backup (optional).

  • incremental – flag to indicate incremental backup based on last backup

  • swift_container – Swift container name.

  • restore_from – The original backup data location, typically this is a Swift object URL.

  • restore_ds_version – ID of the local datastore version corresponding to the original backup.

  • restore_size – The original backup size.

Returns:

Backups

delete(backup)

Delete the specified backup.

Parameters:

backup – The backup to delete

execution_delete(execution, mistral_client=None)

Remove a given schedule execution.

Parameters:

id – id of execution to remove.

execution_list(schedule, mistral_client=None, marker='', limit=None)

Get a list of all executions of a scheduled backup.

Param:

schedule for which to list executions.

Return type:

list of ScheduleExecution.

get(backup)

Get a specific backup.

Return type:

Backups

list(limit=None, marker=None, datastore=None, instance_id=None, all_projects=False, project_id=None)

Get a list of all backups.

resource_class

alias of Backup

schedule_create(instance, pattern, name, description=None, incremental=None, mistral_client=None)

Create a new schedule to backup the given instance.

Parameters:
  • instance – instance to backup.

  • name – name for backup.

  • description – (optional).

  • incremental – flag for incremental backup (optional).

Param:

pattern: cron pattern for schedule.

Returns:

Backups

schedule_delete(schedule, mistral_client=None)

Remove a given backup schedule.

Parameters:

schedule – schedule to delete.

schedule_list(instance, mistral_client=None)

Get a list of all backup schedules for an instance.

Param:

instance for which to list schedules.

Return type:

list of Schedule.

schedule_show(schedule, mistral_client=None)

Get details of a backup schedule.

Param:

schedule to show.

Return type:

Schedule.

class troveclient.v1.backups.Schedule(manager, info, loaded=False)

Bases: Resource

Schedule is a resource used to hold information about scheduled backups.

class troveclient.v1.backups.ScheduleExecution(manager, info, loaded=False)

Bases: Resource

ScheduleExecution is a resource used to hold information about the execution of a scheduled backup.