backuppolicy¶
Contents¶
-
Services
-
Messages
BackupPolicyService¶
BackupPolicyService serves and manages the backup policies.
GetBackupPolicy¶
rpc GetBackupPolicy(GetBackupPolicyRequest) BackupPolicy
Get API returns the backup policy for the given ID.
CreateBackupPolicy¶
rpc CreateBackupPolicy(CreateBackupPolicyRequest) BackupPolicy
Create API creates a backup policy for a Tenant (Organization).
UpdateBackupPolicyMeta¶
rpc UpdateBackupPolicyMeta(UpdateBackupPolicyMetaRequest) BackupPolicy
Update API updates a the meta data of a backup policy. (-- api-linter: core::0134::response-message-name=disabled aip.dev/not-precedent: We need to do this because we need to return the whole Schedule after the update. --) (-- api-linter: core::0136::http-method=disabled aip.dev/not-precedent: We need to do this because we are updating only the meta data of the schedule and not config. --)
ListBackupPolicies¶
rpc ListBackupPolicies(ListBackupPoliciesRequest) ListBackupPoliciesResponse
(-- api-linter: core::0132::http-body=disabled api-linter: core::0132::http-method=disabled aip.dev/not-precedent: We need to do this because we can't have advance filters as query params. --) List API lists all the backup policies for a Tenant (Organization).
DeleteBackupPolicy¶
rpc DeleteBackupPolicy(DeleteBackupPolicyRequest) .google.protobuf.Empty
Delete API deletes a backup policy.
Messages¶
BackupPolicy¶
Resource representing a backup policy.
Field | Type | Description |
---|---|---|
meta | public.portworx.common.v1.Meta | Metadata of the backup policy. |
config | Config | Desired configuration of the backup policy. |
Config¶
Desired configuration of the backup policy.
Field | Type | Description |
---|---|---|
schedule | repeated Schedule | Schedules defined for a policy. |
CreateBackupPolicyRequest¶
Request to create a backup policy.
Field | Type | Description |
---|---|---|
tenant_id | string | The parent Tenant (Organization) id under which schedule will be created. (-- api-linter: core::0133::request-unknown-fields=disabled aip.dev/not-precedent: We need this field for to support creation of the resource in the Tenant (Organization) context. --) |
backup_policy | BackupPolicy | Backup Policy configuration. |
DailyPolicy¶
Daily Policy.
Field | Type | Description |
---|---|---|
time | string | Time, when the policy should be triggered. Expected format is time. Eg 12:04PM or 12:04pm. (-- api-linter: core::0142::time-field-type=disabled aip.dev/not-precedent: We need to do this to take input in string format. --) |
DeleteBackupPolicyRequest¶
Request to delete a backup policy.
Field | Type | Description |
---|---|---|
id | string | ID of the backup policy. |
GetBackupPolicyRequest¶
Request to get a backup policy.
Field | Type | Description |
---|---|---|
id | string | ID of the schedule. |
IntervalPolicy¶
Interval Policy.
Field | Type | Description |
---|---|---|
minutes | int64 | Interval in minutes at which an action should be triggered. |
ListBackupPoliciesRequest¶
Request to list the backup policies for a Tenant (Organization).
Field | Type | Description |
---|---|---|
tenant_id | string | Tenant (Organization) ID for which the backup policies will be listed. |
pagination | public.portworx.common.v1.PageBasedPaginationRequest | Pagination metadata for listing backup policies. |
label_selector | public.portworx.common.v1.Selector | Provides the key in labels and associated values for which backup policy need to be listed. |
field_selector | public.portworx.common.v1.Selector | Field selector is used to filter backup policies based on the fields in the backup policy's proto message. |
infra_resource_selector | public.portworx.common.v1.ResourceSelector | Infra_resource_selector is used to filter backup policies based on the infra resources associated with the backup policy. Supported infra resource filters: PROJECT. |
sort | public.portworx.common.v1.Sort | Sorting details using which requested list of backup policies to be sorted. |
resp_data | public.portworx.common.v1.RespData | Response data flags for listing backup policies. |
ListBackupPoliciesResponse¶
Response of list backup policies.
Field | Type | Description |
---|---|---|
backup_policies | repeated BackupPolicy | The list of backup policies scoped to a Tenant (Organization). |
pagination | public.portworx.common.v1.PageBasedPaginationResponse | Pagination metadata for this response. (-- api-linter: core::0132::response-unknown-fields=disabled aip.dev/not-precedent: We need this field for pagination. --) |
MonthlyPolicy¶
Monthly Policy.
Field | Type | Description |
---|---|---|
date | int64 | Date of the month when the policy should be triggered. If a given date doesn't exist in a month it'll rollover to the next date of the month. For example if 31 is specified, it'll trigger on either 1st or 2nd March depending on if it is a leap year. (-- api-linter: core::0142::time-field-type=disabled aip.dev/not-precedent: We need to do this to take input in string format. --) |
time | string | Time, when the policy should be triggered. Expected format is time. Eg 12:04PM or 12:04pm. (-- api-linter: core::0142::time-field-type=disabled aip.dev/not-precedent: We need to do this to take input in string format. --) |
Schedule¶
A schedule for a backup policy.
Field | Type | Description |
---|---|---|
oneof Duration.interval_policy | IntervalPolicy | Interval Policy. |
oneof Duration.daily_policy | DailyPolicy | Daily Policy. |
oneof Duration.weekly_policy | WeeklyPolicy | Weekly Policy. |
oneof Duration.monthly_policy | MonthlyPolicy | Monthly Policy. |
oneof Duration.cron_expression | string | A cron expression is a string consisting of six or seven subexpressions (fields) that describe individual details of the schedule. |
incremental_count | int64 | Number of incremental snapshots to take before taking a full snapshot. |
retain | int64 | Number of objects to retain for the schedule type, default value is 10. |
UpdateBackupPolicyMetaRequest¶
Request to update the meta of a backup policy. (-- api-linter: core::0134::request-resource-required=disabled aip.dev/not-precedent: We need to do this because ScheduleMeta is being imported from the common meta. --)
Field | Type | Description |
---|---|---|
meta | public.portworx.common.v1.Meta | Metadata of the backup policy to be updated. (-- api-linter: core::0134::request-required-fields=disabled aip.dev/not-precedent: We really need this field to be required because meta data which needs to be updated has to be passed in the request. --) |
WeeklyPolicy¶
Weekly Policy.
Field | Type | Description |
---|---|---|
day | WeeklyPolicy.Weekday | day of Weekday |
time | string | Time, when the policy should be triggered. Expected format is time. Eg 12:04PM or 12:04pm. (-- api-linter: core::0142::time-field-type=disabled aip.dev/not-precedent: We need to do this to take input in string format. --) |
Enums¶
WeeklyPolicy.Weekday¶
Day of the week when the policy should be triggered. For example, sunday or sun.
Name | Number | Description |
---|---|---|
SUNDAY | 0 | (-- api-linter: core::0126::unspecified=disabled aip.dev/not-precedent: We need to do this because reasons. --) Sunday |
MONDAY | 1 | Monday |
TUESDAY | 2 | Tuesday |
WEDNESDAY | 3 | Wednesday |
THURSDAY | 4 | Thursday |
FRIDAY | 5 | Friday |
SATURDAY | 6 | Saturday |