This resource is namespace scoped, refer to [Namespace](./namespace.md) for details.

### Custom Resources

* [Backup](#backup)

### Sub Resources

* [BackupCondition](#backupcondition)
* [BackupList](#backuplist)
* [BackupSpec](#backupspec)
* [BackupStatus](#backupstatus)
* [LogSubCommandStatus](#logsubcommandstatus)

#### Backup

Backup is the Schema for the backups API

| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| metadata |  | metav1.ObjectMeta | false |
| spec |  | [BackupSpec](#backupspec) | true |
| status |  | [BackupStatus](#backupstatus) | false |

[Back to Custom Resources](#custom-resources)

#### BackupCondition

BackupCondition describes the observed state of a Backup at a certain point.

| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| command |  | LogSubCommandType | false |
| type |  | BackupConditionType | true |
| status |  | corev1.ConditionStatus | true |
| lastTransitionTime |  | metav1.Time | false |
| reason |  | string | false |
| message |  | string | false |

[Back to Custom Resources](#custom-resources)

#### BackupList

BackupList contains a list of Backup

| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| metadata |  | metav1.ListMeta | false |
| items |  | [][Backup](#backup) | true |

[Back to Custom Resources](#custom-resources)

#### BackupSpec

BackupSpec defines the desired state of Backup

| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| clusterName | ClusterName is the target cluster name, target cluster must exist in the same namespace as backup | string | true |
| mode | Mode is the backup mode, such as snapshot backup or log backup. | *BackupMode | false |
| commitTS | CommitTs is the commit ts of the backup, snapshot ts for snapshot backup or start ts for log backup. Format supports TSO or datetime, e.g. '400036290571534337', '2018-05-11 01:42:23'. Default is current timestamp. | *string | false |
| tableFilter | TableFilter means table filter expression for 'db.table' matching. | []string | false |
| logTruncateUntil | LogTruncateUntil is log backup truncate until timestamp. Format supports TSO or datetime, e.g. '400036290571534337', '2018-05-11 01:42:23'. | *string | false |
| logStop | LogStop indicates that will stop the log backup. | *bool | false |
| storage | Storage is the target storage address, use s3 uri. like gs://xxxx | *string | false |
| clean_policy | CleanPolicy indicates how to clean backup | *CleanPolicy | false |
| options | Options is the parameters list of br, like --backupts=xxx | []string | false |
| configuration | Configuration is the configuration passed from dataflow it is used to replace gitops | *DPConfiguration | false |
| nodeRole | NodeRole is the aws role or gcp service account that the br node uses | *string | false |
| env | Env adds environment variables to backup pod | []corev1.EnvVar | false |
| resourceRequirements | ResourceRequirements manage resources(cpu,memory) of backup pod | *corev1.ResourceRequirements | false |
| instanceType | InstanceType specifies the instance type required by backup pod | *string | false |
| accountRef | Attach the account ref into the backup when it is created Now we use the account same with the network | *AccountReference | false |
| paused | Paused specifies whether to pause the reconciliation loop for Backup CR | *bool | false |

[Back to Custom Resources](#custom-resources)

#### BackupStatus

BackupStatus defines the observed state of Backup

| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| phase | Phase denotes current backup progress | BackupConditionType | true |
| backupSize | BackupSize is the physical storage size taken by the backup assets | int64 | false |
| backupTS | BackupTS is the snapshot timestamp for snapshot backup or start timestamp for log backup | string | false |
| bucketName | BucketName is the object store path of this backup | string | false |
| backupPath | BackupPath is the location of the backup. | string | false |
| logCheckpointTs | LogCheckpointTs is the ts of log backup process | string | false |
| logTruncateUntil | LogTruncateUntil is log backup truncate until timestamp which will be the same as Spec.LogTruncateUntil when truncate is complete | string | false |
| logSubCommandStatuses | LogSubCommandStatuses is the detail status of log backup subcommands, record each command separately, but only record the last command. | map[LogSubCommandType][LogSubCommandStatus](#logsubcommandstatus) | false |
| fromProvider | FromProvider encodes the provider specific status of the backup, e.g. target shoot name of the backup | runtime.RawExtension | false |

[Back to Custom Resources](#custom-resources)

#### LogSubCommandStatus

LogSubCommandStatus is the log backup subcommand's status.

| Field | Description | Scheme | Required |
| ----- | ----------- | ------ | -------- |
| command | Command is the log backup subcommand. | LogSubCommandType | false |
| timeStarted | TimeStarted is the time at which the command was started. | metav1.Time | false |
| timeCompleted | TimeCompleted is the time at which the command was completed. | metav1.Time | false |
| logTruncatingUntil | LogTruncatingUntil is log backup truncate until timestamp which is used to mark the truncate command. | string | false |
| phase | Phase is the command current phase. | BackupConditionType | false |
| conditions |  | [][BackupCondition](#backupcondition) | false |

[Back to Custom Resources](#custom-resources)
