CouchbaseBackup Resource
CouchbaseBackup allows automatic backup of all data from a Couchbase cluster into persistent storage.
The following is an example resource, depicting the overall structure and any defaults (consult the field reference for valid values for "empty" values, such as empty strings etc.):
apiVersion: v2
kind: CouchbaseBackup
metadata:
name: ""
spec:
autoScaling:
incrementPercent: 20
limit: ""
thresholdPercent: 20
backoffLimit: 2
backupRetention: 720h
data:
exclude:
- ""
include:
- ""
ephemeralVolume: false
failedJobsHistoryLimit: 3
full:
schedule: ""
incremental:
schedule: ""
logRetention: 168h
objectStore:
endpoint:
secret: ""
url: ""
useVirtualPath: false
secret: ""
uri: ""
useIAM: false
s3bucket: ""
services:
analytics: True
bucketConfig: True
bucketQuery: True
clusterAnalytics: True
clusterQuery: True
data: True
eventing: True
ftsAliases: True
ftsIndexes: True
gsIndexes: True
views: True
size: 20Gi
storageClassName: ""
strategy: full_incremental
successfulJobsHistoryLimit: 3
threads: 1
ttlSecondsAfterFinished: 0
status:
archive: ""
backups:
- full: ""
incrementals:
- ""
name: ""
capacityUsed: ""
cronjob: ""
duration: ""
failed: false
job: ""
lastFailure: ""
lastRun: ""
lastSuccess: ""
output: ""
pod: ""
repo: ""
running: false
couchbasebackups.apiVersion
Description
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources.
couchbasebackups.kind
Description
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds.
couchbasebackups.metadata
Description
Standard object metadata as defined for all Kubernetes types.
For additional details see the Kubernetes reference documentation.
couchbasebackups.metadata.name
Description
The name of a resource. This must be unique for the kind of resource within the namespace.
All resources must have a name.
The name may be omitted and metadata.generateName
used instead to generate a unique resource name.
For additional details on resource names, see the Kubernetes reference documentation.
couchbasebackups.metadata.namespace
Description
The namespace the resource resides in. All resources reside in a namespace.
The namespace is optional and may be specified in YAML configuration to override the namespace supplied by kubectl
.
For additional details on namespaces, see the Kubernetes reference documentation.
couchbasebackups.metadata.labels
Description
Labels allow resources to be labeled with key/value pairs of data. Labels are indexed and allow resources to be selected based upon specified labels.
Labels are relevant for certain types when using label selection within your resources.
For additional details on labels and selectors, see the Kubernetes reference documentation.
couchbasebackups.metadata.annotations
Description
Annotations allow resources to be annotated with key/value pairs of data. Annotations are arbitrary, and not indexed, so cannot be used to select resources, however may be used to add context or accounting to your resources.
For additional details on annotations, see the Kubernetes reference documentation.
couchbasebackups.spec
Description
CouchbaseBackupSpec is allows the specification of how a Couchbase backup is configured, including when backups are performed, how long they are retained for, and where they are backed up to.
couchbasebackups.spec.autoScaling.limit
Constraints
Type: string
Pattern (Regular Expression): ^(\+|-)?[0-9]+(\.[0-9]*)?)|(\.[0-9]+[KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]\*)?)|(\.[0-9]+))?$
Description
Limit imposes a hard limit on the size we can autoscale to. When not specified no bounds are imposed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#resource-units-in-kubernetes.
couchbasebackups.spec.autoScaling.thresholdPercent
Description
ThresholdPercent determines the point at which a volume is autoscaled. This represents the percentage of free space remaining on the volume, when less than this threshold, it will trigger a volume expansion. For example, if the volume is 100Gi, and the threshold 20%, then a resize will be triggered when the used capacity exceeds 80Gi, and free space is less than 20Gi. This field defaults to 20 if not specified.
couchbasebackups.spec.backupRetention
Description
Number of hours to hold backups for, everything older will be deleted. More info: https://golang.org/pkg/time/#ParseDuration.
couchbasebackups.spec.data.exclude
Constraints
Type: []string
Minimum Items: 1
Pattern (Regular Expression): ^(?:[a-zA-Z0-9\-%]|\\.){1,100}(\._default(\._default)?|\.[a-zA-Z0-9\-][a-zA-Z0-9\-%]{0,29}(\.[a-zA-Z0-9\-][a-zA-Z0-9\-%_]{0,29})?)?$
Description
Exclude defines the buckets, scopes or collections that are excluded from the backup.
When this field is set, it implies that by default everything will be backed up, and data items can be explicitly excluded.
You may define an exclusion as a bucket — my-bucket
, a scope — my-bucket.my-scope
, or a collection — my-bucket.my-scope.my-collection
.
Buckets may contain periods, and therefore must be escaped — my\.bucket.my-scope
, as period is the separator used to delimit scopes and collections.
Excluded data cannot overlap e.g.
specifying my-bucket
and my-bucket.my-scope
is illegal.
This field cannot be used at the same time as included items.
couchbasebackups.spec.data.include
Constraints
Type: []string
Minimum Items: 1
Pattern (Regular Expression): ^(?:[a-zA-Z0-9\-%]|\\.){1,100}(\._default(\._default)?|\.[a-zA-Z0-9\-][a-zA-Z0-9\-%]{0,29}(\.[a-zA-Z0-9\-][a-zA-Z0-9\-%_]{0,29})?)?$
Description
Include defines the buckets, scopes or collections that are included in the backup.
When this field is set, it implies that by default nothing will be backed up, and data items must be explicitly included.
You may define an inclusion as a bucket — my-bucket
, a scope — my-bucket.my-scope
, or a collection — my-bucket.my-scope.my-collection
.
Buckets may contain periods, and therefore must be escaped — my\.bucket.my-scope
, as period is the separator used to delimit scopes and collections.
Included data cannot overlap e.g.
specifying my-bucket
and my-bucket.my-scope
is illegal.
This field cannot be used at the same time as excluded items.
couchbasebackups.spec.logRetention
Description
Number of hours to hold script logs for, everything older will be deleted. More info: https://golang.org/pkg/time/#ParseDuration.
couchbasebackups.spec.objectStore.endpoint
Description
Endpoint contains the configuration for connecting to a custom Azure/S3/GCP compliant object store.
If set will override CouchbaseCluster.spec.backup.objectEndpoint
See https://docs.couchbase.com/server/current/backup-restore/cbbackupmgr-cloud.html#compatible-object-stores.
couchbasebackups.spec.objectStore.secret
Description
ObjStoreSecret must contain two fields, access-key-id, secret-access-key and optionally either region or refresh-token. These correspond to the fields used by cbbackupmgr https://docs.couchbase.com/server/current/backup-restore/cbbackupmgr-backup.html#optional-2.
couchbasebackups.spec.size
Constraints
Type: string
Default: 20Gi
Pattern (Regular Expression): ^(\+|-)?[0-9]+(\.[0-9]*)?)|(\.[0-9]+[KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]\*)?)|(\.[0-9]+))?$
Description
Size allows the specification of a backup persistent volume, when using volume based backup. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#resource-units-in-kubernetes.
couchbasebackups.spec.strategy
Description
Strategy defines how to perform backups.
full_only
will only perform full backups, and you must define a schedule in the spec.full
field.
full_incremental
will perform periodic full backups, and incremental backups in between.
You must define full and incremental schedules in the spec.full
and spec.incremental
fields respectively.
Care should be taken to ensure full and incremental schedules do not overlap, taking into account the backup time, as this will cause failures as the jobs attempt to mount the same backup volume.
This field default to full_incremental
.
Info: https://docs.couchbase.com/server/current/backup-restore/cbbackupmgr-strategies.html.
couchbasebackups.status
Description
CouchbaseBackupStatus provides status notifications about the Couchbase backup including when the last backup occurred, whether is succeeded or not, the run time of the backup and the size of the backup.
couchbasebackups.status.capacityUsed
Constraints
Type: string
Pattern (Regular Expression): ^(\+|-)?[0-9]+(\.[0-9]*)?)|(\.[0-9]+[KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]\*)?)|(\.[0-9]+))?$
Description
CapacityUsed tells us how much of the PVC we are using. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#resource-units-in-kubernetes.
couchbasebackups.status.duration
Description
Duration tells us how long the last backup took. More info: https://golang.org/pkg/time/#ParseDuration.