REST Resource: projects.locations.backupPlans.backups

Resource: Backup

Represents a request to perform a single point-in-time capture of some portion of the state of a GKE cluster, the record of the backup operation itself, and an anchor for the underlying artifacts that comprise the Backup (the config backup and VolumeBackups).

JSON representation
{
  "name": string,
  "uid": string,
  "createTime": string,
  "updateTime": string,
  "manual": boolean,
  "labels": {
    string: string,
    ...
  },
  "deleteLockDays": integer,
  "deleteLockExpireTime": string,
  "retainDays": integer,
  "retainExpireTime": string,
  "encryptionKey": {
    object (EncryptionKey)
  },
  "containsVolumeData": boolean,
  "containsSecrets": boolean,
  "clusterMetadata": {
    object (ClusterMetadata)
  },
  "state": enum (State),
  "stateReason": string,
  "completeTime": string,
  "resourceCount": integer,
  "volumeCount": integer,
  "sizeBytes": string,
  "etag": string,
  "description": string,
  "podCount": integer,
  "configBackupSizeBytes": string,
  "permissiveMode": boolean,

  // Union field backup_scope can be only one of the following:
  "allNamespaces": boolean,
  "selectedNamespaces": {
    object (Namespaces)
  },
  "selectedApplications": {
    object (NamespacedNames)
  }
  // End of list of possible types for union field backup_scope.
}
Fields
name

string

Output only. The fully qualified name of the Backup. projects/*/locations/*/backupPlans/*/backups/*

uid

string

Output only. Server generated global unique identifier of UUID4

createTime

string (Timestamp format)

Output only. The timestamp when this Backup resource was created.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

updateTime

string (Timestamp format)

Output only. The timestamp when this Backup resource was last updated.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

manual

boolean

Output only. This flag indicates whether this Backup resource was created manually by a user or via a schedule in the BackupPlan. A value of True means that the Backup was created manually.

labels

map (key: string, value: string)

Optional. A set of custom labels supplied by user.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

deleteLockDays

integer

Optional. Minimum age for this Backup (in days). If this field is set to a non-zero value, the Backup will be "locked" against deletion (either manual or automatic deletion) for the number of days provided (measured from the creation time of the Backup). MUST be an integer value between 0-90 (inclusive).

Defaults to parent BackupPlan's backupDeleteLockDays setting and may only be increased (either at creation time or in a subsequent update).

deleteLockExpireTime

string (Timestamp format)

Output only. The time at which an existing delete lock will expire for this backup (calculated from createTime + deleteLockDays).

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

retainDays

integer

Optional. The age (in days) after which this Backup will be automatically deleted. Must be an integer value >= 0:

  • If 0, no automatic deletion will occur for this Backup.
  • If not 0, this must be >= deleteLockDays and <= 365.

Once a Backup is created, this value may only be increased.

Defaults to the parent BackupPlan's backupRetainDays value.

retainExpireTime

string (Timestamp format)

Output only. The time at which this Backup will be automatically deleted (calculated from createTime + retainDays).

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

encryptionKey

object (EncryptionKey)

Output only. The customer managed encryption key that was used to encrypt the Backup's artifacts. Inherited from the parent BackupPlan's encryptionKey value.

containsVolumeData

boolean

Output only. Whether or not the Backup contains volume data. Controlled by the parent BackupPlan's includeVolumeData value.

containsSecrets

boolean

Output only. Whether or not the Backup contains Kubernetes Secrets. Controlled by the parent BackupPlan's includeSecrets value.

clusterMetadata

object (ClusterMetadata)

Output only. Information about the GKE cluster from which this Backup was created.

state

enum (State)

Output only. Current state of the Backup

stateReason

string

Output only. Human-readable description of why the backup is in the current state.

completeTime

string (Timestamp format)

Output only. Completion time of the Backup

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

resourceCount

integer

Output only. The total number of Kubernetes resources included in the Backup.

volumeCount

integer

Output only. The total number of volume backups contained in the Backup.

sizeBytes

string (int64 format)

Output only. The total size of the Backup in bytes = config backup size + sum(volume backup sizes)

etag

string

Output only. etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a backup from overwriting each other. It is strongly suggested that systems make use of the etag in the read-modify-write cycle to perform backup updates in order to avoid race conditions: An etag is returned in the response to backups.get, and systems are expected to put that etag in the request to backups.patch or backups.delete to ensure that their change will be applied to the same version of the resource.

description

string

Optional. User specified descriptive string for this Backup.

podCount

integer

Output only. The total number of Kubernetes Pods contained in the Backup.

configBackupSizeBytes

string (int64 format)

Output only. The size of the config backup in bytes.

permissiveMode

boolean

Output only. If false, Backup will fail when Backup for GKE detects Kubernetes configuration that is non-standard or requires additional setup to restore.

Inherited from the parent BackupPlan's permissiveMode value.

Union field backup_scope. Defines the "scope" of the Backup - which namespaced resources in the cluster were included in the Backup. Inherited from the parent BackupPlan's [backup_scope][google.cloud.gkebackup.v1.BackupPlan.BackupConfig.backup_scope] value. backup_scope can be only one of the following:
allNamespaces

boolean

Output only. If True, all namespaces were included in the Backup.

selectedNamespaces

object (Namespaces)

Output only. If set, the list of namespaces that were included in the Backup.

selectedApplications

object (NamespacedNames)

Output only. If set, the list of ProtectedApplications whose resources were included in the Backup.

ClusterMetadata

Information about the GKE cluster from which this Backup was created.

JSON representation
{
  "cluster": string,
  "k8sVersion": string,
  "backupCrdVersions": {
    string: string,
    ...
  },

  // Union field platform_version can be only one of the following:
  "gkeVersion": string,
  "anthosVersion": string
  // End of list of possible types for union field platform_version.
}
Fields
cluster

string

Output only. The source cluster from which this Backup was created. Valid formats:

  • projects/*/locations/*/clusters/*
  • projects/*/zones/*/clusters/*

This is inherited from the parent BackupPlan's cluster field.

k8sVersion

string

Output only. The Kubernetes server version of the source cluster.

backupCrdVersions

map (key: string, value: string)

Output only. A list of the Backup for GKE CRD versions found in the cluster.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

Union field platform_version. Platform-specific version platform_version can be only one of the following:
gkeVersion

string

Output only. GKE version

anthosVersion

string

Output only. Anthos version

State

State

Enums
STATE_UNSPECIFIED The Backup resource is in the process of being created.
CREATING The Backup resource has been created and the associated BackupJob Kubernetes resource has been injected into the source cluster.
IN_PROGRESS The gkebackup agent in the cluster has begun executing the backup operation.
SUCCEEDED The backup operation has completed successfully.
FAILED The backup operation has failed.
DELETING This Backup resource (and its associated artifacts) is in the process of being deleted.

Methods

create

Creates a Backup for the given BackupPlan.

delete

Deletes an existing Backup.

get

Retrieve the details of a single Backup.

getBackupIndexDownloadUrl

Retrieve the link to the backupIndex.

getIamPolicy

Gets the access control policy for a resource.

list

Lists the Backups for a given BackupPlan.

patch

Update a Backup.

setIamPolicy

Sets the access control policy on the specified resource.

testIamPermissions

Returns permissions that a caller has on the specified resource.