备份 API 参考
Packages:
dataprotection.kubeblocks.io/v1alpha1
Resource Types:
Backup
Backup is the Schema for the backups API (defined by User).
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 (defined by User)
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 the Schema for the backuprepos API
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 |
BackupTool
BackupTool is the Schema for the backuptools API (defined by provider)
Field | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
apiVersion string | dataprotection.kubeblocks.io/v1alpha1 | ||||||||||||||||||||
kind string | BackupTool | ||||||||||||||||||||
metadata Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of themetadata field. | ||||||||||||||||||||
spec BackupToolSpec |
| ||||||||||||||||||||
status BackupToolStatus |
RestoreJob
RestoreJob is the Schema for the restorejobs API (defined by User)
Field | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
apiVersion string | dataprotection.kubeblocks.io/v1alpha1 | ||||||||||
kind string | RestoreJob | ||||||||||
metadata Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of themetadata field. | ||||||||||
spec RestoreJobSpec |
| ||||||||||
status RestoreJobStatus |
BackupLogStatus
(Appears on:ManifestsStatus)
Field | Description |
---|---|
startTime Kubernetes meta/v1.Time | (Optional) startTime records the start time of data logging. |
stopTime Kubernetes 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 |
image string | (Optional) exec command with image |
containerName string | (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 |
---|---|
name string | the secret name |
usernameKey string | usernameKey the map key of the user in the connection credential secret |
passwordKey string | 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 |
---|---|
retention RetentionSpec | (Optional) retention describe how long the Backup should be retained. if not set, will be retained forever. |
schedule Schedule | (Optional) schedule policy for backup. |
snapshot SnapshotPolicy | (Optional) the policy for snapshot backup. |
datafile CommonBackupPolicy | (Optional) the policy for datafile backup. |
logfile CommonBackupPolicy | (Optional) the policy for logfile backup. |
BackupPolicyStatus
(Appears on:BackupPolicy)
BackupPolicyStatus defines the observed state of BackupPolicy
Field | Description |
---|---|
observedGeneration int64 | (Optional) observedGeneration is the most recent generation observed for this |
phase BackupPolicyPhase | (Optional) backup policy phase valid value: Available, Failed. |
failureReason string | (Optional) the reason if backup policy check failed. |
lastScheduleTime Kubernetes meta/v1.Time | (Optional) information when was the last time the job was successfully scheduled. |
lastSuccessfulTime Kubernetes 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 |
---|---|
storageProviderRef string | The storage provider used by this backup repo. |
volumeCapacity Kubernetes resource.Quantity | (Optional) The requested capacity for the PVC created by this backup repo. |
pvReclaimPolicy Kubernetes core/v1.PersistentVolumeReclaimPolicy | The reclaim policy for the PV created by this backup repo. |
config map[string]string | (Optional) Non-secret configurations for the storage provider. |
credential Kubernetes 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 |
---|---|
phase BackupRepoPhase | (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. |
observedGeneration int64 | (Optional) observedGeneration is the latest generation observed by the controller. |
generatedCSIDriverSecret Kubernetes core/v1.SecretReference | (Optional) generatedCSIDriverSecret references the generated secret used by the CSI driver. |
generatedStorageClassName string | (Optional) generatedStorageClassName indicates the generated storage class name. |
backupPVCName string | (Optional) backupPVCName is the name of the PVC used to store backup data. |
isDefault bool | (Optional) isDefault indicates whether this backup repo is the default one. |
BackupSnapshotStatus
(Appears on:ManifestsStatus)
Field | Description |
---|---|
volumeSnapshotName string | (Optional) volumeSnapshotName records the volumeSnapshot name. |
volumeSnapshotContentName string | (Optional) volumeSnapshotContentName specifies the name of a pre-existing VolumeSnapshotContent |
BackupSpec
(Appears on:Backup)
BackupSpec defines the desired state of Backup.
Field | Description |
---|---|
backupPolicyName string | Which backupPolicy is applied to perform this backup |
backupType BackupType | Backup Type. datafile or logfile or snapshot. If not set, datafile is the default type. |
parentBackupName string | (Optional) if backupType is incremental, parentBackupName is required. |
BackupStatus
(Appears on:Backup)
BackupStatus defines the observed state of Backup.
Field | Description |
---|---|
phase BackupPhase | (Optional) |
parentBackupName string | (Optional) Records parentBackupName if backupType is incremental. |
expiration Kubernetes meta/v1.Time | (Optional) The date and time when the Backup is eligible for garbage collection. |
startTimestamp Kubernetes meta/v1.Time | (Optional) Date/time when the backup started being processed. |
completionTimestamp Kubernetes meta/v1.Time | (Optional) Date/time when the backup finished being processed. |
duration Kubernetes meta/v1.Duration | (Optional) The duration time of backup execution. |
totalSize string | (Optional) Backup total size. |
failureReason string | (Optional) The reason for a backup failure. |
persistentVolumeClaimName string | (Optional) remoteVolume saves the backup data. |
logFilePersistentVolumeClaimName string | (Optional) logFilePersistentVolumeClaimName saves the logfile backup data. |
backupToolName string | (Optional) backupToolName references the backup tool name. |
sourceCluster string | sourceCluster records the source cluster information for this backup. |
availableReplicas int32 | (Optional) availableReplicas available replicas for statefulSet which created by backup. |
manifests ManifestsStatus | (Optional) manifests determines the backup metadata info. |
BackupStatusUpdate
(Appears on:BasePolicy)
Field | Description |
---|---|
path string | (Optional) specify the json path of backup object for patch. |
containerName string | (Optional) which container name that kubectl can execute. |
script string | (Optional) the shell Script commands to collect backup status metadata. |
useTargetPodServiceAccount bool | (Optional) useTargetPodServiceAccount defines whether this job requires the service account of the backup target pod. |
updateStage BackupStatusUpdateStage | 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 |
---|---|
filePath string | (Optional) filePath records the file path of backup. |
logFilePath string | (Optional) logFilePath records the log file path of backup. |
volumeName string | (Optional) volumeName records volume name of backup data pvc. |
uploadTotalSize string | (Optional) Backup upload total size. |
checksum string | (Optional) checksum of backup file, generated by md5 or sha1 or sha256. |
checkpoint string | (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 |
---|---|
image string | Backup tool Container image name. |
deployKind DeployKind | which kind for run a backup tool, supported values: job, statefulSet. |
type string | the type of backup tool, file or pitr |
resources Kubernetes 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. |
physical PhysicalConfig | (Optional) backup tool can support physical restore, in this case, restore must be RESTART database. |
logical LogicalConfig | (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 |
---|---|
target TargetCluster | target database cluster for backup. |
backupsHistoryLimit int32 | (Optional) the number of automatic backups to retain. Value must be non-negative integer. |
onFailAttempted int32 | (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 |
---|---|
BasePolicy BasePolicy | (Members of |
persistentVolumeClaim PersistentVolumeClaim | (Optional) refer to PersistentVolumeClaim and the backup data will be stored in the corresponding persistent volume. |
backupRepoName string | (Optional) refer to BackupRepo and the backup data will be stored in the corresponding repo. |
backupToolName string | 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 |
---|---|
BackupToolRestoreCommand BackupToolRestoreCommand | (Members of |
podScope PodRestoreScope | (Optional) podScope defines the pod scope for restore from backup, supported values: |
ManifestsStatus
(Appears on:BackupStatus)
Field | Description |
---|---|
backupLog BackupLogStatus | (Optional) backupLog records startTime and stopTime of data logging. |
target string | (Optional) target records the target cluster metadata string, which is in JSON format. |
backupSnapshot BackupSnapshotStatus | (Optional) snapshot records the volume snapshot metadata. |
backupTool BackupToolManifestsStatus | (Optional) backupTool records information about backup files generated by the backup tool. |
userContext map[string]string | (Optional) userContext stores some loosely structured and extensible information. |
PersistentVolumeClaim
(Appears on:CommonBackupPolicy)
Field | Description |
---|---|
name string | (Optional) the name of PersistentVolumeClaim to store backup data. |
storageClassName string | (Optional) storageClassName is the name of the StorageClass required by the claim. |
initCapacity Kubernetes resource.Quantity | (Optional) initCapacity represents the init storage size of the PersistentVolumeClaim which should be created if not exist. |
createPolicy CreatePVCPolicy | (Optional) createPolicy defines the policy for creating the PersistentVolumeClaim, enum values: |
persistentVolumeConfigMap PersistentVolumeConfigMap | (Optional) persistentVolumeConfigMap references the configmap which contains a persistentVolume template. |
PersistentVolumeConfigMap
(Appears on:PersistentVolumeClaim)
Field | Description |
---|---|
name string | the name of the persistentVolume ConfigMap. |
namespace string | the namespace of the persistentVolume ConfigMap. |
PhysicalConfig
(Appears on:BackupToolSpec)
Field | Description |
---|---|
BackupToolRestoreCommand BackupToolRestoreCommand | (Members of |
relyOnLogfile bool | (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 |
---|---|
backupJobName string | Specified one backupJob to restore. |
target TargetCluster | 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 . |
onFailAttempted int32 | (Optional) count of backup stop retries on fail. |
RestoreJobStatus
(Appears on:RestoreJob)
RestoreJobStatus defines the observed state of RestoreJob
Field | Description |
---|---|
phase RestoreJobPhase | (Optional) |
expiration Kubernetes meta/v1.Time | (Optional) The date and time when the Backup is eligible for garbage collection. |
startTimestamp Kubernetes meta/v1.Time | (Optional) Date/time when the backup started being processed. |
completionTimestamp Kubernetes meta/v1.Time | (Optional) Date/time when the backup finished being processed. |
failureReason string | (Optional) Job failed reason. |
RetentionSpec
(Appears on:BackupPolicySpec)
Field | Description |
---|---|
ttl string | (Optional) ttl is a time string ending with the ’d’|’D’|‘h’|‘H’ character to describe how long |
Schedule
(Appears on:BackupPolicySpec)
Field | Description |
---|---|
startingDeadlineMinutes int64 | (Optional) startingDeadlineMinutes defines the deadline in minutes for starting the backup job |
snapshot SchedulePolicy | (Optional) schedule policy for snapshot backup. |
datafile SchedulePolicy | (Optional) schedule policy for datafile backup. |
logfile SchedulePolicy | (Optional) schedule policy for logfile backup. |
SchedulePolicy
(Appears on:Schedule)
Field | Description |
---|---|
cronExpression string | the cron expression for schedule, the timezone is in UTC. see https://en.wikipedia.org/wiki/Cron. |
enable bool | enable or disable the schedule. |
SnapshotPolicy
(Appears on:BackupPolicySpec)
Field | Description |
---|---|
BasePolicy BasePolicy | (Members of |
hooks BackupPolicyHook | (Optional) execute hook commands for backup. |
TargetCluster
(Appears on:BasePolicy, RestoreJobSpec)
TargetCluster TODO (dsj): target cluster need redefined from Cluster API
Field | Description |
---|---|
labelsSelector Kubernetes meta/v1.LabelSelector | labelsSelector is used to find matching pods. |
secret BackupPolicySecret | (Optional) secret is used to connect to the target database cluster. |
Generated with gen-crd-api-reference-docs