backups
Creates, updates, deletes, gets or lists a backups
resource.
Overview
Name | backups |
Type | Resource |
Id | google.file.backups |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. The resource name of the backup, in the format projects/{project_number}/locations/{location_id}/backups/{backup_id} . |
capacityGb | string (int64) | Output only. Capacity of the source file share when the backup was created. |
createTime | string (google-datetime) | Output only. The time when the backup was created. |
description | string | A description of the backup with 2048 characters or less. Requests with longer descriptions will be rejected. |
downloadBytes | string (int64) | Output only. Amount of bytes that will be downloaded if the backup is restored. This may be different than storage bytes, since sequential backups of the same disk will share storage. |
fileSystemProtocol | string | Output only. The file system protocol of the source Filestore instance that this backup is created from. |
kmsKey | string | Immutable. KMS key name used for data encryption. |
labels | object | Resource labels to represent user provided metadata. |
satisfiesPzi | boolean | Output only. Reserved for future use. |
satisfiesPzs | boolean | Output only. Reserved for future use. |
sourceFileShare | string | Name of the file share in the source Filestore instance that the backup is created from. |
sourceInstance | string | The resource name of the source Filestore instance, in the format projects/{project_number}/locations/{location_id}/instances/{instance_id} , used to create this backup. |
sourceInstanceTier | string | Output only. The service tier of the source Filestore instance that this backup is created from. |
state | string | Output only. The backup state. |
storageBytes | string (int64) | Output only. The size of the storage used by the backup. As backups share storage, this number is expected to change with backup creation/deletion. |
tags | object | Optional. Input only. Immutable. Tag key-value pairs bound to this resource. Each key must be a namespaced name and each value a short name. Example: "123456789012/environment" : "production", "123456789013/costCenter" : "marketing" See the documentation for more information: - Namespaced name: https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing#retrieving_tag_key - Short name: https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing#retrieving_tag_value |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. The resource name of the backup, in the format projects/{project_number}/locations/{location_id}/backups/{backup_id} . |
capacityGb | string (int64) | Output only. Capacity of the source file share when the backup was created. |
createTime | string (google-datetime) | Output only. The time when the backup was created. |
description | string | A description of the backup with 2048 characters or less. Requests with longer descriptions will be rejected. |
downloadBytes | string (int64) | Output only. Amount of bytes that will be downloaded if the backup is restored. This may be different than storage bytes, since sequential backups of the same disk will share storage. |
fileSystemProtocol | string | Output only. The file system protocol of the source Filestore instance that this backup is created from. |
kmsKey | string | Immutable. KMS key name used for data encryption. |
labels | object | Resource labels to represent user provided metadata. |
satisfiesPzi | boolean | Output only. Reserved for future use. |
satisfiesPzs | boolean | Output only. Reserved for future use. |
sourceFileShare | string | Name of the file share in the source Filestore instance that the backup is created from. |
sourceInstance | string | The resource name of the source Filestore instance, in the format projects/{project_number}/locations/{location_id}/instances/{instance_id} , used to create this backup. |
sourceInstanceTier | string | Output only. The service tier of the source Filestore instance that this backup is created from. |
state | string | Output only. The backup state. |
storageBytes | string (int64) | Output only. The size of the storage used by the backup. As backups share storage, this number is expected to change with backup creation/deletion. |
tags | object | Optional. Input only. Immutable. Tag key-value pairs bound to this resource. Each key must be a namespaced name and each value a short name. Example: "123456789012/environment" : "production", "123456789013/costCenter" : "marketing" See the documentation for more information: - Namespaced name: https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing#retrieving_tag_key - Short name: https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing#retrieving_tag_value |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , backupsId | Gets the details of a specific backup. | |
list | select | projectsId , locationsId | pageSize , pageToken , orderBy , filter | Lists all backups in a project for either a specified location or for all locations. |
create | insert | projectsId , locationsId | backupId | Creates a backup. |
patch | update | projectsId , locationsId , backupsId | updateMask | Updates the settings of a specific backup. |
delete | delete | projectsId , locationsId , backupsId | Deletes a 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 | |
backupId | string | |
filter | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- get
- list
Gets the details of a specific backup.
SELECT
name,
capacityGb,
createTime,
description,
downloadBytes,
fileSystemProtocol,
kmsKey,
labels,
satisfiesPzi,
satisfiesPzs,
sourceFileShare,
sourceInstance,
sourceInstanceTier,
state,
storageBytes,
tags
FROM google.file.backups
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND backupsId = '{{ backupsId }}' -- required;
Lists all backups in a project for either a specified location or for all locations.
SELECT
name,
capacityGb,
createTime,
description,
downloadBytes,
fileSystemProtocol,
kmsKey,
labels,
satisfiesPzi,
satisfiesPzs,
sourceFileShare,
sourceInstance,
sourceInstanceTier,
state,
storageBytes,
tags
FROM google.file.backups
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND orderBy = '{{ orderBy }}'
AND filter = '{{ filter }}';
INSERT
examples
- create
- Manifest
Creates a backup.
INSERT INTO google.file.backups (
data__description,
data__labels,
data__sourceInstance,
data__sourceFileShare,
data__kmsKey,
data__tags,
projectsId,
locationsId,
backupId
)
SELECT
'{{ description }}',
'{{ labels }}',
'{{ sourceInstance }}',
'{{ sourceFileShare }}',
'{{ kmsKey }}',
'{{ tags }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ backupId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: backups
props:
- name: projectsId
value: string
description: Required parameter for the backups resource.
- name: locationsId
value: string
description: Required parameter for the backups resource.
- name: description
value: string
description: >
A description of the backup with 2048 characters or less. Requests with longer descriptions will be rejected.
- name: labels
value: object
description: >
Resource labels to represent user provided metadata.
- name: sourceInstance
value: string
description: >
The resource name of the source Filestore instance, in the format `projects/{project_number}/locations/{location_id}/instances/{instance_id}`, used to create this backup.
- name: sourceFileShare
value: string
description: >
Name of the file share in the source Filestore instance that the backup is created from.
- name: kmsKey
value: string
description: >
Immutable. KMS key name used for data encryption.
- name: tags
value: object
description: >
Optional. Input only. Immutable. Tag key-value pairs bound to this resource. Each key must be a namespaced name and each value a short name. Example: "123456789012/environment" : "production", "123456789013/costCenter" : "marketing" See the documentation for more information: - Namespaced name: https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing#retrieving_tag_key - Short name: https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing#retrieving_tag_value
- name: backupId
value: string
UPDATE
examples
- patch
Updates the settings of a specific backup.
UPDATE google.file.backups
SET
data__description = '{{ description }}',
data__labels = '{{ labels }}',
data__sourceInstance = '{{ sourceInstance }}',
data__sourceFileShare = '{{ sourceFileShare }}',
data__kmsKey = '{{ kmsKey }}',
data__tags = '{{ tags }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND backupsId = '{{ backupsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;
DELETE
examples
- delete
Deletes a backup.
DELETE FROM google.file.backups
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND backupsId = '{{ backupsId }}' --required;