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:

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. (TYPE_UNSPECIFIED, MANUAL, SCHEDULED)
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.
ontapSourceobjectOptional. Represents source details for ONTAP backups. Either source_volume or ontap_source should be provided. (id: OntapSource)
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}
sourceVolumestringThe resource name of the volume that this backup belongs to. You must provide either source_volume or ontap_source. Format: projects/{project_id}/locations/{location}/volumes/{volume_id}
statestringOutput only. The backup state. (STATE_UNSPECIFIED, CREATING, UPLOADING, READY, DELETING, ERROR, UPDATING)
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, backupVaultsIdfilter, orderBy, pageSize, pageTokenReturns 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,
ontapSource,
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__description,
data__labels,
data__name,
data__ontapSource,
data__sourceSnapshot,
data__sourceVolume,
projectsId,
locationsId,
backupVaultsId,
backupId
)
SELECT
'{{ description }}',
'{{ labels }}',
'{{ name }}',
'{{ ontapSource }}',
'{{ sourceSnapshot }}',
'{{ sourceVolume }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ backupVaultsId }}',
'{{ backupId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples​

Update backup with full spec.

UPDATE google.netapp.backups
SET
data__description = '{{ description }}',
data__labels = '{{ labels }}',
data__name = '{{ name }}',
data__ontapSource = '{{ ontapSource }}',
data__sourceSnapshot = '{{ sourceSnapshot }}',
data__sourceVolume = '{{ sourceVolume }}'
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
;