备份 API 参考
Packages:
dataprotection.kubeblocks.io/v1alpha1
Resource Types:
Backup
Backup is the Schema for the backups API (defined by User).
| Field | Description | ||||||
|---|---|---|---|---|---|---|---|
apiVersionstring | dataprotection.kubeblocks.io/v1alpha1 | ||||||
kindstring | Backup | ||||||
metadataKubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of themetadata field. | ||||||
specBackupSpec |
| ||||||
statusBackupStatus |
BackupPolicy
BackupPolicy is the Schema for the backuppolicies API (defined by User)
| Field | Description | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
apiVersionstring | dataprotection.kubeblocks.io/v1alpha1 | ||||||||||
kindstring | BackupPolicy | ||||||||||
metadataKubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of themetadata field. | ||||||||||
specBackupPolicySpec |
| ||||||||||
statusBackupPolicyStatus |
BackupRepo
BackupRepo is the Schema for the backuprepos API
| Field | Description | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
apiVersionstring | dataprotection.kubeblocks.io/v1alpha1 | ||||||||||
kindstring | BackupRepo | ||||||||||
metadataKubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of themetadata field. | ||||||||||
specBackupRepoSpec |
| ||||||||||
statusBackupRepoStatus |
BackupTool
BackupTool is the Schema for the backuptools API (defined by provider)
| Field | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
apiVersionstring | dataprotection.kubeblocks.io/v1alpha1 | ||||||||||||||||||||
kindstring | BackupTool | ||||||||||||||||||||
metadataKubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of themetadata field. | ||||||||||||||||||||
specBackupToolSpec |
| ||||||||||||||||||||
statusBackupToolStatus |
RestoreJob
RestoreJob is the Schema for the restorejobs API (defined by User)
| Field | Description | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
apiVersionstring | dataprotection.kubeblocks.io/v1alpha1 | ||||||||||
kindstring | RestoreJob | ||||||||||
metadataKubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of themetadata field. | ||||||||||
specRestoreJobSpec |
| ||||||||||
statusRestoreJobStatus |
BackupLogStatus
(Appears on:ManifestsStatus)
| Field | Description |
|---|---|
startTimeKubernetes meta/v1.Time | (Optional) startTime records the start time of data logging. |
stopTimeKubernetes meta/v1.Time | (Optional) stopTime records the stop time of data logging. |
BackupMethod(string alias)
BackupMethod the backup method
| Value | Description |
|---|---|
"backupTool" | |
"snapshot" |
BackupPhase(string alias)
(Appears on:BackupStatus)
BackupPhase The current phase. Valid values are New, InProgress, Completed, Failed.
| Value | Description |
|---|---|
"Completed" | |
"Deleting" | |
"Failed" | |
"InProgress" | |
"New" | |
"Running" |
BackupPolicyHook
(Appears on:SnapshotPolicy)
BackupPolicyHook defines for the database execute commands before and after backup.
| Field | Description |
|---|---|
preCommands[]string | (Optional) pre backup to perform commands |
postCommands[]string | (Optional) post backup to perform commands |
imagestring | (Optional) exec command with image |
containerNamestring | (Optional) which container can exec command |
BackupPolicyPhase(string alias)
(Appears on:BackupPolicyStatus)
BackupPolicyPhase defines phases for BackupPolicy CR.
| Value | Description |
|---|---|
"Available" | |
"Failed" |
BackupPolicySecret
(Appears on:TargetCluster)
BackupPolicySecret defines for the target database secret that backup tool can connect.
| Field | Description |
|---|---|
namestring | the secret name |
usernameKeystring | usernameKey the map key of the user in the connection credential secret |
passwordKeystring | passwordKey the map key of the password in the connection credential secret |
BackupPolicySpec
(Appears on:BackupPolicy)
BackupPolicySpec defines the desired state of BackupPolicy
| Field | Description |
|---|---|
retentionRetentionSpec | (Optional) retention describe how long the Backup should be retained. if not set, will be retained forever. |
scheduleSchedule | (Optional) schedule policy for backup. |
snapshotSnapshotPolicy | (Optional) the policy for snapshot backup. |
datafileCommonBackupPolicy | (Optional) the policy for datafile backup. |
logfileCommonBackupPolicy | (Optional) the policy for logfile backup. |
BackupPolicyStatus
(Appears on:BackupPolicy)
BackupPolicyStatus defines the observed state of BackupPolicy
| Field | Description |
|---|---|
observedGenerationint64 | (Optional) observedGeneration is the most recent generation observed for this |
phaseBackupPolicyPhase | (Optional) backup policy phase valid value: Available, Failed. |
failureReasonstring | (Optional) the reason if backup policy check failed. |
lastScheduleTimeKubernetes meta/v1.Time | (Optional) information when was the last time the job was successfully scheduled. |
lastSuccessfulTimeKubernetes meta/v1.Time | (Optional) information when was the last time the job successfully completed. |
BackupRepoPhase(string alias)
(Appears on:BackupRepoStatus)
BackupRepoPhase defines phases for BackupRepo CR.
| Value | Description |
|---|---|
"Deleting" | |
"Failed" | |
"PreChecking" | |
"Ready" |
BackupRepoSpec
(Appears on:BackupRepo)
BackupRepoSpec defines the desired state of BackupRepo
| Field | Description |
|---|---|
storageProviderRefstring | The storage provider used by this backup repo. |
volumeCapacityKubernetes resource.Quantity | (Optional) The requested capacity for the PVC created by this backup repo. |
pvReclaimPolicyKubernetes core/v1.PersistentVolumeReclaimPolicy | The reclaim policy for the PV created by this backup repo. |
configmap[string]string | (Optional) Non-secret configurations for the storage provider. |
credentialKubernetes core/v1.SecretReference | (Optional) A secret that contains the credentials needed by the storage provider. |
BackupRepoStatus
(Appears on:BackupRepo)
BackupRepoStatus defines the observed state of BackupRepo
| Field | Description |
|---|---|
phaseBackupRepoPhase | (Optional) Backup repo reconciliation phases. Valid values are PreChecking, Failed, Ready, Deleting. |
conditions[]Kubernetes meta/v1.Condition | (Optional) conditions describes the current state of the repo. |
observedGenerationint64 | (Optional) observedGeneration is the latest generation observed by the controller. |
generatedCSIDriverSecretKubernetes core/v1.SecretReference | (Optional) generatedCSIDriverSecret references the generated secret used by the CSI driver. |
generatedStorageClassNamestring | (Optional) generatedStorageClassName indicates the generated storage class name. |
backupPVCNamestring | (Optional) backupPVCName is the name of the PVC used to store backup data. |
isDefaultbool | (Optional) isDefault indicates whether this backup repo is the default one. |
BackupSnapshotStatus
(Appears on:ManifestsStatus)
| Field | Description |
|---|---|
volumeSnapshotNamestring | (Optional) volumeSnapshotName records the volumeSnapshot name. |
volumeSnapshotContentNamestring | (Optional) volumeSnapshotContentName specifies the name of a pre-existing VolumeSnapshotContent |
BackupSpec
(Appears on:Backup)
BackupSpec defines the desired state of Backup.
| Field | Description |
|---|---|
backupPolicyNamestring | Which backupPolicy is applied to perform this backup |
backupTypeBackupType | Backup Type. datafile or logfile or snapshot. If not set, datafile is the default type. |
parentBackupNamestring | (Optional) if backupType is incremental, parentBackupName is required. |
BackupStatus
(Appears on:Backup)
BackupStatus defines the observed state of Backup.
| Field | Description |
|---|---|
phaseBackupPhase | (Optional) |
parentBackupNamestring | (Optional) Records parentBackupName if backupType is incremental. |
expirationKubernetes meta/v1.Time | (Optional) The date and time when the Backup is eligible for garbage collection. |
startTimestampKubernetes meta/v1.Time | (Optional) Date/time when the backup started being processed. |
completionTimestampKubernetes meta/v1.Time | (Optional) Date/time when the backup finished being processed. |
durationKubernetes meta/v1.Duration | (Optional) The duration time of backup execution. |
totalSizestring | (Optional) Backup total size. |
failureReasonstring | (Optional) The reason for a backup failure. |
persistentVolumeClaimNamestring | (Optional) remoteVolume saves the backup data. |
logFilePersistentVolumeClaimNamestring | (Optional) logFilePersistentVolumeClaimName saves the logfile backup data. |
backupToolNamestring | (Optional) backupToolName references the backup tool name. |
sourceClusterstring | sourceCluster records the source cluster information for this backup. |
availableReplicasint32 | (Optional) availableReplicas available replicas for statefulSet which created by backup. |
manifestsManifestsStatus | (Optional) manifests determines the backup metadata info. |
BackupStatusUpdate
(Appears on:BasePolicy)
| Field | Description |
|---|---|
pathstring | (Optional) specify the json path of backup object for patch. |
containerNamestring | (Optional) which container name that kubectl can execute. |
scriptstring | (Optional) the shell Script commands to collect backup status metadata. |
useTargetPodServiceAccountbool | (Optional) useTargetPodServiceAccount defines whether this job requires the service account of the backup target pod. |
updateStageBackupStatusUpdateStage | when to update the backup status, pre: before backup, post: after backup |
BackupStatusUpdateStage(string alias)
(Appears on:BackupStatusUpdate)
BackupStatusUpdateStage defines the stage of backup status update.
| Value | Description |
|---|---|
"post" | |
"pre" |
BackupToolManifestsStatus
(Appears on:ManifestsStatus)
| Field | Description |
|---|---|
filePathstring | (Optional) filePath records the file path of backup. |
logFilePathstring | (Optional) logFilePath records the log file path of backup. |
volumeNamestring | (Optional) volumeName records volume name of backup data pvc. |
uploadTotalSizestring | (Optional) Backup upload total size. |
checksumstring | (Optional) checksum of backup file, generated by md5 or sha1 or sha256. |
checkpointstring | (Optional) backup checkpoint, for incremental backup. |
BackupToolRestoreCommand
(Appears on:LogicalConfig, PhysicalConfig)
BackupToolRestoreCommand defines the restore commands of BackupTool
| Field | Description |
|---|---|
restoreCommands[]string | (Optional) Array of command that apps can perform database restore. |
incrementalRestoreCommands[]string | (Optional) Array of incremental restore commands. |
BackupToolSpec
(Appears on:BackupTool)
BackupToolSpec defines the desired state of BackupTool
| Field | Description |
|---|---|
imagestring | Backup tool Container image name. |
deployKindDeployKind | which kind for run a backup tool, supported values: job, statefulSet. |
typestring | the type of backup tool, file or pitr |
resourcesKubernetes core/v1.ResourceRequirements | (Optional) Compute Resources required by this container. |
env[]Kubernetes core/v1.EnvVar | (Optional) List of environment variables to set in the container. |
envFrom[]Kubernetes core/v1.EnvFromSource | (Optional) List of sources to populate environment variables in the container. |
backupCommands[]string | Array of command that apps can do database backup. |
incrementalBackupCommands[]string | (Optional) Array of command that apps can do database incremental backup. |
physicalPhysicalConfig | (Optional) backup tool can support physical restore, in this case, restore must be RESTART database. |
logicalLogicalConfig | (Optional) backup tool can support logical restore, in this case, restore NOT RESTART database. |
BackupToolStatus
(Appears on:BackupTool)
BackupToolStatus defines the observed state of BackupTool
BackupType(string alias)
(Appears on:BackupSpec)
BackupType the backup type, marked backup set is datafile or logfile or snapshot.
| Value | Description |
|---|---|
"datafile" | |
"logfile" | |
"snapshot" |
BaseBackupType(string alias)
BaseBackupType the base backup type.
BasePolicy
(Appears on:CommonBackupPolicy, SnapshotPolicy)
| Field | Description |
|---|---|
targetTargetCluster | target database cluster for backup. |
backupsHistoryLimitint32 | (Optional) the number of automatic backups to retain. Value must be non-negative integer. |
onFailAttemptedint32 | (Optional) count of backup stop retries on fail. |
backupStatusUpdates[]BackupStatusUpdate | (Optional) define how to update metadata for backup status. |
CommonBackupPolicy
(Appears on:BackupPolicySpec)
| Field | Description |
|---|---|
BasePolicyBasePolicy | (Members of |
persistentVolumeClaimPersistentVolumeClaim | (Optional) refer to PersistentVolumeClaim and the backup data will be stored in the corresponding persistent volume. |
backupRepoNamestring | (Optional) refer to BackupRepo and the backup data will be stored in the corresponding repo. |
backupToolNamestring | which backup tool to perform database backup, only support one tool. |
CreatePVCPolicy(string alias)
(Appears on:PersistentVolumeClaim)
CreatePVCPolicy the policy how to create the PersistentVolumeClaim for backup.
| Value | Description |
|---|---|
"IfNotPresent" | |
"Never" |
DeployKind(string alias)
(Appears on:BackupToolSpec)
DeployKind which kind for run a backup tool.
| Value | Description |
|---|---|
"job" | |
"statefulSet" |
LogicalConfig
(Appears on:BackupToolSpec)
| Field | Description |
|---|---|
BackupToolRestoreCommandBackupToolRestoreCommand | (Members of |
podScopePodRestoreScope | (Optional) podScope defines the pod scope for restore from backup, supported values: |
ManifestsStatus
(Appears on:BackupStatus)
| Field | Description |
|---|---|
backupLogBackupLogStatus | (Optional) backupLog records startTime and stopTime of data logging. |
targetstring | (Optional) target records the target cluster metadata string, which is in JSON format. |
backupSnapshotBackupSnapshotStatus | (Optional) snapshot records the volume snapshot metadata. |
backupToolBackupToolManifestsStatus | (Optional) backupTool records information about backup files generated by the backup tool. |
userContextmap[string]string | (Optional) userContext stores some loosely structured and extensible information. |
PersistentVolumeClaim
(Appears on:CommonBackupPolicy)
| Field | Description |
|---|---|
namestring | (Optional) the name of PersistentVolumeClaim to store backup data. |
storageClassNamestring | (Optional) storageClassName is the name of the StorageClass required by the claim. |
initCapacityKubernetes resource.Quantity | (Optional) initCapacity represents the init storage size of the PersistentVolumeClaim which should be created if not exist. |
createPolicyCreatePVCPolicy | (Optional) createPolicy defines the policy for creating the PersistentVolumeClaim, enum values: |
persistentVolumeConfigMapPersistentVolumeConfigMap | (Optional) persistentVolumeConfigMap references the configmap which contains a persistentVolume template. |
PersistentVolumeConfigMap
(Appears on:PersistentVolumeClaim)
| Field | Description |
|---|---|
namestring | the name of the persistentVolume ConfigMap. |
namespacestring | the namespace of the persistentVolume ConfigMap. |
PhysicalConfig
(Appears on:BackupToolSpec)
| Field | Description |
|---|---|
BackupToolRestoreCommandBackupToolRestoreCommand | (Members of |
relyOnLogfilebool | (Optional) relyOnLogfile defines whether the current recovery relies on log files |
PodRestoreScope(string alias)
(Appears on:LogicalConfig)
PodRestoreScope defines the scope pod for restore from backup.
RestoreJobPhase(string alias)
(Appears on:RestoreJobStatus)
RestoreJobPhase The current phase. Valid values are New, InProgressPhy, InProgressLogic, Completed, Failed.
| Value | Description |
|---|---|
"Completed" | |
"Failed" | |
"InProgressLogic" | |
"InProgressPhy" | |
"New" |
RestoreJobSpec
(Appears on:RestoreJob)
RestoreJobSpec defines the desired state of RestoreJob
| Field | Description |
|---|---|
backupJobNamestring | Specified one backupJob to restore. |
targetTargetCluster | the target database workload to restore |
targetVolumes[]Kubernetes core/v1.Volume | array of restore volumes . |
targetVolumeMounts[]Kubernetes core/v1.VolumeMount | array of restore volume mounts . |
onFailAttemptedint32 | (Optional) count of backup stop retries on fail. |
RestoreJobStatus
(Appears on:RestoreJob)
RestoreJobStatus defines the observed state of RestoreJob
| Field | Description |
|---|---|
phaseRestoreJobPhase | (Optional) |
expirationKubernetes meta/v1.Time | (Optional) The date and time when the Backup is eligible for garbage collection. |
startTimestampKubernetes meta/v1.Time | (Optional) Date/time when the backup started being processed. |
completionTimestampKubernetes meta/v1.Time | (Optional) Date/time when the backup finished being processed. |
failureReasonstring | (Optional) Job failed reason. |
RetentionSpec
(Appears on:BackupPolicySpec)
| Field | Description |
|---|---|
ttlstring | (Optional) ttl is a time string ending with the ’d’|’D’|‘h’|‘H’ character to describe how long |
Schedule
(Appears on:BackupPolicySpec)
| Field | Description |
|---|---|
startingDeadlineMinutesint64 | (Optional) startingDeadlineMinutes defines the deadline in minutes for starting the backup job |
snapshotSchedulePolicy | (Optional) schedule policy for snapshot backup. |
datafileSchedulePolicy | (Optional) schedule policy for datafile backup. |
logfileSchedulePolicy | (Optional) schedule policy for logfile backup. |
SchedulePolicy
(Appears on:Schedule)
| Field | Description |
|---|---|
cronExpressionstring | the cron expression for schedule, the timezone is in UTC. see https://en.wikipedia.org/wiki/Cron. |
enablebool | enable or disable the schedule. |
SnapshotPolicy
(Appears on:BackupPolicySpec)
| Field | Description |
|---|---|
BasePolicyBasePolicy | (Members of |
hooksBackupPolicyHook | (Optional) execute hook commands for backup. |
TargetCluster
(Appears on:BasePolicy, RestoreJobSpec)
TargetCluster TODO (dsj): target cluster need redefined from Cluster API
| Field | Description |
|---|---|
labelsSelectorKubernetes meta/v1.LabelSelector | labelsSelector is used to find matching pods. |
secretBackupPolicySecret | (Optional) secret is used to connect to the target database cluster. |
Generated with gen-crd-api-reference-docs