backups
Creates, updates, deletes, gets or lists a backups
resource.
Overview
Name | backups |
Type | Resource |
Id | google.netapp.backups |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. The resource name of the backup. Format: projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id} . |
backupRegion | string | Output only. Region in which backup is stored. Format: projects/{project_id}/locations/{location} |
backupType | string | Output only. Type of backup, manually created or created by a backup policy. |
chainStorageBytes | string (int64) | Output only. Total size of all backups in a chain in bytes = baseline backup size + sum(incremental backup size) |
createTime | string (google-datetime) | Output only. The time when the backup was created. |
description | string | A description of the backup with 2048 characters or less. Requests with longer descriptions will be rejected. |
enforcedRetentionEndTime | string (google-datetime) | Output only. The time until which the backup is not deletable. |
labels | object | Resource labels to represent user provided metadata. |
satisfiesPzi | boolean | Output only. Reserved for future use |
satisfiesPzs | boolean | Output only. Reserved for future use |
sourceSnapshot | string | If specified, backup will be created from the given snapshot. If not specified, there will be a new snapshot taken to initiate the backup creation. Format: projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id} |
sourceVolume | string | Volume full name of this backup belongs to. Format: projects/{projects_id}/locations/{location}/volumes/{volume_id} |
state | string | Output only. The backup state. |
volumeRegion | string | Output only. Region of the volume from which the backup was created. Format: projects/{project_id}/locations/{location} |
volumeUsageBytes | string (int64) | Output only. Size of the file system when the backup was created. When creating a new volume from the backup, the volume capacity will have to be at least as big. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. The resource name of the backup. Format: projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id} . |
backupRegion | string | Output only. Region in which backup is stored. Format: projects/{project_id}/locations/{location} |
backupType | string | Output only. Type of backup, manually created or created by a backup policy. |
chainStorageBytes | string (int64) | Output only. Total size of all backups in a chain in bytes = baseline backup size + sum(incremental backup size) |
createTime | string (google-datetime) | Output only. The time when the backup was created. |
description | string | A description of the backup with 2048 characters or less. Requests with longer descriptions will be rejected. |
enforcedRetentionEndTime | string (google-datetime) | Output only. The time until which the backup is not deletable. |
labels | object | Resource labels to represent user provided metadata. |
satisfiesPzi | boolean | Output only. Reserved for future use |
satisfiesPzs | boolean | Output only. Reserved for future use |
sourceSnapshot | string | If specified, backup will be created from the given snapshot. If not specified, there will be a new snapshot taken to initiate the backup creation. Format: projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id} |
sourceVolume | string | Volume full name of this backup belongs to. Format: projects/{projects_id}/locations/{location}/volumes/{volume_id} |
state | string | Output only. The backup state. |
volumeRegion | string | Output only. Region of the volume from which the backup was created. Format: projects/{project_id}/locations/{location} |
volumeUsageBytes | string (int64) | Output only. Size of the file system when the backup was created. When creating a new volume from the backup, the volume capacity will have to be at least as big. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , backupVaultsId , backupsId | Returns the description of the specified backup | |
list | select | projectsId , locationsId , backupVaultsId | pageSize , pageToken , orderBy , filter | Returns descriptions of all backups for a backupVault. |
create | insert | projectsId , locationsId , backupVaultsId | backupId | Creates a backup from the volume specified in the request The backup can be created from the given snapshot if specified in the request. If no snapshot specified, there'll be a new snapshot taken to initiate the backup creation. |
patch | update | projectsId , locationsId , backupVaultsId , backupsId | updateMask | Update backup with full spec. |
delete | delete | projectsId , locationsId , backupVaultsId , backupsId | Warning! This operation will permanently delete the 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 |
---|---|---|
backupVaultsId | string | |
backupsId | string | |
locationsId | string | |
projectsId | string | |
backupId | string | |
filter | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- get
- list
Returns the description of the specified backup
SELECT
name,
backupRegion,
backupType,
chainStorageBytes,
createTime,
description,
enforcedRetentionEndTime,
labels,
satisfiesPzi,
satisfiesPzs,
sourceSnapshot,
sourceVolume,
state,
volumeRegion,
volumeUsageBytes
FROM google.netapp.backups
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND backupVaultsId = '{{ backupVaultsId }}' -- required
AND backupsId = '{{ backupsId }}' -- required;
Returns descriptions of all backups for a backupVault.
SELECT
name,
backupRegion,
backupType,
chainStorageBytes,
createTime,
description,
enforcedRetentionEndTime,
labels,
satisfiesPzi,
satisfiesPzs,
sourceSnapshot,
sourceVolume,
state,
volumeRegion,
volumeUsageBytes
FROM google.netapp.backups
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND backupVaultsId = '{{ backupVaultsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND orderBy = '{{ orderBy }}'
AND filter = '{{ filter }}';
INSERT
examples
- create
- Manifest
Creates a backup from the volume specified in the request The backup can be created from the given snapshot if specified in the request. If no snapshot specified, there'll be a new snapshot taken to initiate the backup creation.
INSERT INTO google.netapp.backups (
data__name,
data__description,
data__sourceVolume,
data__sourceSnapshot,
data__labels,
projectsId,
locationsId,
backupVaultsId,
backupId
)
SELECT
'{{ name }}',
'{{ description }}',
'{{ sourceVolume }}',
'{{ sourceSnapshot }}',
'{{ labels }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ backupVaultsId }}',
'{{ 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: backupVaultsId
value: string
description: Required parameter for the backups resource.
- name: name
value: string
description: >
Identifier. The resource name of the backup. Format: `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`.
- name: description
value: string
description: >
A description of the backup with 2048 characters or less. Requests with longer descriptions will be rejected.
- name: sourceVolume
value: string
description: >
Volume full name of this backup belongs to. Format: `projects/{projects_id}/locations/{location}/volumes/{volume_id}`
- name: sourceSnapshot
value: string
description: >
If specified, backup will be created from the given snapshot. If not specified, there will be a new snapshot taken to initiate the backup creation. Format: `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`
- name: labels
value: object
description: >
Resource labels to represent user provided metadata.
- name: backupId
value: string
UPDATE
examples
- patch
Update backup with full spec.
UPDATE google.netapp.backups
SET
data__name = '{{ name }}',
data__description = '{{ description }}',
data__sourceVolume = '{{ sourceVolume }}',
data__sourceSnapshot = '{{ sourceSnapshot }}',
data__labels = '{{ labels }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND backupVaultsId = '{{ backupVaultsId }}' --required
AND backupsId = '{{ backupsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;
DELETE
examples
- delete
Warning! This operation will permanently delete the backup.
DELETE FROM google.netapp.backups
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND backupVaultsId = '{{ backupVaultsId }}' --required
AND backupsId = '{{ backupsId }}' --required;