backups
Creates, updates, deletes, gets or lists a backups resource.
Overview
| Name | backups |
| Type | Resource |
| Id | google.metastore.backups |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Immutable. Identifier. The relative resource name of the backup, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id} |
createTime | string (google-datetime) | Output only. The time when the backup was started. |
description | string | Optional. The description of the backup. |
endTime | string (google-datetime) | Output only. The time when the backup finished creating. |
restoringServices | array | Output only. Services that are restoring from the backup. |
serviceRevision | object | Output only. The revision of the service at the time of backup. (id: Service) |
state | string | Output only. The current state of the backup. (STATE_UNSPECIFIED, CREATING, DELETING, ACTIVE, FAILED, RESTORING) |
| Name | Datatype | Description |
|---|---|---|
name | string | Immutable. Identifier. The relative resource name of the backup, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id} |
createTime | string (google-datetime) | Output only. The time when the backup was started. |
description | string | Optional. The description of the backup. |
endTime | string (google-datetime) | Output only. The time when the backup finished creating. |
restoringServices | array | Output only. Services that are restoring from the backup. |
serviceRevision | object | Output only. The revision of the service at the time of backup. (id: Service) |
state | string | Output only. The current state of the backup. (STATE_UNSPECIFIED, CREATING, DELETING, ACTIVE, FAILED, RESTORING) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | projectsId, locationsId, servicesId, backupsId | Gets details of a single backup. | |
list | select | projectsId, locationsId, servicesId | orderBy, pageToken, pageSize, filter | Lists backups in a service. |
create | insert | projectsId, locationsId, servicesId | backupId, requestId | Creates a new backup in a given project and location. |
delete | delete | projectsId, locationsId, servicesId, backupsId | requestId | Deletes a single 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 |
|---|---|---|
backupsId | string | |
locationsId | string | |
projectsId | string | |
servicesId | string | |
backupId | string | |
filter | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
requestId | string |
SELECT examples
- get
- list
Gets details of a single backup.
SELECT
name,
createTime,
description,
endTime,
restoringServices,
serviceRevision,
state
FROM google.metastore.backups
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND servicesId = '{{ servicesId }}' -- required
AND backupsId = '{{ backupsId }}' -- required
;
Lists backups in a service.
SELECT
name,
createTime,
description,
endTime,
restoringServices,
serviceRevision,
state
FROM google.metastore.backups
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND servicesId = '{{ servicesId }}' -- required
AND orderBy = '{{ orderBy }}'
AND pageToken = '{{ pageToken }}'
AND pageSize = '{{ pageSize }}'
AND filter = '{{ filter }}'
;
INSERT examples
- create
- Manifest
Creates a new backup in a given project and location.
INSERT INTO google.metastore.backups (
data__name,
data__description,
projectsId,
locationsId,
servicesId,
backupId,
requestId
)
SELECT
'{{ name }}',
'{{ description }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ servicesId }}',
'{{ backupId }}',
'{{ requestId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: backups
props:
- name: projectsId
value: "{{ projectsId }}"
description: Required parameter for the backups resource.
- name: locationsId
value: "{{ locationsId }}"
description: Required parameter for the backups resource.
- name: servicesId
value: "{{ servicesId }}"
description: Required parameter for the backups resource.
- name: name
value: "{{ name }}"
description: |
Immutable. Identifier. The relative resource name of the backup, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}
- name: description
value: "{{ description }}"
description: |
Optional. The description of the backup.
- name: backupId
value: "{{ backupId }}"
- name: requestId
value: "{{ requestId }}"
DELETE examples
- delete
Deletes a single backup.
DELETE FROM google.metastore.backups
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND servicesId = '{{ servicesId }}' --required
AND backupsId = '{{ backupsId }}' --required
AND requestId = '{{ requestId }}'
;