Skip to main content

backups

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

Overview​

Namebackups
TypeResource
Idgoogle.looker.backups

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringImmutable. The relative resource name of the backup, in the following form: projects/{project_number}/locations/{location_id}/instances/{instance_id}/backups/{backup}
createTimestring (google-datetime)Output only. The time when the backup was started.
encryptionConfigobjectOutput only. Current status of the CMEK encryption (id: EncryptionConfig)
expireTimestring (google-datetime)Output only. The time when the backup will be deleted.
statestringOutput only. The current state of the backup. (STATE_UNSPECIFIED, CREATING, DELETING, ACTIVE, FAILED)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, instancesId, backupsId
listselectprojectsId, locationsId, instancesIdorderBy, pageSize, pageTokenList backups of Looker instance.
createinsertprojectsId, locationsId, instancesIdBackup Looker instance.
deletedeleteprojectsId, locationsId, instancesId, backupsIdDelete 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
backupsIdstring
instancesIdstring
locationsIdstring
projectsIdstring
orderBystring
pageSizeinteger (int32)
pageTokenstring

SELECT examples​

Successful response

SELECT
name,
createTime,
encryptionConfig,
expireTime,
state
FROM google.looker.backups
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND instancesId = '{{ instancesId }}' -- required
AND backupsId = '{{ backupsId }}' -- required
;

INSERT examples​

Backup Looker instance.

INSERT INTO google.looker.backups (
data__name,
projectsId,
locationsId,
instancesId
)
SELECT
'{{ name }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ instancesId }}'
RETURNING
name,
done,
error,
metadata,
response
;

DELETE examples​

Delete backup.

DELETE FROM google.looker.backups
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND instancesId = '{{ instancesId }}' --required
AND backupsId = '{{ backupsId }}' --required
;