backups
Creates, updates, deletes, gets or lists a backups
resource.
Overview
Name | backups |
Type | Resource |
Id | google.file.backups |
Fields
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} . |
description | string | A description of the backup with 2048 characters or less. Requests with longer descriptions will be rejected. |
capacityGb | string | Output only. Capacity of the source file share when the backup was created. |
createTime | string | Output only. The time when the backup was created. |
downloadBytes | string | 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 | 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 are bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing" |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | backupsId, locationsId, projectsId | Gets the details of a specific backup. |
list | SELECT | locationsId, projectsId | Lists all backups in a project for either a specified location or for all locations. |
create | INSERT | locationsId, projectsId | Creates a backup. |
delete | DELETE | backupsId, locationsId, projectsId | Deletes a backup. |
patch | UPDATE | backupsId, locationsId, projectsId | Updates the settings of a specific backup. |
SELECT
examples
Lists all backups in a project for either a specified location or for all locations.
SELECT
name,
description,
capacityGb,
createTime,
downloadBytes,
fileSystemProtocol,
kmsKey,
labels,
satisfiesPzi,
satisfiesPzs,
sourceFileShare,
sourceInstance,
sourceInstanceTier,
state,
storageBytes,
tags
FROM google.file.backups
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new backups
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.file.backups (
locationsId,
projectsId,
description,
labels,
sourceInstance,
sourceFileShare,
kmsKey,
tags
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ description }}',
'{{ labels }}',
'{{ sourceInstance }}',
'{{ sourceFileShare }}',
'{{ kmsKey }}',
'{{ tags }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: description
value: string
- name: state
value: string
- name: createTime
value: string
- name: labels
value: object
- name: capacityGb
value: string
- name: storageBytes
value: string
- name: sourceInstance
value: string
- name: sourceFileShare
value: string
- name: sourceInstanceTier
value: string
- name: downloadBytes
value: string
- name: satisfiesPzs
value: boolean
- name: satisfiesPzi
value: boolean
- name: kmsKey
value: string
- name: tags
value: object
- name: fileSystemProtocol
value: string
UPDATE
example
Updates a backups
resource.
/*+ update */
UPDATE google.file.backups
SET
description = '{{ description }}',
labels = '{{ labels }}',
sourceInstance = '{{ sourceInstance }}',
sourceFileShare = '{{ sourceFileShare }}',
kmsKey = '{{ kmsKey }}',
tags = '{{ tags }}'
WHERE
backupsId = '{{ backupsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
DELETE
example
Deletes the specified backups
resource.
/*+ delete */
DELETE FROM google.file.backups
WHERE backupsId = '{{ backupsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';