Skip to main content

backups

Creates, updates, deletes, gets or lists a backups resource.

Overview

Namebackups
TypeResource
Idgoogle.netapp.backups

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringIdentifier. The resource name of the backup. Format: projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}.
backupRegionstringOutput only. Region in which backup is stored. Format: projects/{project_id}/locations/{location}
backupTypestringOutput only. Type of backup, manually created or created by a backup policy.
chainStorageBytesstring (int64)Output only. Total size of all backups in a chain in bytes = baseline backup size + sum(incremental backup size)
createTimestring (google-datetime)Output only. The time when the backup was created.
descriptionstringA description of the backup with 2048 characters or less. Requests with longer descriptions will be rejected.
enforcedRetentionEndTimestring (google-datetime)Output only. The time until which the backup is not deletable.
labelsobjectResource labels to represent user provided metadata.
satisfiesPzibooleanOutput only. Reserved for future use
satisfiesPzsbooleanOutput only. Reserved for future use
sourceSnapshotstringIf 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}
sourceVolumestringVolume full name of this backup belongs to. Format: projects/{projects_id}/locations/{location}/volumes/{volume_id}
statestringOutput only. The backup state.
volumeRegionstringOutput only. Region of the volume from which the backup was created. Format: projects/{project_id}/locations/{location}
volumeUsageBytesstring (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:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, backupVaultsId, backupsIdReturns the description of the specified backup
listselectprojectsId, locationsId, backupVaultsIdpageSize, pageToken, orderBy, filterReturns descriptions of all backups for a backupVault.
createinsertprojectsId, locationsId, backupVaultsIdbackupIdCreates 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.
patchupdateprojectsId, locationsId, backupVaultsId, backupsIdupdateMaskUpdate backup with full spec.
deletedeleteprojectsId, locationsId, backupVaultsId, backupsIdWarning! 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.

NameDatatypeDescription
backupVaultsIdstring
backupsIdstring
locationsIdstring
projectsIdstring
backupIdstring
filterstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
updateMaskstring (google-fieldmask)

SELECT examples

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;

INSERT examples

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
;

UPDATE examples

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

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;