Backup API Reference
Packages:
dataprotection.kubeblocks.io/v1alpha1
Resource Types:ActionSet
ActionSet is the Schema for the actionsets API
Field | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
apiVersion string | dataprotection.kubeblocks.io/v1alpha1 | ||||||||||
kind string | ActionSet | ||||||||||
metadata Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of themetadata field. | ||||||||||
spec ActionSetSpec |
| ||||||||||
status ActionSetStatus |
Backup
Backup is the Schema for the backups API.
Field | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
apiVersion string | dataprotection.kubeblocks.io/v1alpha1 | ||||||||||
kind string | Backup | ||||||||||
metadata Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of themetadata field. | ||||||||||
spec BackupSpec |
| ||||||||||
status BackupStatus |
BackupPolicy
BackupPolicy is the Schema for the backuppolicies API.
Field | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
apiVersion string | dataprotection.kubeblocks.io/v1alpha1 | ||||||||||||||||
kind string | BackupPolicy | ||||||||||||||||
metadata Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of themetadata field. | ||||||||||||||||
spec BackupPolicySpec |
| ||||||||||||||||
status BackupPolicyStatus |
BackupRepo
BackupRepo is a repository for storing backup data.
Field | Description | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
apiVersion string | dataprotection.kubeblocks.io/v1alpha1 | ||||||||||||||
kind string | BackupRepo | ||||||||||||||
metadata Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of themetadata field. | ||||||||||||||
spec BackupRepoSpec |
| ||||||||||||||
status BackupRepoStatus |
BackupSchedule
BackupSchedule is the Schema for the backupschedules API.
Field | Description | ||||||
---|---|---|---|---|---|---|---|
apiVersion string | dataprotection.kubeblocks.io/v1alpha1 | ||||||
kind string | BackupSchedule | ||||||
metadata Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of themetadata field. | ||||||
spec BackupScheduleSpec |
| ||||||
status BackupScheduleStatus |
Restore
Restore is the Schema for the restores API
Field | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
apiVersion string | dataprotection.kubeblocks.io/v1alpha1 | ||||||||||||||||||
kind string | Restore | ||||||||||||||||||
metadata Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of themetadata field. | ||||||||||||||||||
spec RestoreSpec |
| ||||||||||||||||||
status 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 | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
apiVersion string | dataprotection.kubeblocks.io/v1alpha1 | ||||||||||||
kind string | StorageProvider | ||||||||||||
metadata Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of themetadata field. | ||||||||||||
spec StorageProviderSpec |
| ||||||||||||
status 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 BackupType | Specifies the backup type. Supported values include:
Continuous backup is essential for implementing Point-in-Time Recovery (PITR). |
env []Kubernetes core/v1.EnvVar | (Optional) Specifies a list of environment variables to be set in the container. |
envFrom []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. |
backup BackupActionSpec | (Optional) Specifies the backup action. |
restore RestoreActionSpec | (Optional) Specifies the restore action. |
ActionSetStatus
(Appears on:ActionSet)
ActionSetStatus defines the observed state of ActionSet
Field | Description |
---|---|
phase Phase | (Optional) Indicates the phase of the ActionSet. This can be either ‘Available’ or ‘Unavailable’. |
message string | (Optional) Provides a human-readable explanation detailing the reason for the current phase of the ActionSet. |
observedGeneration 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 |
---|---|
exec ExecActionSpec | (Optional) Specifies that the action should be executed using the pod’s exec API within a container. |
job JobActionSpec | (Optional) Specifies that the action should be executed by a Kubernetes Job. |
ActionStatus
(Appears on:BackupStatus)
Field | Description |
---|---|
name string | (Optional) The name of the action. |
targetPodName string | Records the target pod name which has been backed up. |
phase ActionPhase | (Optional) The current phase of the action. |
startTimestamp Kubernetes meta/v1.Time | (Optional) Records the time an action was started. |
completionTimestamp Kubernetes meta/v1.Time | (Optional) Records the time an action was completed. |
failureReason string | (Optional) An error that caused the action to fail. |
actionType ActionType | (Optional) The type of the action. |
availableReplicas int32 | (Optional) Available replicas for statefulSet action. |
objectRef Kubernetes core/v1.ObjectReference | (Optional) The object reference for the action. |
totalSize 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. |
timeRange BackupTimeRange | (Optional) Records the time range of backed up data, for PITR, this is the time range of recoverable data. |
volumeSnapshots []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 |
---|---|
backupData BackupDataActionSpec | Represents the action to be performed for backing up data. |
preBackup []ActionSpec | (Optional) Represents a set of actions that should be executed before the backup process begins. |
postBackup []ActionSpec | (Optional) Represents a set of actions that should be executed after the backup process has completed. |
preDelete 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 JobActionSpec | (Members of |
syncProgress 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 |
---|---|
name string | The name of backup method. |
snapshotVolumes 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. |
actionSetName 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. |
targetVolumes TargetVolumeInfo | (Optional) Specifies which volumes from the target should be mounted in the backup workload. |
env []Kubernetes core/v1.EnvVar | (Optional) Specifies the environment variables for the backup workload. |
runtimeSettings RuntimeSettings | (Optional) Specifies runtime settings for the backup workload container. |
target BackupTarget | (Optional) Specifies the target information to back up, it will override the target in backup policy. |
targets []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 |
---|---|
backupRepoName 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. |
pathPrefix string | (Optional) Specifies the directory inside the backup repository to store the backup. This path is relative to the path of the backup repository. |
backoffLimit int32 | (Optional) Specifies the number of retries before marking the backup as failed. |
target BackupTarget | Specifies the target information to back up, such as the target pod, the cluster connection credential. |
targets []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 |
backupMethods []BackupMethod | Defines the backup methods. |
useKopia 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 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 Phase | (Optional) Phase - in list of [Available,Unavailable] |
message string | (Optional) A human-readable message indicating details about why the BackupPolicy is in this phase. |
observedGeneration 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 |
---|---|
name string | Specifies the backup name. |
namespace string | Specifies the backup namespace. |
sourceTargetName 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 |
---|---|
storageProviderRef string | Specifies the name of the |
accessMethod AccessMethod | (Optional) Specifies the access method of the backup repository. |
volumeCapacity Kubernetes resource.Quantity | (Optional) Specifies the capacity of the PVC created by this backup repository. |
pvReclaimPolicy Kubernetes core/v1.PersistentVolumeReclaimPolicy | Specifies reclaim policy of the PV created by this backup repository. |
config map[string]string | (Optional) Stores the non-secret configuration parameters for the |
credential Kubernetes core/v1.SecretReference | (Optional) References to the secret that holds the credentials for the |
pathPrefix 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 |
---|---|
phase BackupRepoPhase | (Optional) Represents the current phase of reconciliation for the backup repository. Permissible values are PreChecking, Failed, Ready, Deleting. |
conditions []Kubernetes meta/v1.Condition | (Optional) Provides a detailed description of the current state of the backup repository. |
observedGeneration int64 | (Optional) Represents the latest generation of the resource that the controller has observed. |
generatedCSIDriverSecret Kubernetes core/v1.SecretReference | (Optional) Refers to the generated secret for the |
generatedStorageClassName string | (Optional) Represents the name of the generated storage class. |
backupPVCName string | (Optional) Represents the name of the PVC that stores backup data. |
toolConfigSecretName string | (Optional) Represents the name of the secret that contains the configuration for the tool. |
isDefault 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 |
---|---|
backupPolicyName string | Specifies the backupPolicy to be applied for the |
startingDeadlineMinutes int64 | (Optional) Defines the deadline in minutes for starting the backup workload if it misses its scheduled time for any reason. |
schedules []SchedulePolicy | Defines the list of backup schedules. |
BackupScheduleStatus
(Appears on:BackupSchedule)
BackupScheduleStatus defines the observed state of BackupSchedule.
Field | Description |
---|---|
phase BackupSchedulePhase | (Optional) Describes the phase of the BackupSchedule. |
observedGeneration 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. |
failureReason string | (Optional) Represents an error that caused the backup to fail. |
schedules 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 |
---|---|
backupPolicyName string | Specifies the backup policy to be applied for this backup. |
backupMethod string | Specifies the backup method name that is defined in the backup policy. |
deletionPolicy 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 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. |
parentBackupName 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 |
---|---|
formatVersion string | (Optional) Specifies the backup format version, which includes major, minor, and patch versions. |
phase BackupPhase | (Optional) Indicates the current state of the backup operation. |
expiration 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. |
startTimestamp Kubernetes meta/v1.Time | (Optional) Records the time when the backup operation was started. The server’s time is used for this timestamp. |
completionTimestamp 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. |
duration Kubernetes meta/v1.Duration | (Optional) Records the duration of the backup operation. When converted to a string, the format is “1h2m0.5s”. |
totalSize 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. |
failureReason string | (Optional) Any error that caused the backup operation to fail. |
backupRepoName string | (Optional) The name of the backup repository. |
path string | (Optional) The directory within the backup repository where the backup data is stored. This is an absolute path within the backup repository. |
kopiaRepoPath string | (Optional) Records the path of the Kopia repository. |
persistentVolumeClaimName string | (Optional) Records the name of the persistent volume claim used to store the backup data. |
timeRange 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. |
target BackupStatusTarget | (Optional) Records the target information for this backup. |
targets []BackupStatusTarget | (Optional) Records the targets information for this backup. |
backupMethod BackupMethod | (Optional) Records the backup method information for this backup. Refer to BackupMethod for more details. |
encryptionConfig EncryptionConfig | (Optional) Records the encryption config for this backup. |
actions []ActionStatus | (Optional) Records the actions status for this backup. |
volumeSnapshots []VolumeSnapshotStatus | (Optional) Records the volume snapshot status for the action. |
extras []string | (Optional) Records any additional information for the backup. |
BackupStatusTarget
(Appears on:BackupStatus)
Field | Description |
---|---|
BackupTarget BackupTarget | (Members of |
selectedTargetPods []string | Records the selected pods by the target info during backup. |
BackupTarget
(Appears on:BackupMethod, BackupPolicySpec, BackupStatusTarget)
Field | Description |
---|---|
name 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 PodSelector | Used to find the target pod. The volumes of the target pod will be backed up. |
connectionCredential ConnectionCredential | (Optional) Specifies the connection credential to connect to the target database cluster. |
resources KubeResources | (Optional) Specifies the kubernetes resources to back up. |
serviceAccountName 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 |
---|---|
timeZone string | (Optional) time zone, supports only zone offset, with a value range of “-12:59 ~ +13:00”. |
start Kubernetes meta/v1.Time | (Optional) Records the start time of the backup, in Coordinated Universal Time (UTC). |
end 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 |
---|---|
image string | Specifies the image of the backup container. |
command []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 |
---|---|
secretName string | Refers to the Secret object that contains the connection credential. |
usernameKey string | Specifies the map key of the user in the connection credential secret. |
passwordKey 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. |
hostKey string | (Optional) Specifies the map key of the host in the connection credential secret. |
portKey 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 |
---|---|
algorithm string | Specifies the encryption algorithm. Currently supported algorithms are:
|
passPhraseSecretKeyRef 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 |
---|---|
target 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 |
---|---|
container 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. |
command []string | Defines the command and arguments to be executed. |
onError ActionErrorMode | (Optional) Indicates how to behave if an error is encountered during the execution of this action. |
timeout 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 |
---|---|
podSelector Kubernetes meta/v1.LabelSelector | Executes kubectl in all selected pods. |
IncludeResource
(Appears on:RestoreKubeResources)
Field | Description |
---|---|
groupResource string | |
labelSelector Kubernetes meta/v1.LabelSelector | (Optional) Selects the specified resource for recovery by label. |
JobAction
(Appears on:ReadyConfig)
Field | Description |
---|---|
requiredPolicyForAllPodSelection 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 |
target 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 BaseJobActionSpec | (Members of |
runOnTargetPodNode 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. |
onError ActionErrorMode | (Optional) Indicates how to behave if an error is encountered during the execution of this action. |
JobActionTarget
(Appears on:JobAction)
Field | Description |
---|---|
podSelector 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. |
volumeMounts []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 |
---|---|
selector 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. |
included []string | (Optional) included is a slice of namespaced-scoped resource type names to include in the kubernetes resources. The default value is empty. |
excluded []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 |
---|---|
openAPIV3Schema Kubernetes api extensions v1.JSONSchemaProps | (Optional) Defines the parameters in OpenAPI V3. |
credentialFields []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 |
---|---|
LabelSelector Kubernetes meta/v1.LabelSelector | (Members of labelsSelector is the label selector to filter the target pods. |
fallbackLabelSelector Kubernetes meta/v1.LabelSelector | (Optional) fallbackLabelSelector is used to filter available pods when the labelSelector fails. This only takes effect when the |
strategy PodSelectionStrategy | Specifies the strategy to select the target pod when multiple pods are selected. Valid values are:
|
PrepareDataConfig
(Appears on:RestoreSpec)
Field | Description |
---|---|
requiredPolicyForAllPodSelection 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 |
dataSourceRef VolumeConfig | (Optional) Specifies the configuration when using |
volumeClaims []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. |
volumeClaimsTemplate 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 VolumeClaimRestorePolicy | Defines restore policy for persistent volume claim. Supported policies are as follows:
|
schedulingSpec SchedulingSpec | (Optional) Specifies the scheduling spec for the restoring pod. |
ReadinessProbe
(Appears on:ReadyConfig)
Field | Description |
---|---|
initialDelaySeconds int | (Optional) Specifies the number of seconds after the container has started before the probe is initiated. |
timeoutSeconds 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. |
periodSeconds int | (Optional) Specifies how often (in seconds) to perform the probe. The default value is 5 seconds, and the minimum value is 1. |
exec ReadinessProbeExecAction | Specifies the action to take. |
ReadinessProbeExecAction
(Appears on:ReadinessProbe)
Field | Description |
---|---|
image string | Refers to the container image. |
command []string | Refers to the container command. |
ReadyConfig
(Appears on:RestoreSpec)
Field | Description |
---|---|
jobAction JobAction | (Optional) Specifies the configuration for a job action. |
execAction ExecAction | (Optional) Specifies the configuration for an exec action. |
connectionCredential ConnectionCredential | (Optional) Defines the credential template used to create a connection credential. |
readinessProbe 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 DataRestorePolicy | Specifies the data restore policy. Options include: - OneToMany: Enables restoration of all volumes from a single data copy of the original target instance. The ‘sourceOfOneToMany’ field must be set when using this policy. - OneToOne: Restricts data restoration such that each data piece can only be restored to a single target instance. This is the default policy. When the number of target instances specified for restoration surpasses the count of original backup target instances. |
sourceOfOneToMany 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 |
---|---|
prepareData JobActionSpec | (Optional) Specifies the action required to prepare data for restoration. |
postReady []ActionSpec | (Optional) Specifies the actions that should be executed after the data has been prepared and is ready for restoration. |
baseBackupRequired 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 |
---|---|
included []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 |
---|---|
backup BackupRef | Specifies the backup to be restored. The restore behavior is based on the backup type:
|
restoreTime string | (Optional) Specifies the point in time for restoring. |
resources RestoreKubeResources | (Optional) Restores the specified resources of Kubernetes. |
prepareDataConfig 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. |
serviceAccountName string | (Optional) Specifies the service account name needed for recovery pod. |
readyConfig ReadyConfig | (Optional) Configuration for the action of “postReady” phase. |
env []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: |
containerResources Kubernetes core/v1.ResourceRequirements | (Optional) Specifies the required resources of restore job’s container. |
backoffLimit 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 |
---|---|
phase RestorePhase | (Optional) Represents the current phase of the restore. |
startTimestamp Kubernetes meta/v1.Time | (Optional) Records the date/time when the restore started being processed. |
completionTimestamp Kubernetes meta/v1.Time | (Optional) Records the date/time when the restore finished being processed. |
duration Kubernetes meta/v1.Duration | (Optional) Records the duration of the restore execution. When converted to a string, the form is “1h2m0.5s”. |
actions RestoreStatusActions | (Optional) Records all restore actions performed. |
conditions []Kubernetes meta/v1.Condition | (Optional) Describes the current state of the restore API Resource, like warning. |
RestoreStatusAction
(Appears on:RestoreStatusActions)
Field | Description |
---|---|
name string | Describes the name of the restore action based on the current backup. |
backupName string | Describes which backup’s restore action belongs to. |
objectKey string | Describes the execution object of the restore action. |
message string | (Optional) Provides a human-readable message indicating details about the object condition. |
status RestoreActionStatus | The status of this action. |
startTime Kubernetes meta/v1.Time | (Optional) The start time of the restore job. |
endTime Kubernetes meta/v1.Time | (Optional) The completion time of the restore job. |
RestoreStatusActions
(Appears on:RestoreStatus)
Field | Description |
---|---|
prepareData []RestoreStatusAction | (Optional) Records the actions for the prepareData phase. |
postReady []RestoreStatusAction | (Optional) Records the actions for the postReady phase. |
RestoreVolumeClaim
(Appears on:PrepareDataConfig, RestoreVolumeClaimsTemplate)
Field | Description |
---|---|
metadata 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 themetadata field. |
volumeClaimSpec Kubernetes core/v1.PersistentVolumeClaimSpec | Defines the desired characteristics of a persistent volume claim. |
VolumeConfig 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 |
---|---|
templates []RestoreVolumeClaim | Contains a list of volume claims. |
replicas int32 | Specifies the replicas of persistent volume claim that need to be created and restored. The format of the created claim name is |
startingIndex 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 |
---|---|
resources 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 |
---|---|
enabled bool | (Optional) Specifies whether the backup schedule is enabled or not. |
backupMethod string | Specifies the backup method name that is defined in backupPolicy. |
cronExpression string | Specifies the cron expression for the schedule. The timezone is in UTC. see https://en.wikipedia.org/wiki/Cron. |
retentionPeriod 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 |
---|---|
phase SchedulePhase | (Optional) Describes the phase of the schedule. |
failureReason string | (Optional) Represents an error that caused the backup to fail. |
lastScheduleTime Kubernetes meta/v1.Time | (Optional) Records the last time the backup was scheduled. |
lastSuccessfulTime Kubernetes meta/v1.Time | (Optional) Records the last time the backup was successfully completed. |
SchedulingSpec
(Appears on:PrepareDataConfig)
Field | Description |
---|---|
tolerations []Kubernetes core/v1.Toleration | (Optional) Specifies the tolerations for the restoring pod. |
nodeSelector 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/ |
nodeName 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. |
affinity Kubernetes core/v1.Affinity | (Optional) Contains a group of affinity scheduling rules. Refer to https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ |
topologySpreadConstraints []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/ |
schedulerName 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 |
---|---|
targetPodName 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 |
---|---|
csiDriverName 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. |
csiDriverSecretTemplate string | (Optional) A Go template that used to render and generate |
storageClassTemplate string | (Optional) A Go template utilized to render and generate |
persistentVolumeClaimTemplate string | (Optional) A Go template that renders and generates |
datasafedConfigTemplate string | (Optional) A Go template used to render and generate |
parametersSchema 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 |
---|---|
phase StorageProviderPhase | The phase of the |
conditions []Kubernetes meta/v1.Condition | (Optional) Describes the current state of the |
SyncProgress
(Appears on:BackupDataActionSpec)
Field | Description |
---|---|
enabled 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. |
intervalSeconds 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 |
---|---|
volumes []string | (Optional) Specifies the list of volumes of targeted application that should be mounted on the backup workload. |
volumeMounts []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 |
---|---|
volumeSource 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. |
mountPath string | (Optional) Specifies the path within the restoring container at which the volume should be mounted. |
VolumeSnapshotStatus
(Appears on:ActionStatus, BackupStatus)
Field | Description |
---|---|
name string | (Optional) The name of the volume snapshot. |
contentName string | (Optional) The name of the volume snapshot content. |
volumeName string | (Optional) The name of the volume. |
size string | (Optional) The size of the volume snapshot. |
targetName string | Associates this volumeSnapshot with its corresponding target. |
Generated with gen-crd-api-reference-docs