backups
Creates, updates, deletes, gets or lists a backups
resource.
Overview
Name | backups |
Type | Resource |
Id | google.gkebackup.backups |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. The fully qualified name of the Backup. projects/*/locations/*/backupPlans/*/backups/* |
allNamespaces | boolean | Output only. If True, all namespaces were included in the Backup. |
clusterMetadata | object | Output only. Information about the GKE cluster from which this Backup was created. (id: ClusterMetadata) |
completeTime | string (google-datetime) | Output only. Completion time of the Backup |
configBackupSizeBytes | string (int64) | Output only. The size of the config backup in bytes. |
containsSecrets | boolean | Output only. Whether or not the Backup contains Kubernetes Secrets. Controlled by the parent BackupPlan's include_secrets value. |
containsVolumeData | boolean | Output only. Whether or not the Backup contains volume data. Controlled by the parent BackupPlan's include_volume_data value. |
createTime | string (google-datetime) | Output only. The timestamp when this Backup resource was created. |
deleteLockDays | integer (int32) | 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 backup_delete_lock_days setting and may only be increased (either at creation time or in a subsequent update). |
deleteLockExpireTime | string (google-datetime) | Output only. The time at which an existing delete lock will expire for this backup (calculated from create_time + delete_lock_days). |
description | string | Optional. User specified descriptive string for this Backup. |
encryptionKey | object | Output only. The customer managed encryption key that was used to encrypt the Backup's artifacts. Inherited from the parent BackupPlan's encryption_key value. (id: EncryptionKey) |
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 GetBackup , and systems are expected to put that etag in the request to UpdateBackup or DeleteBackup to ensure that their change will be applied to the same version of the resource. |
labels | object | Optional. A set of custom labels supplied by user. |
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. |
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 permissive_mode value. |
podCount | integer (int32) | Output only. The total number of Kubernetes Pods contained in the Backup. |
resourceCount | integer (int32) | Output only. The total number of Kubernetes resources included in the Backup. |
retainDays | integer (int32) | 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 >= delete_lock_days and <= 365. Once a Backup is created, this value may only be increased. Defaults to the parent BackupPlan's backup_retain_days value. |
retainExpireTime | string (google-datetime) | Output only. The time at which this Backup will be automatically deleted (calculated from create_time + retain_days). |
satisfiesPzi | boolean | Output only. [Output Only] Reserved for future use. |
satisfiesPzs | boolean | Output only. [Output Only] Reserved for future use. |
selectedApplications | object | Output only. If set, the list of ProtectedApplications whose resources were included in the Backup. (id: NamespacedNames) |
selectedNamespaceLabels | object | Output only. If set, the list of labels whose constituent namespaces were included in the Backup. (id: ResourceLabels) |
selectedNamespaces | object | Output only. If set, the list of namespaces that were included in the Backup. (id: Namespaces) |
sizeBytes | string (int64) | Output only. The total size of the Backup in bytes = config backup size + sum(volume backup sizes) |
state | string | Output only. Current state of the Backup |
stateReason | string | Output only. Human-readable description of why the backup is in the current state . This field is only meant for human readability and should not be used programmatically as this field is not guaranteed to be consistent. |
troubleshootingInfo | object | Output only. Information about the troubleshooting steps which will provide debugging information to the end users. (id: TroubleshootingInfo) |
uid | string | Output only. Server generated global unique identifier of UUID4 |
updateTime | string (google-datetime) | Output only. The timestamp when this Backup resource was last updated. |
volumeCount | integer (int32) | Output only. The total number of volume backups contained in the Backup. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. The fully qualified name of the Backup. projects/*/locations/*/backupPlans/*/backups/* |
allNamespaces | boolean | Output only. If True, all namespaces were included in the Backup. |
clusterMetadata | object | Output only. Information about the GKE cluster from which this Backup was created. (id: ClusterMetadata) |
completeTime | string (google-datetime) | Output only. Completion time of the Backup |
configBackupSizeBytes | string (int64) | Output only. The size of the config backup in bytes. |
containsSecrets | boolean | Output only. Whether or not the Backup contains Kubernetes Secrets. Controlled by the parent BackupPlan's include_secrets value. |
containsVolumeData | boolean | Output only. Whether or not the Backup contains volume data. Controlled by the parent BackupPlan's include_volume_data value. |
createTime | string (google-datetime) | Output only. The timestamp when this Backup resource was created. |
deleteLockDays | integer (int32) | 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 backup_delete_lock_days setting and may only be increased (either at creation time or in a subsequent update). |
deleteLockExpireTime | string (google-datetime) | Output only. The time at which an existing delete lock will expire for this backup (calculated from create_time + delete_lock_days). |
description | string | Optional. User specified descriptive string for this Backup. |
encryptionKey | object | Output only. The customer managed encryption key that was used to encrypt the Backup's artifacts. Inherited from the parent BackupPlan's encryption_key value. (id: EncryptionKey) |
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 GetBackup , and systems are expected to put that etag in the request to UpdateBackup or DeleteBackup to ensure that their change will be applied to the same version of the resource. |
labels | object | Optional. A set of custom labels supplied by user. |
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. |
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 permissive_mode value. |
podCount | integer (int32) | Output only. The total number of Kubernetes Pods contained in the Backup. |
resourceCount | integer (int32) | Output only. The total number of Kubernetes resources included in the Backup. |
retainDays | integer (int32) | 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 >= delete_lock_days and <= 365. Once a Backup is created, this value may only be increased. Defaults to the parent BackupPlan's backup_retain_days value. |
retainExpireTime | string (google-datetime) | Output only. The time at which this Backup will be automatically deleted (calculated from create_time + retain_days). |
satisfiesPzi | boolean | Output only. [Output Only] Reserved for future use. |
satisfiesPzs | boolean | Output only. [Output Only] Reserved for future use. |
selectedApplications | object | Output only. If set, the list of ProtectedApplications whose resources were included in the Backup. (id: NamespacedNames) |
selectedNamespaceLabels | object | Output only. If set, the list of labels whose constituent namespaces were included in the Backup. (id: ResourceLabels) |
selectedNamespaces | object | Output only. If set, the list of namespaces that were included in the Backup. (id: Namespaces) |
sizeBytes | string (int64) | Output only. The total size of the Backup in bytes = config backup size + sum(volume backup sizes) |
state | string | Output only. Current state of the Backup |
stateReason | string | Output only. Human-readable description of why the backup is in the current state . This field is only meant for human readability and should not be used programmatically as this field is not guaranteed to be consistent. |
troubleshootingInfo | object | Output only. Information about the troubleshooting steps which will provide debugging information to the end users. (id: TroubleshootingInfo) |
uid | string | Output only. Server generated global unique identifier of UUID4 |
updateTime | string (google-datetime) | Output only. The timestamp when this Backup resource was last updated. |
volumeCount | integer (int32) | Output only. The total number of volume backups contained in the Backup. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , backupPlansId , backupsId | Retrieve the details of a single Backup. | |
list | select | projectsId , locationsId , backupPlansId | pageSize , pageToken , filter , orderBy , returnPartialSuccess | Lists the Backups for a given BackupPlan. |
create | insert | projectsId , locationsId , backupPlansId | backupId | Creates a Backup for the given BackupPlan. |
patch | update | projectsId , locationsId , backupPlansId , backupsId | updateMask | Update a Backup. |
delete | delete | projectsId , locationsId , backupPlansId , backupsId | etag , force | Deletes an existing Backup. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
backupPlansId | string | |
backupsId | string | |
locationsId | string | |
projectsId | string | |
backupId | string | |
etag | string | |
filter | string | |
force | boolean | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
returnPartialSuccess | boolean | |
updateMask | string (google-fieldmask) |
SELECT
examples
- get
- list
Retrieve the details of a single Backup.
SELECT
name,
allNamespaces,
clusterMetadata,
completeTime,
configBackupSizeBytes,
containsSecrets,
containsVolumeData,
createTime,
deleteLockDays,
deleteLockExpireTime,
description,
encryptionKey,
etag,
labels,
manual,
permissiveMode,
podCount,
resourceCount,
retainDays,
retainExpireTime,
satisfiesPzi,
satisfiesPzs,
selectedApplications,
selectedNamespaceLabels,
selectedNamespaces,
sizeBytes,
state,
stateReason,
troubleshootingInfo,
uid,
updateTime,
volumeCount
FROM google.gkebackup.backups
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND backupPlansId = '{{ backupPlansId }}' -- required
AND backupsId = '{{ backupsId }}' -- required;
Lists the Backups for a given BackupPlan.
SELECT
name,
allNamespaces,
clusterMetadata,
completeTime,
configBackupSizeBytes,
containsSecrets,
containsVolumeData,
createTime,
deleteLockDays,
deleteLockExpireTime,
description,
encryptionKey,
etag,
labels,
manual,
permissiveMode,
podCount,
resourceCount,
retainDays,
retainExpireTime,
satisfiesPzi,
satisfiesPzs,
selectedApplications,
selectedNamespaceLabels,
selectedNamespaces,
sizeBytes,
state,
stateReason,
troubleshootingInfo,
uid,
updateTime,
volumeCount
FROM google.gkebackup.backups
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND backupPlansId = '{{ backupPlansId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}'
AND returnPartialSuccess = '{{ returnPartialSuccess }}';
INSERT
examples
- create
- Manifest
Creates a Backup for the given BackupPlan.
INSERT INTO google.gkebackup.backups (
data__labels,
data__deleteLockDays,
data__retainDays,
data__description,
projectsId,
locationsId,
backupPlansId,
backupId
)
SELECT
'{{ labels }}',
{{ deleteLockDays }},
{{ retainDays }},
'{{ description }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ backupPlansId }}',
'{{ backupId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: backups
props:
- name: projectsId
value: string
description: Required parameter for the backups resource.
- name: locationsId
value: string
description: Required parameter for the backups resource.
- name: backupPlansId
value: string
description: Required parameter for the backups resource.
- name: labels
value: object
description: >
Optional. A set of custom labels supplied by user.
- name: deleteLockDays
value: integer
description: >
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 backup_delete_lock_days setting and may only be increased (either at creation time or in a subsequent update).
- name: retainDays
value: integer
description: >
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 >= delete_lock_days and <= 365. Once a Backup is created, this value may only be increased. Defaults to the parent BackupPlan's backup_retain_days value.
- name: description
value: string
description: >
Optional. User specified descriptive string for this Backup.
- name: backupId
value: string
UPDATE
examples
- patch
Update a Backup.
UPDATE google.gkebackup.backups
SET
data__labels = '{{ labels }}',
data__deleteLockDays = {{ deleteLockDays }},
data__retainDays = {{ retainDays }},
data__description = '{{ description }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND backupPlansId = '{{ backupPlansId }}' --required
AND backupsId = '{{ backupsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;
DELETE
examples
- delete
Deletes an existing Backup.
DELETE FROM google.gkebackup.backups
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND backupPlansId = '{{ backupPlansId }}' --required
AND backupsId = '{{ backupsId }}' --required
AND etag = '{{ etag }}'
AND force = '{{ force }}';