models.backup_policy_proto module

class models.backup_policy_proto.BackupPolicyProto(continuous_schedule=None, daily_schedule=None, monthly_schedule=None, name=None, num_days_to_keep=None, num_retries=None, one_off_schedule=None, periodicity=None, retry_delay_mins=None, schedule_end=None, start_window_interval_mins=None, truncate_logs=None)[source]

Bases: object

Implementation of the ‘BackupPolicyProto’ model.

If a backup does not get a chance to when it’s due (either due to the system being busy or a conflict with another instance of the same job), the backup will still be run when the conflicts go away. But, if there are multiple instances of the same job that are due to be run, only the latest instance would be run.

Attributes:
continuous_schedule (BackupPolicyProtoContinuousSchedule): TODO: type

description here.

daily_schedule (BackupPolicyProtoDailySchedule): The daily schedule

encompasses weekly schedules as well. This has been done so there is only one way of specifying a schedule (backing up daily is the same as backing up weekly, but on all days of the week).

monthly_schedule (BackupPolicyProtoMonthlySchedule): TODO: type

description here.

name (string): A backup schedule can have an optional name. num_days_to_keep (long|int): Specifies how to determine the expiration

time for snapshots created by a backup run. The snapshots will be marked as expiring (i.e., eligible to be garbage collected) in ‘num_days_to_keep’ days from when the snapshots were created.

num_retries (int): The number of retries to perform (for retryable

errors) before giving up.

one_off_schedule (BackupPolicyProtoOneOffSchedule): TODO: type

description here.

periodicity (int): Determines how often the job should be run. retry_delay_mins (int): The number of minutes to wait before retrying

a failed job.

schedule_end (BackupPolicyProtoScheduleEnd): TODO: type description

here.

start_window_interval_mins (int): This field determines the amount of

time (in minutes) after which a scheduled job will not be started. For example, if a job is scheduled to be run every Sunday at 5am, and this field is set to 30 minutes, but the job was unable to start by 5:30am on a Sunday due to other conflicts (say too many other jobs were already running), Magneto will not attempt to start the job until the next scheduled time (on the following Sunday). If this field is not set, the interval will be determined by the Magneto flag –magneto_master_default_start_window_interval_mins.

truncate_logs (bool): Whether to truncate logs after a backup run.

This is currently only relevant for full or incremental backups in a SQL environment.

classmethod from_dictionary(dictionary)[source]

Creates an instance of this model from a dictionary

Args:

dictionary (dictionary): A dictionary representation of the object as obtained from the deserialization of the server’s response. The keys MUST match property names in the API description.

Returns:

object: An instance of this structure class.