Backup API Reference
Packages:
dataprotection.kubeblocks.io/v1alpha1
Resource Types:
ActionSet
ActionSet is the Schema for the actionsets API
Field | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
| ||||||||||
|
| ||||||||||
Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of the
| ||||||||||
ActionSetSpec |
| ||||||||||
ActionSetStatus |
Backup
Backup is the Schema for the backups API.
Field | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
| ||||||||||
|
| ||||||||||
Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of the
| ||||||||||
BackupSpec |
| ||||||||||
BackupStatus |
BackupPolicy
BackupPolicy is the Schema for the backuppolicies API.
Field | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| ||||||||||||||||
|
| ||||||||||||||||
Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of the
| ||||||||||||||||
BackupPolicySpec |
| ||||||||||||||||
BackupPolicyStatus |
BackupRepo
BackupRepo is a repository for storing backup data.
Field | Description | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| ||||||||||||||
|
| ||||||||||||||
Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of the
| ||||||||||||||
BackupRepoSpec |
| ||||||||||||||
BackupRepoStatus |
BackupSchedule
BackupSchedule is the Schema for the backupschedules API.
Field | Description | ||||||
---|---|---|---|---|---|---|---|
|
| ||||||
|
| ||||||
Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of the
| ||||||
BackupScheduleSpec |
| ||||||
BackupScheduleStatus |
Restore
Restore is the Schema for the restores API
Field | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| ||||||||||||||||||
|
| ||||||||||||||||||
Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of the
| ||||||||||||||||||
RestoreSpec |
| ||||||||||||||||||
RestoreStatus |
StorageProvider
StorageProvider comprises specifications that provide guidance on accessing remote storage.
Currently the supported access methods are via a dedicated CSI driver or the datasafed
tool.
In case of CSI driver, the specification expounds on provisioning PVCs for that driver.
As for the datasafed
tool, the specification provides insights on generating the necessary
configuration file.
Field | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| ||||||||||||
|
| ||||||||||||
Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of the
| ||||||||||||
StorageProviderSpec |
| ||||||||||||
StorageProviderStatus |
AccessMethod
(string
alias)
(Appears on:BackupRepoSpec)
AccessMethod represents an enumeration type that outlines
how the BackupRepo
can be accessed.
Value | Description |
---|---|
"Mount" | AccessMethodMount suggests that the storage is mounted locally which allows for remote files to be accessed akin to local ones. |
"Tool" | AccessMethodTool indicates the utilization of a command-line tool for accessing the storage. |
ActionErrorMode
(string
alias)
(Appears on:ExecActionSpec, JobActionSpec)
ActionErrorMode defines how to handle an error from an action. Currently, only the Fail mode is supported, but the Continue mode will be supported in the future.
Value | Description |
---|---|
"Continue" | ActionErrorModeContinue signifies that an error from an action is acceptable and can be ignored. |
"Fail" | ActionErrorModeFail signifies that an error from an action is problematic and should be treated as a failure. |
ActionPhase
(string
alias)
(Appears on:ActionStatus)
Value | Description |
---|---|
"Completed" | ActionPhaseCompleted means the action has run successfully without errors. |
"Failed" | ActionPhaseFailed means the action ran but encountered an error that |
"New" | ActionPhaseNew means the action has been created but not yet processed by the BackupController. |
"Running" | ActionPhaseRunning means the action is currently executing. |
ActionSetSpec
(Appears on:ActionSet)
ActionSetSpec defines the desired state of ActionSet
Field | Description |
---|---|
BackupType | Specifies the backup type. Supported values include:
Continuous backup is essential for implementing Point-in-Time Recovery (PITR). |
[]Kubernetes core/v1.EnvVar | (Optional) Specifies a list of environment variables to be set in the container. |
[]Kubernetes core/v1.EnvFromSource | (Optional) Specifies a list of sources to populate environment variables in the container. The keys within a source must be a C_IDENTIFIER. Any invalid keys will be reported as an event when the container starts. If a key exists in multiple sources, the value from the last source will take precedence. Any values defined by an Env with a duplicate key will take precedence. This field cannot be updated. |
BackupActionSpec | (Optional) Specifies the backup action. |
RestoreActionSpec | (Optional) Specifies the restore action. |
ActionSetStatus
(Appears on:ActionSet)
ActionSetStatus defines the observed state of ActionSet
Field | Description |
---|---|
Phase | (Optional) Indicates the phase of the ActionSet. This can be either ‘Available’ or ‘Unavailable’. |
string | (Optional) Provides a human-readable explanation detailing the reason for the current phase of the ActionSet. |
int64 | (Optional) Represents the generation number that has been observed by the controller. |
ActionSpec
(Appears on:BackupActionSpec, RestoreActionSpec)
ActionSpec defines an action that should be executed. Only one of the fields may be set.
Field | Description |
---|---|
ExecActionSpec | (Optional) Specifies that the action should be executed using the pod’s exec API within a container. |
JobActionSpec | (Optional) Specifies that the action should be executed by a Kubernetes Job. |
ActionStatus
(Appears on:BackupStatus)
Field | Description |
---|---|
string | (Optional) The name of the action. |
string | Records the target pod name which has been backed up. |
ActionPhase | (Optional) The current phase of the action. |
Kubernetes meta/v1.Time | (Optional) Records the time an action was started. |
Kubernetes meta/v1.Time | (Optional) Records the time an action was completed. |
string | (Optional) An error that caused the action to fail. |
ActionType | (Optional) The type of the action. |
int32 | (Optional) Available replicas for statefulSet action. |
Kubernetes core/v1.ObjectReference | (Optional) The object reference for the action. |
string | (Optional) The total size of backed up data size. A string with capacity units in the format of “1Gi”, “1Mi”, “1Ki”. If no capacity unit is specified, it is assumed to be in bytes. |
BackupTimeRange | (Optional) Records the time range of backed up data, for PITR, this is the time range of recoverable data. |
[]VolumeSnapshotStatus | (Optional) Records the volume snapshot status for the action. |
ActionType
(string
alias)
(Appears on:ActionStatus)
Value | Description |
---|---|
"Job" | |
"" | |
"StatefulSet" |
BackupActionSpec
(Appears on:ActionSetSpec)
Field | Description |
---|---|
BackupDataActionSpec | Represents the action to be performed for backing up data. |
[]ActionSpec | (Optional) Represents a set of actions that should be executed before the backup process begins. |
[]ActionSpec | (Optional) Represents a set of actions that should be executed after the backup process has completed. |
BaseJobActionSpec | (Optional) Represents a custom deletion action that can be executed before the built-in deletion action. Note: The preDelete action job will ignore the env/envFrom. |
BackupDataActionSpec
(Appears on:BackupActionSpec)
BackupDataActionSpec defines how to back up data.
Field | Description |
---|---|
JobActionSpec | (Members of |
SyncProgress | (Optional) Determines if the backup progress should be synchronized and the interval for synchronization in seconds. |
BackupDeletionPolicy
(string
alias)
(Appears on:BackupSpec)
BackupDeletionPolicy describes the policy for end-of-life maintenance of backup content.
Value | Description |
---|---|
"Delete" | |
"Retain" |
BackupMethod
(Appears on:BackupPolicySpec, BackupStatus)
BackupMethod defines the backup method.
Field | Description |
---|---|
string | The name of backup method. |
string | (Optional) The name of the compatible full backup method, used by incremental backups. |
bool | (Optional) Specifies whether to take snapshots of persistent volumes. If true, the ActionSetName is not required, the controller will use the CSI volume snapshotter to create the snapshot. |
string | (Optional) Refers to the ActionSet object that defines the backup actions. For volume snapshot backup, the actionSet is not required, the controller will use the CSI volume snapshotter to create the snapshot. |
TargetVolumeInfo | (Optional) Specifies which volumes from the target should be mounted in the backup workload. |
[]Kubernetes core/v1.EnvVar | (Optional) Specifies the environment variables for the backup workload. |
RuntimeSettings | (Optional) Specifies runtime settings for the backup workload container. |
BackupTarget | (Optional) Specifies the target information to back up, it will override the target in backup policy. |
[]BackupTarget | Specifies multiple target information for backup operations. This includes details such as the target pod and cluster connection credentials. All specified targets will be backed up collectively. |
BackupPhase
(string
alias)
(Appears on:BackupStatus)
BackupPhase describes the lifecycle phase of a Backup.
Value | Description |
---|---|
"Completed" | BackupPhaseCompleted means the backup has run successfully without errors. |
"Deleting" | BackupPhaseDeleting means the backup and all its associated data are being deleted. |
"Failed" | BackupPhaseFailed means the backup ran but encountered an error that prevented it from completing successfully. |
"New" | BackupPhaseNew means the backup has been created but not yet processed by the BackupController. |
"Running" | BackupPhaseRunning means the backup is currently executing. |
BackupPolicyPhase
(string
alias)
BackupPolicyPhase defines phases for BackupPolicy.
Value | Description |
---|---|
"Available" | |
"Failed" |
BackupPolicySpec
(Appears on:BackupPolicy)
BackupPolicySpec defines the desired state of BackupPolicy
Field | Description |
---|---|
string | (Optional) Specifies the name of BackupRepo where the backup data will be stored. If not set, data will be stored in the default backup repository. |
string | (Optional) Specifies the directory inside the backup repository to store the backup. This path is relative to the path of the backup repository. |
int32 | (Optional) Specifies the number of retries before marking the backup as failed. |
BackupTarget | Specifies the target information to back up, such as the target pod, the cluster connection credential. |
[]BackupTarget | Specifies multiple target information for backup operations. This includes details such as the target pod and cluster connection credentials. All specified targets will be backed up collectively. optional |
[]BackupMethod | Defines the backup methods. |
bool | (Optional) Specifies whether backup data should be stored in a Kopia repository. Data within the Kopia repository is both compressed and encrypted. Furthermore, data deduplication is implemented across various backups of the same cluster. This approach significantly reduces the actual storage usage, particularly for clusters with a low update frequency. NOTE: This feature should NOT be enabled when using KubeBlocks Community Edition, otherwise the backup will not be processed. |
EncryptionConfig | (Optional) Specifies the parameters for encrypting backup data. Encryption will be disabled if the field is not set. |
BackupPolicyStatus
(Appears on:BackupPolicy)
BackupPolicyStatus defines the observed state of BackupPolicy
Field | Description |
---|---|
Phase | (Optional) Phase - in list of [Available,Unavailable] |
string | (Optional) A human-readable message indicating details about why the BackupPolicy is in this phase. |
int64 | (Optional) ObservedGeneration is the most recent generation observed for this BackupPolicy. It refers to the BackupPolicy’s generation, which is updated on mutation by the API Server. |
BackupRef
(Appears on:RestoreSpec)
BackupRef describes the backup info.
Field | Description |
---|---|
string | Specifies the backup name. |
string | Specifies the backup namespace. |
string | Specifies the source target for restoration, identified by its name. |
BackupRepoPhase
(string
alias)
(Appears on:BackupRepoStatus)
BackupRepoPhase denotes different stages for the BackupRepo
.
Value | Description |
---|---|
"Deleting" | BackupRepoDeleting indicates the backup repository is being deleted. |
"Failed" | BackupRepoFailed indicates the pre-check has been failed. |
"PreChecking" | BackupRepoPreChecking indicates the backup repository is being pre-checked. |
"Ready" | BackupRepoReady indicates the backup repository is ready for use. |
BackupRepoSpec
(Appears on:BackupRepo)
BackupRepoSpec defines the desired state of BackupRepo
.
Field | Description |
---|---|
string | Specifies the name of the |
AccessMethod | (Optional) Specifies the access method of the backup repository. |
Kubernetes resource.Quantity | (Optional) Specifies the capacity of the PVC created by this backup repository. |
Kubernetes core/v1.PersistentVolumeReclaimPolicy | Specifies reclaim policy of the PV created by this backup repository. |
map[string]string | (Optional) Stores the non-secret configuration parameters for the |
Kubernetes core/v1.SecretReference | (Optional) References to the secret that holds the credentials for the |
string | (Optional) Specifies the prefix of the path for storing backup data. |
BackupRepoStatus
(Appears on:BackupRepo)
BackupRepoStatus defines the observed state of BackupRepo
.
Field | Description |
---|---|
BackupRepoPhase | (Optional) Represents the current phase of reconciliation for the backup repository. Permissible values are PreChecking, Failed, Ready, Deleting. |
[]Kubernetes meta/v1.Condition | (Optional) Provides a detailed description of the current state of the backup repository. |
int64 | (Optional) Represents the latest generation of the resource that the controller has observed. |
Kubernetes core/v1.SecretReference | (Optional) Refers to the generated secret for the |
string | (Optional) Represents the name of the generated storage class. |
string | (Optional) Represents the name of the PVC that stores backup data. |
string | (Optional) Represents the name of the secret that contains the configuration for the tool. |
bool | (Optional) Indicates if this backup repository is the default one. |
BackupSchedulePhase
(string
alias)
(Appears on:BackupScheduleStatus)
BackupSchedulePhase defines the phase of BackupSchedule
Value | Description |
---|---|
"Available" | BackupSchedulePhaseAvailable indicates the backup schedule is available. |
"Failed" | BackupSchedulePhaseFailed indicates the backup schedule has failed. |
BackupScheduleSpec
(Appears on:BackupSchedule)
BackupScheduleSpec defines the desired state of BackupSchedule.
Field | Description |
---|---|
string | Specifies the backupPolicy to be applied for the |
int64 | (Optional) Defines the deadline in minutes for starting the backup workload if it misses its scheduled time for any reason. |
[]SchedulePolicy | Defines the list of backup schedules. |
BackupScheduleStatus
(Appears on:BackupSchedule)
BackupScheduleStatus defines the observed state of BackupSchedule.
Field | Description |
---|---|
BackupSchedulePhase | (Optional) Describes the phase of the BackupSchedule. |
int64 | (Optional) Represents the most recent generation observed for this BackupSchedule. It refers to the BackupSchedule’s generation, which is updated on mutation by the API Server. |
string | (Optional) Represents an error that caused the backup to fail. |
map[string]github.com/apecloud/kubeblocks/apis/dataprotection/v1alpha1.ScheduleStatus | (Optional) Describes the status of each schedule. |
BackupSpec
(Appears on:Backup)
BackupSpec defines the desired state of Backup.
Field | Description |
---|---|
string | Specifies the backup policy to be applied for this backup. |
string | Specifies the backup method name that is defined in the backup policy. |
BackupDeletionPolicy | Determines whether the backup contents stored in the backup repository
should be deleted when the backup custom resource(CR) is deleted.
Supported values are
the backup CR but retaining the backup contents in backup repository. The current implementation only prevent accidental deletion of backup data. |
RetentionPeriod | (Optional) Determines a duration up to which the backup should be kept.
Controller will remove all backups that are older than the RetentionPeriod.
If not set, the backup will be kept forever.
For example, RetentionPeriod of
You can also combine the above durations. For example: 30d12h30m. |
string | (Optional) Determines the parent backup name for incremental or differential backup. |
BackupStatus
(Appears on:Backup)
BackupStatus defines the observed state of Backup.
Field | Description |
---|---|
string | (Optional) Specifies the backup format version, which includes major, minor, and patch versions. |
BackupPhase | (Optional) Indicates the current state of the backup operation. |
Kubernetes meta/v1.Time | (Optional) Indicates when this backup becomes eligible for garbage collection. A ‘null’ value implies that the backup will not be cleaned up unless manually deleted. |
Kubernetes meta/v1.Time | (Optional) Records the time when the backup operation was started. The server’s time is used for this timestamp. |
Kubernetes meta/v1.Time | (Optional) Records the time when the backup operation was completed. This timestamp is recorded even if the backup operation fails. The server’s time is used for this timestamp. |
Kubernetes meta/v1.Duration | (Optional) Records the duration of the backup operation. When converted to a string, the format is “1h2m0.5s”. |
string | (Optional) Records the total size of the data backed up. The size is represented as a string with capacity units in the format of “1Gi”, “1Mi”, “1Ki”. If no capacity unit is specified, it is assumed to be in bytes. |
string | (Optional) Any error that caused the backup operation to fail. |
string | (Optional) The name of the backup repository. |
string | (Optional) The directory within the backup repository where the backup data is stored. This is an absolute path within the backup repository. |
string | (Optional) Records the path of the Kopia repository. |
string | (Optional) Records the name of the persistent volume claim used to store the backup data. |
BackupTimeRange | (Optional) Records the time range of the data backed up. For Point-in-Time Recovery (PITR), this is the time range of recoverable data. |
BackupStatusTarget | (Optional) Records the target information for this backup. |
[]BackupStatusTarget | (Optional) Records the targets information for this backup. |
BackupMethod | (Optional) Records the backup method information for this backup. Refer to BackupMethod for more details. |
EncryptionConfig | (Optional) Records the encryption config for this backup. |
[]ActionStatus | (Optional) Records the actions status for this backup. |
[]VolumeSnapshotStatus | (Optional) Records the volume snapshot status for the action. |
string | (Optional) Records the parent backup name for incremental or differential backup. When the parent backup is deleted, the backup will also be deleted. |
string | (Optional) Records the base full backup name for incremental backup or differential backup. When the base backup is deleted, the backup will also be deleted. |
[]string | (Optional) Records any additional information for the backup. |
BackupStatusTarget
(Appears on:BackupStatus)
Field | Description |
---|---|
BackupTarget | (Members of |
[]string | Records the selected pods by the target info during backup. |
BackupTarget
(Appears on:BackupMethod, BackupPolicySpec, BackupStatusTarget)
Field | Description |
---|---|
string | Specifies a mandatory and unique identifier for each target when using the “targets” field. The backup data for the current target is stored in a uniquely named subdirectory. |
PodSelector | Used to find the target pod. The volumes of the target pod will be backed up. |
ConnectionCredential | (Optional) Specifies the connection credential to connect to the target database cluster. |
KubeResources | (Optional) Specifies the kubernetes resources to back up. |
string | Specifies the service account to run the backup workload. |
BackupTimeRange
(Appears on:ActionStatus, BackupStatus)
BackupTimeRange records the time range of backed up data, for PITR, this is the time range of recoverable data.
Field | Description |
---|---|
string | (Optional) time zone, supports only zone offset, with a value range of “-12:59 ~ +13:00”. |
Kubernetes meta/v1.Time | (Optional) Records the start time of the backup, in Coordinated Universal Time (UTC). |
Kubernetes meta/v1.Time | (Optional) Records the end time of the backup, in Coordinated Universal Time (UTC). |
BackupType
(string
alias)
(Appears on:ActionSetSpec)
BackupType the backup type.
Value | Description |
---|---|
"Continuous" | |
"Differential" | |
"Full" | |
"Incremental" |
BaseJobActionSpec
(Appears on:BackupActionSpec, JobActionSpec)
BaseJobActionSpec is an action that creates a Kubernetes Job to execute a command.
Field | Description |
---|---|
string | Specifies the image of the backup container. |
[]string | Defines the commands to back up the volume data. |
ConnectionCredential
(Appears on:BackupTarget, ReadyConfig)
ConnectionCredential specifies the connection credential to connect to the target database cluster.
Field | Description |
---|---|
string | Refers to the Secret object that contains the connection credential. |
string | Specifies the map key of the user in the connection credential secret. |
string | Specifies the map key of the password in the connection credential secret. This password will be saved in the backup annotation for full backup. You can use the environment variable DP_ENCRYPTION_KEY to specify encryption key. |
string | (Optional) Specifies the map key of the host in the connection credential secret. |
string | (Optional) Specifies the map key of the port in the connection credential secret. |
DataRestorePolicy
(string
alias)
(Appears on:RequiredPolicyForAllPodSelection)
Value | Description |
---|---|
"OneToMany" | |
"OneToOne" |
EncryptionConfig
(Appears on:BackupPolicySpec, BackupStatus)
EncryptionConfig defines the parameters for encrypting backup data.
Field | Description |
---|---|
string | Specifies the encryption algorithm. Currently supported algorithms are:
|
Kubernetes core/v1.SecretKeySelector | Selects the key of a secret in the current namespace, the value of the secret is used as the encryption key. |
ExecAction
(Appears on:ReadyConfig)
Field | Description |
---|---|
ExecActionTarget | (Optional) Defines the pods that need to be executed for the exec action. Execution will occur on all pods that meet the conditions. |
ExecActionSpec
(Appears on:ActionSpec)
ExecActionSpec is an action that uses the pod exec API to execute a command in a container in a pod.
Field | Description |
---|---|
string | (Optional) Specifies the container within the pod where the command should be executed. If not specified, the first container in the pod is used by default. |
[]string | Defines the command and arguments to be executed. |
ActionErrorMode | (Optional) Indicates how to behave if an error is encountered during the execution of this action. |
Kubernetes meta/v1.Duration | (Optional) Specifies the maximum duration to wait for the hook to complete before considering the execution a failure. |
ExecActionTarget
(Appears on:ExecAction)
Field | Description |
---|---|
Kubernetes meta/v1.LabelSelector | Executes kubectl in all selected pods. |
IncludeResource
(Appears on:RestoreKubeResources)
Field | Description |
---|---|
string | |
Kubernetes meta/v1.LabelSelector | (Optional) Selects the specified resource for recovery by label. |
JobAction
(Appears on:ReadyConfig)
Field | Description |
---|---|
RequiredPolicyForAllPodSelection | Specifies the restore policy, which is required when the pod selection strategy for the source target is ‘All’. This field is ignored if the pod selection strategy is ‘Any’. optional |
JobActionTarget | Defines the pods that needs to be executed for the job action. |
JobActionSpec
(Appears on:ActionSpec, BackupDataActionSpec, RestoreActionSpec)
JobActionSpec is an action that creates a Kubernetes Job to execute a command.
Field | Description |
---|---|
BaseJobActionSpec | (Members of |
bool | (Optional) Determines whether to run the job workload on the target pod node. If the backup container needs to mount the target pod’s volumes, this field should be set to true. Otherwise, the target pod’s volumes will be ignored. |
ActionErrorMode | (Optional) Indicates how to behave if an error is encountered during the execution of this action. |
JobActionTarget
(Appears on:JobAction)
Field | Description |
---|---|
PodSelector | Selects one of the pods, identified by labels, to build the job spec. This includes mounting required volumes and injecting built-in environment variables of the selected pod. |
[]Kubernetes core/v1.VolumeMount | (Optional) Defines which volumes of the selected pod need to be mounted on the restoring pod. |
KubeResources
(Appears on:BackupTarget)
KubeResources defines the kubernetes resources to back up.
Field | Description |
---|---|
Kubernetes meta/v1.LabelSelector | A metav1.LabelSelector to filter the target kubernetes resources that need to be backed up. If not set, will do not back up any kubernetes resources. |
[]string | (Optional) included is a slice of namespaced-scoped resource type names to include in the kubernetes resources. The default value is empty. |
[]string | (Optional) excluded is a slice of namespaced-scoped resource type names to exclude in the kubernetes resources. The default value is empty. |
ParametersSchema
(Appears on:StorageProviderSpec)
ParametersSchema describes the parameters needed for a certain storage.
Field | Description |
---|---|
Kubernetes api extensions v1.JSONSchemaProps | (Optional) Defines the parameters in OpenAPI V3. |
[]string | (Optional) Defines which parameters are credential fields, which need to be handled specifically.
For instance, these should be stored in a |
Phase
(string
alias)
(Appears on:ActionSetStatus, BackupPolicyStatus)
Phase defines the BackupPolicy and ActionSet CR .status.phase
Value | Description |
---|---|
"Available" | |
"Unavailable" |
PodSelectionStrategy
(string
alias)
(Appears on:PodSelector)
PodSelectionStrategy specifies the strategy to select when multiple pods are selected for backup target
Value | Description |
---|---|
"All" | PodSelectionStrategyAll selects all pods that match the labelsSelector. |
"Any" | PodSelectionStrategyAny selects any one pod that match the labelsSelector. |
PodSelector
(Appears on:BackupTarget, JobActionTarget)
Field | Description |
---|---|
Kubernetes meta/v1.LabelSelector | (Members of labelsSelector is the label selector to filter the target pods. |
Kubernetes meta/v1.LabelSelector | (Optional) fallbackLabelSelector is used to filter available pods when the labelSelector fails.
This only takes effect when the |
PodSelectionStrategy | Specifies the strategy to select the target pod when multiple pods are selected. Valid values are:
|
PrepareDataConfig
(Appears on:RestoreSpec)
Field | Description |
---|---|
RequiredPolicyForAllPodSelection | Specifies the restore policy, which is required when the pod selection strategy for the source target is ‘All’. This field is ignored if the pod selection strategy is ‘Any’. optional |
VolumeConfig | (Optional) Specifies the configuration when using |
[]RestoreVolumeClaim | (Optional) Defines the persistent Volume claims that need to be restored and mounted together into the restore job. These persistent Volume claims will be created if they do not exist. |
RestoreVolumeClaimsTemplate | (Optional) Defines a template to build persistent Volume claims that need to be restored. These claims will be created in an orderly manner based on the number of replicas or reused if they already exist. |
VolumeClaimRestorePolicy | Defines restore policy for persistent volume claim. Supported policies are as follows:
|
SchedulingSpec | (Optional) Specifies the scheduling spec for the restoring pod. |
ReadinessProbe
(Appears on:ReadyConfig)
Field | Description |
---|---|
int | (Optional) Specifies the number of seconds after the container has started before the probe is initiated. |
int | (Optional) Specifies the number of seconds after which the probe times out. The default value is 30 seconds, and the minimum value is 1. |
int | (Optional) Specifies how often (in seconds) to perform the probe. The default value is 5 seconds, and the minimum value is 1. |
ReadinessProbeExecAction | Specifies the action to take. |
ReadinessProbeExecAction
(Appears on:ReadinessProbe)
Field | Description |
---|---|
string | Refers to the container image. |
[]string | Refers to the container command. |
ReadyConfig
(Appears on:RestoreSpec)
Field | Description |
---|---|
JobAction | (Optional) Specifies the configuration for a job action. |
ExecAction | (Optional) Specifies the configuration for an exec action. |
ConnectionCredential | (Optional) Defines the credential template used to create a connection credential. |
ReadinessProbe | (Optional) Defines a periodic probe of the service readiness. The controller will perform postReadyHooks of BackupScript.spec.restore after the service readiness when readinessProbe is configured. |
RequiredPolicyForAllPodSelection
(Appears on:JobAction, PrepareDataConfig)
Field | Description |
---|---|
DataRestorePolicy | Specifies the data restore policy. Options include:
|
SourceOfOneToMany | Specifies the name of the source target pod. This field is mandatory when the DataRestorePolicy is configured to ‘OneToMany’. |
RestoreActionSpec
(Appears on:ActionSetSpec)
RestoreActionSpec defines how to restore data.
Field | Description |
---|---|
JobActionSpec | (Optional) Specifies the action required to prepare data for restoration. |
[]ActionSpec | (Optional) Specifies the actions that should be executed after the data has been prepared and is ready for restoration. |
bool | (Optional) Determines if a base backup is required during restoration. |
RestoreActionStatus
(string
alias)
(Appears on:RestoreStatusAction)
RestoreActionStatus the status of restore action.
Value | Description |
---|---|
"Completed" | |
"Failed" | |
"Processing" |
RestoreKubeResources
(Appears on:RestoreSpec)
Field | Description |
---|---|
[]IncludeResource | (Optional) Restores the specified resources. |
RestorePhase
(string
alias)
(Appears on:RestoreStatus)
RestorePhase The current phase. Valid values are Running, Completed, Failed, AsDataSource.
Value | Description |
---|---|
"AsDataSource" | |
"Completed" | |
"Failed" | |
"Running" |
RestoreSpec
(Appears on:Restore)
RestoreSpec defines the desired state of Restore
Field | Description |
---|---|
BackupRef | Specifies the backup to be restored. The restore behavior is based on the backup type:
|
string | (Optional) Specifies the point in time for restoring. |
RestoreKubeResources | (Optional) Restores the specified resources of Kubernetes. |
PrepareDataConfig | (Optional) Configuration for the action of “prepareData” phase, including the persistent volume claims that need to be restored and scheduling strategy of temporary recovery pod. |
string | (Optional) Specifies the service account name needed for recovery pod. |
ReadyConfig | (Optional) Configuration for the action of “postReady” phase. |
[]Kubernetes core/v1.EnvVar | (Optional) List of environment variables to set in the container for restore. These will be merged with the env of Backup and ActionSet. The priority of merging is as follows: |
Kubernetes core/v1.ResourceRequirements | (Optional) Specifies the required resources of restore job’s container. |
int32 | (Optional) Specifies the number of retries before marking the restore failed. |
RestoreStage
(string
alias)
Value | Description |
---|---|
"postReady" | |
"prepareData" |
RestoreStatus
(Appears on:Restore)
RestoreStatus defines the observed state of Restore
Field | Description |
---|---|
RestorePhase | (Optional) Represents the current phase of the restore. |
Kubernetes meta/v1.Time | (Optional) Records the date/time when the restore started being processed. |
Kubernetes meta/v1.Time | (Optional) Records the date/time when the restore finished being processed. |
Kubernetes meta/v1.Duration | (Optional) Records the duration of the restore execution. When converted to a string, the form is “1h2m0.5s”. |
RestoreStatusActions | (Optional) Records all restore actions performed. |
[]Kubernetes meta/v1.Condition | (Optional) Describes the current state of the restore API Resource, like warning. |
RestoreStatusAction
(Appears on:RestoreStatusActions)
Field | Description |
---|---|
string | Describes the name of the restore action based on the current backup. |
string | Describes which backup’s restore action belongs to. |
string | Describes the execution object of the restore action. |
string | (Optional) Provides a human-readable message indicating details about the object condition. |
RestoreActionStatus | The status of this action. |
Kubernetes meta/v1.Time | (Optional) The start time of the restore job. |
Kubernetes meta/v1.Time | (Optional) The completion time of the restore job. |
RestoreStatusActions
(Appears on:RestoreStatus)
Field | Description |
---|---|
[]RestoreStatusAction | (Optional) Records the actions for the prepareData phase. |
[]RestoreStatusAction | (Optional) Records the actions for the postReady phase. |
RestoreVolumeClaim
(Appears on:PrepareDataConfig, RestoreVolumeClaimsTemplate)
Field | Description |
---|---|
Kubernetes meta/v1.ObjectMeta | Specifies the standard metadata for the object. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata Refer to the Kubernetes API documentation for the fields of the
|
Kubernetes core/v1.PersistentVolumeClaimSpec | Defines the desired characteristics of a persistent volume claim. |
VolumeConfig | (Members of Describes the source volume of the backup target volumes and the mount path in the restoring container. At least one must exist for volumeSource and mountPath. |
RestoreVolumeClaimsTemplate
(Appears on:PrepareDataConfig)
Field | Description |
---|---|
[]RestoreVolumeClaim | Contains a list of volume claims. |
int32 | Specifies the replicas of persistent volume claim that need to be created and restored.
The format of the created claim name is |
int32 | Specifies the starting index for the created persistent volume claim according to the template. The minimum value is 0. |
RetentionPeriod
(string
alias)
(Appears on:BackupSpec, SchedulePolicy)
RetentionPeriod represents a duration in the format “1y2mo3w4d5h6m”, where y=year, mo=month, w=week, d=day, h=hour, m=minute.
RuntimeSettings
(Appears on:BackupMethod)
Field | Description |
---|---|
Kubernetes core/v1.ResourceRequirements | (Optional) Specifies the resource required by container. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ |
SchedulePhase
(string
alias)
(Appears on:ScheduleStatus)
SchedulePhase represents the phase of a schedule.
Value | Description |
---|---|
"Failed" | |
"Running" |
SchedulePolicy
(Appears on:BackupScheduleSpec)
Field | Description |
---|---|
bool | (Optional) Specifies whether the backup schedule is enabled or not. |
string | Specifies the backup method name that is defined in backupPolicy. |
string | Specifies the cron expression for the schedule. The timezone is in UTC. see https://en.wikipedia.org/wiki/Cron. |
RetentionPeriod | (Optional) Determines the duration for which the backup should be kept.
KubeBlocks will remove all backups that are older than the RetentionPeriod.
For example, RetentionPeriod of
You can also combine the above durations. For example: 30d12h30m |
ScheduleStatus
(Appears on:BackupScheduleStatus)
ScheduleStatus represents the status of each schedule.
Field | Description |
---|---|
SchedulePhase | (Optional) Describes the phase of the schedule. |
string | (Optional) Represents an error that caused the backup to fail. |
Kubernetes meta/v1.Time | (Optional) Records the last time the backup was scheduled. |
Kubernetes meta/v1.Time | (Optional) Records the last time the backup was successfully completed. |
SchedulingSpec
(Appears on:PrepareDataConfig)
Field | Description |
---|---|
[]Kubernetes core/v1.Toleration | (Optional) Specifies the tolerations for the restoring pod. |
map[string]string | (Optional) Defines a selector which must be true for the pod to fit on a node. The selector must match a node’s labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ |
string | (Optional) Specifies a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. |
Kubernetes core/v1.Affinity | (Optional) Contains a group of affinity scheduling rules. Refer to https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ |
[]Kubernetes core/v1.TopologySpreadConstraint | (Optional) Describes how a group of pods ought to spread across topology domains. The scheduler will schedule pods in a way which abides by the constraints. Refer to https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/ |
string | (Optional) Specifies the scheduler to dispatch the pod. If not specified, the pod will be dispatched by the default scheduler. |
SourceOfOneToMany
(Appears on:RequiredPolicyForAllPodSelection)
Field | Description |
---|---|
string | Specifies the name of the source target pod. |
StorageProviderPhase
(string
alias)
(Appears on:StorageProviderStatus)
StorageProviderPhase defines phases of a StorageProvider
.
Value | Description |
---|---|
"NotReady" | StorageProviderNotReady indicates that the |
"Ready" | StorageProviderReady indicates that the |
StorageProviderSpec
(Appears on:StorageProvider)
StorageProviderSpec defines the desired state of StorageProvider
.
Field | Description |
---|---|
string | (Optional) Specifies the name of the CSI driver used to access remote storage. This field can be empty, it indicates that the storage is not accessible via CSI. |
string | (Optional) A Go template that used to render and generate |
string | (Optional) A Go template utilized to render and generate |
string | (Optional) A Go template that renders and generates |
string | (Optional) A Go template used to render and generate |
ParametersSchema | (Optional) Describes the parameters required for storage.
The parameters defined here can be referenced in the above templates,
and |
StorageProviderStatus
(Appears on:StorageProvider)
StorageProviderStatus defines the observed state of StorageProvider
.
Field | Description |
---|---|
StorageProviderPhase | The phase of the |
[]Kubernetes meta/v1.Condition | (Optional) Describes the current state of the |
SyncProgress
(Appears on:BackupDataActionSpec)
Field | Description |
---|---|
bool | (Optional) Determines if the backup progress should be synchronized. If set to true, a sidecar container will be instantiated to synchronize the backup progress with the Backup Custom Resource (CR) status. |
int32 | (Optional) Defines the interval in seconds for synchronizing the backup progress. |
TargetVolumeInfo
(Appears on:BackupMethod)
TargetVolumeInfo specifies the volumes and their mounts of the targeted application that should be mounted in backup workload.
Field | Description |
---|---|
[]string | (Optional) Specifies the list of volumes of targeted application that should be mounted on the backup workload. |
[]Kubernetes core/v1.VolumeMount | (Optional) Specifies the mount for the volumes specified in |
VolumeClaimRestorePolicy
(string
alias)
(Appears on:PrepareDataConfig)
VolumeClaimRestorePolicy defines restore policy for persistent volume claim. Supported policies are as follows:
Parallel: parallel recovery of persistent volume claim.
Serial: restore the persistent volume claim in sequence, and wait until the previous persistent volume claim is restored before restoring a new one.
Value | Description |
---|---|
"Parallel" | |
"Serial" |
VolumeConfig
(Appears on:PrepareDataConfig, RestoreVolumeClaim)
Field | Description |
---|---|
string | (Optional) Describes the volume that will be restored from the specified volume of the backup targetVolumes. This is required if the backup uses a volume snapshot. |
string | (Optional) Specifies the path within the restoring container at which the volume should be mounted. |
VolumeSnapshotStatus
(Appears on:ActionStatus, BackupStatus)
Field | Description |
---|---|
string | (Optional) The name of the volume snapshot. |
string | (Optional) The name of the volume snapshot content. |
string | (Optional) The name of the volume. |
string | (Optional) The size of the volume snapshot. |
string | Associates this volumeSnapshot with its corresponding target. |
Generated with gen-crd-api-reference-docs