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.):

      couchbasebackups.apiVersion

      Constraints

      Type: string

      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

      Constraints

      Type: string

      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

      Constraints

      Required

      Type: object

      Description

      Standard object metadata as defined for all Kubernetes types.

      For additional details see the Kubernetes reference documentation.

      couchbasebackups.metadata.name

      Constraints

      Type: string

      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

      Constraints

      Type: string

      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

      Constraints

      Type: map[string]string

      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

      Constraints

      Type: map[string]string

      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

      Constraints

      Required

      Type: object

      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

      Constraints

      Type: object

      Description

      AutoScaling allows the volume size to be dynamically increased. When specified, the backup volume will start with an initial size as defined by spec.size, and increase as required.

      couchbasebackups.spec.autoScaling.incrementPercent

      Constraints

      Type: integer

      Default: 20

      Minimum: 0

      Description

      IncrementPercent controls how much the volume is increased each time the threshold is exceeded, upto a maximum as defined by the limit. This field defaults to 20 if not specified.

      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

      Constraints

      Type: integer

      Default: 20

      Minimum: 0

      Maximum: 99

      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.backoffLimit

      Constraints

      Type: integer

      Default: 2

      Description

      Number of times a backup job should try to execute. Once it hits the BackoffLimit it will not run until the next scheduled job.

      couchbasebackups.spec.backupRetention

      Constraints

      Type: string

      Default: 720h

      Description

      Number of hours to hold backups for, everything older will be deleted. More info: https://golang.org/pkg/time/#ParseDuration.

      couchbasebackups.spec.data

      Constraints

      Type: object

      Description

      Data allows control over what key-value/document data is included in the backup. By default, all data is included. Modifications to this field will only take effect on the next full backup.

      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.defaultRecoveryMethod

      Constraints

      Type: string

      Default: none

      Enumerations: none, resume, purge

      Description

      DefaultRecoveryMethod specifies how cbbackupmgr should recover from broken backup/restore attempts. NOTE: To use the resume or purge parameters, you will need to install couchbasebackup version 1.3.5 or greater. For couchbasebackup versions earlier than 1.3.5 only the none parameter is supported.

      couchbasebackups.spec.ephemeralVolume

      Constraints

      Type: boolean

      Default: False

      Description

      EphemeralVolume sets backup to use an ephemeral volume instead of a persistent volume. This is used when backing up to a remote cloud provider, where a persistent volume is not needed.

      couchbasebackups.spec.failedJobsHistoryLimit

      Constraints

      Type: integer

      Default: 3

      Minimum: 0

      Description

      Amount of failed jobs to keep.

      couchbasebackups.spec.full

      Constraints

      Type: object

      Description

      Full is the schedule on when to take full backups. Used in Full/Incremental and FullOnly backup strategies.

      couchbasebackups.spec.full.schedule

      Constraints

      Required

      Type: string

      Description

      Schedule takes a cron schedule in string format.

      couchbasebackups.spec.incremental

      Constraints

      Type: object

      Description

      Incremental is the schedule on when to take incremental backups. Used in Full/Incremental backup strategies.

      couchbasebackups.spec.incremental.schedule

      Constraints

      Required

      Type: string

      Description

      Schedule takes a cron schedule in string format.

      couchbasebackups.spec.logRetention

      Constraints

      Type: string

      Default: 168h

      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

      Constraints

      Type: object

      Description

      ObjectStore allows for backing up to a remote cloud storage.

      couchbasebackups.spec.objectStore.endpoint

      Constraints

      Type: object

      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.endpoint.secret

      Constraints

      Type: string

      Description

      The name of the secret, in this namespace, that contains the CA certificate for verification of a TLS endpoint The secret must have the key with the name "tls.crt".

      couchbasebackups.spec.objectStore.endpoint.url

      Constraints

      Type: string

      Description

      The host/address of the custom object endpoint.

      couchbasebackups.spec.objectStore.endpoint.useVirtualPath

      Constraints

      Type: boolean

      Description

      UseVirtualPath will force the AWS SDK to use the new virtual style paths which are often required by S3 compatible object stores.

      couchbasebackups.spec.objectStore.secret

      Constraints

      Type: string

      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.objectStore.uri

      Constraints

      Type: string

      Pattern (Regular Expression): ^(az|s3|gs)://.{3,}$

      Description

      URI is a reference to a remote object store. This is the prefix of the object store and the bucket name. i.e s3://bucket, az://bucket or gs://bucket.

      couchbasebackups.spec.objectStore.useIAM

      Constraints

      Type: boolean

      Description

      Whether to allow the backup SDK to attempt to authenticate using the instance metadata api. If set, will override CouchbaseCluster.spec.backup.useIAM.

      couchbasebackups.spec.s3bucket

      Constraints

      Type: string

      Pattern (Regular Expression): ^s3://[a-z0-9-\.\/]{3,63}$

      Description

      DEPRECATED - by spec.objectStore.uri Name of S3 bucket to backup to.

      If non-empty this overrides local backup.

      couchbasebackups.spec.services

      Constraints

      Type: object

      Default: {}

      Description

      Services allows control over what services are included in the backup. By default, all service data and metadata are included apart from users. Modifications to this field will only take effect on the next full backup.

      couchbasebackups.spec.services.analytics

      Constraints

      Type: boolean

      Default: True

      Description

      Analytics enables the backup of analytics data. This field defaults to true.

      couchbasebackups.spec.services.bucketConfig

      Constraints

      Type: boolean

      Default: True

      Description

      BucketConfig enables the backup of bucket configuration. This field defaults to true.

      couchbasebackups.spec.services.bucketQuery

      Constraints

      Type: boolean

      Default: True

      Description

      BucketQuery enables the backup of query metadata for all buckets. This field defaults to true.

      couchbasebackups.spec.services.clusterAnalytics

      Constraints

      Type: boolean

      Default: True

      Description

      ClusterAnalytics enables the backup of cluster-wide analytics data, for example synonyms. This field defaults to true.

      couchbasebackups.spec.services.clusterQuery

      Constraints

      Type: boolean

      Default: True

      Description

      ClusterQuery enables the backup of cluster level query metadata. This field defaults to true.

      couchbasebackups.spec.services.data

      Constraints

      Type: boolean

      Default: True

      Description

      Data enables the backup of key-value data/documents for all buckets. This can be further refined with the couchbasebackups.spec.data configuration. This field defaults to true.

      couchbasebackups.spec.services.eventing

      Constraints

      Type: boolean

      Default: True

      Description

      Eventing enables the backup of eventing service metadata. This field defaults to true.

      couchbasebackups.spec.services.ftsAliases

      Constraints

      Type: boolean

      Default: True

      Description

      FTSAliases enables the backup of full-text search alias definitions. This field defaults to true.

      couchbasebackups.spec.services.ftsIndexes

      Constraints

      Type: boolean

      Default: True

      Description

      FTSIndexes enables the backup of full-text search index definitions for all buckets. This field defaults to true.

      couchbasebackups.spec.services.gsIndexes

      Constraints

      Type: boolean

      Default: True

      Description

      GSIndexes enables the backup of global secondary index definitions for all buckets. This field defaults to true.

      couchbasebackups.spec.services.users

      Constraints

      Type: boolean

      Default: False

      Description

      Users enables the backup of users including their roles and permissions. This is only available for Couchbase Server 7.6 and later. This field defaults to false.

      couchbasebackups.spec.services.views

      Constraints

      Type: boolean

      Default: True

      Description

      Views enables the backup of view definitions for all buckets. This field defaults to true.

      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.storageClassName

      Constraints

      Type: string

      Description

      Name of StorageClass to use.

      couchbasebackups.spec.strategy

      Constraints

      Type: string

      Default: full_incremental

      Enumerations: full_incremental, full_only, immediate_incremental, immediate_full

      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. To cause a backup to occur immediately use immediate_incremental or immediate_full for incremental or full backups respectively. This field default to full_incremental. Info: https://docs.couchbase.com/server/current/backup-restore/cbbackupmgr-strategies.html.

      couchbasebackups.spec.successfulJobsHistoryLimit

      Constraints

      Type: integer

      Default: 3

      Minimum: 0

      Description

      Amount of successful jobs to keep.

      couchbasebackups.spec.threads

      Constraints

      Type: integer

      Default: 1

      Minimum: 0

      Description

      How many threads to use during the backup. This field defaults to 1.

      couchbasebackups.spec.ttlSecondsAfterFinished

      Constraints

      Type: integer

      Minimum: 0

      Description

      Amount of time to elapse before a completed job is deleted.

      couchbasebackups.status

      Constraints

      Type: object

      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.archive

      Constraints

      Type: string

      Description

      Location of Backup Archive.

      couchbasebackups.status.backups

      Constraints

      Type: []object

      Description

      Backups gives us a full list of all backups and their respective repository locations.

      couchbasebackups.status.backups.full

      Constraints

      Type: string

      Description

      Full backup inside the repository.

      couchbasebackups.status.backups.incrementals

      Constraints

      Type: []string

      Description

      Incremental backups inside the repository.

      couchbasebackups.status.backups.name

      Constraints

      Required

      Type: string

      Description

      Name of the repository.

      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

      couchbasebackups.status.cronjob

      Constraints

      Type: string

      Description

      DEPRECATED - field may no longer be populated.

      Cronjob tells us which Cronjob the job belongs to.

      couchbasebackups.status.duration

      Constraints

      Type: string

      Description

      Duration tells us how long the last backup took. More info: https://golang.org/pkg/time/#ParseDuration.

      couchbasebackups.status.failed

      Constraints

      Required

      Type: boolean

      Description

      Failed indicates whether the most recent backup has failed.

      couchbasebackups.status.job

      Constraints

      Type: string

      Description

      DEPRECATED - field may no longer be populated.

      Job tells us which job is running/ran last.

      couchbasebackups.status.lastFailure

      Constraints

      Type: string

      Description

      LastFailure tells us the time the last failed backup failed.

      couchbasebackups.status.lastRun

      Constraints

      Type: string

      Description

      LastRun tells us the time the last backup job started.

      couchbasebackups.status.lastSuccess

      Constraints

      Type: string

      Description

      LastSuccess gives us the time the last successful backup finished.

      couchbasebackups.status.output

      Constraints

      Type: string

      Description

      DEPRECATED - field may no longer be populated.

      Output reports useful information from the backup_script.

      couchbasebackups.status.pod

      Constraints

      Type: string

      Description

      DEPRECATED - field may no longer be populated.

      Pod tells us which pod is running/ran last.

      couchbasebackups.status.repo

      Constraints

      Type: string

      Description

      Repo is where we are currently performing operations.

      couchbasebackups.status.running

      Constraints

      Required

      Type: boolean

      Description

      Running indicates whether a backup is currently being performed.