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
| 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. (FILE_PROTOCOL_UNSPECIFIED, NFS_V3, NFS_V4_1) |
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. (TIER_UNSPECIFIED, STANDARD, PREMIUM, BASIC_HDD, BASIC_SSD, HIGH_SCALE_SSD, ENTERPRISE, ZONAL, REGIONAL) |
state | string | Output only. The backup state. (STATE_UNSPECIFIED, CREATING, FINALIZING, READY, DELETING, INVALID) |
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 |
| 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. (FILE_PROTOCOL_UNSPECIFIED, NFS_V3, NFS_V4_1) |
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. (TIER_UNSPECIFIED, STANDARD, PREMIUM, BASIC_HDD, BASIC_SSD, HIGH_SCALE_SSD, ENTERPRISE, ZONAL, REGIONAL) |
state | string | Output only. The backup state. (STATE_UNSPECIFIED, CREATING, FINALIZING, READY, DELETING, INVALID) |
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 | orderBy, filter, pageSize, pageToken | 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 orderBy = '{{ orderBy }}'
AND filter = '{{ filter }}'
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
;
INSERT examples
- create
- Manifest
Creates a backup.
INSERT INTO google.file.backups (
data__kmsKey,
data__tags,
data__labels,
data__sourceFileShare,
data__sourceInstance,
data__description,
projectsId,
locationsId,
backupId
)
SELECT
'{{ kmsKey }}',
'{{ tags }}',
'{{ labels }}',
'{{ sourceFileShare }}',
'{{ sourceInstance }}',
'{{ description }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ backupId }}'
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: kmsKey
value: "{{ kmsKey }}"
description: |
Immutable. KMS key name used for data encryption.
- name: tags
value: "{{ tags }}"
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: labels
value: "{{ labels }}"
description: |
Resource labels to represent user provided metadata.
- name: sourceFileShare
value: "{{ sourceFileShare }}"
description: |
Name of the file share in the source Filestore instance that the backup is created from.
- name: sourceInstance
value: "{{ sourceInstance }}"
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: description
value: "{{ description }}"
description: |
A description of the backup with 2048 characters or less. Requests with longer descriptions will be rejected.
- name: backupId
value: "{{ backupId }}"
UPDATE examples
- patch
Updates the settings of a specific backup.
UPDATE google.file.backups
SET
data__kmsKey = '{{ kmsKey }}',
data__tags = '{{ tags }}',
data__labels = '{{ labels }}',
data__sourceFileShare = '{{ sourceFileShare }}',
data__sourceInstance = '{{ sourceInstance }}',
data__description = '{{ description }}'
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
;