Skip to main content

backups

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

Overview

Namebackups
TypeResource
Idgoogle.backupdr.backups

Fields

NameDatatypeDescription
namestringOutput only. Identifier. Name of the resource.
descriptionstringOutput only. The description of the Backup instance (2048 characters or less).
backupApplianceBackupPropertiesobjectBackupApplianceBackupProperties represents BackupDR backup appliance's properties.
backupApplianceLocksarrayOptional. The list of BackupLocks taken by the accessor Backup Appliance.
backupTypestringOutput only. Type of the backup, unspecified, scheduled or ondemand.
computeInstanceBackupPropertiesobjectComputeInstanceBackupProperties represents Compute Engine instance backup properties.
consistencyTimestringOutput only. The point in time when this backup was captured from the source.
createTimestringOutput only. The time when the instance was created.
enforcedRetentionEndTimestringOptional. The backup can not be deleted before this time.
etagstringOptional. Server specified ETag to prevent updates from overwriting each other.
expireTimestringOptional. When this backup is automatically expired.
gcpBackupPlanInfoobjectGCPBackupPlanInfo captures the plan configuration details of Google Cloud resources at the time of backup.
labelsobjectOptional. Resource labels to represent user provided metadata. No labels currently defined.
resourceSizeBytesstringOutput only. source resource size in bytes at the time of the backup.
serviceLocksarrayOutput only. The list of BackupLocks taken by the service to prevent the deletion of the backup.
statestringOutput only. The Backup resource instance state.
updateTimestringOutput only. The time when the instance was updated.

Methods

NameAccessible byRequired ParamsDescription
getSELECTbackupVaultsId, backupsId, dataSourcesId, locationsId, projectsIdGets details of a Backup.
listSELECTbackupVaultsId, dataSourcesId, locationsId, projectsIdLists Backups in a given project and location.
deleteDELETEbackupVaultsId, backupsId, dataSourcesId, locationsId, projectsIdDeletes a Backup.
patchUPDATEbackupVaultsId, backupsId, dataSourcesId, locationsId, projectsIdUpdates the settings of a Backup.
restoreEXECbackupVaultsId, backupsId, dataSourcesId, locationsId, projectsIdRestore from a Backup

SELECT examples

Lists Backups in a given project and location.

SELECT
name,
description,
backupApplianceBackupProperties,
backupApplianceLocks,
backupType,
computeInstanceBackupProperties,
consistencyTime,
createTime,
enforcedRetentionEndTime,
etag,
expireTime,
gcpBackupPlanInfo,
labels,
resourceSizeBytes,
serviceLocks,
state,
updateTime
FROM google.backupdr.backups
WHERE backupVaultsId = '{{ backupVaultsId }}'
AND dataSourcesId = '{{ dataSourcesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

UPDATE example

Updates a backups resource.

/*+ update */
UPDATE google.backupdr.backups
SET
labels = '{{ labels }}',
enforcedRetentionEndTime = '{{ enforcedRetentionEndTime }}',
expireTime = '{{ expireTime }}',
etag = '{{ etag }}',
backupApplianceLocks = '{{ backupApplianceLocks }}'
WHERE
backupVaultsId = '{{ backupVaultsId }}'
AND backupsId = '{{ backupsId }}'
AND dataSourcesId = '{{ dataSourcesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified backups resource.

/*+ delete */
DELETE FROM google.backupdr.backups
WHERE backupVaultsId = '{{ backupVaultsId }}'
AND backupsId = '{{ backupsId }}'
AND dataSourcesId = '{{ dataSourcesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';