backups
Creates, updates, deletes, gets or lists a backups
resource.
Overview
Name | backups |
Type | Resource |
Id | google.backupdr.backups |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. Identifier. Name of the backup to create. It must have the format"projects//locations//backupVaults//dataSources/{datasource}/backups/{backup}" . {backup} cannot be changed after creation. It must be between 3-63 characters long and must be unique within the datasource. |
backupApplianceBackupProperties | object | Output only. Backup Appliance specific backup properties. (id: BackupApplianceBackupProperties) |
backupApplianceLocks | array | Optional. The list of BackupLocks taken by the accessor Backup Appliance. |
backupType | string | Output only. Type of the backup, unspecified, scheduled or ondemand. |
cloudSqlInstanceBackupProperties | object | Output only. Cloud SQL specific backup properties. (id: CloudSqlInstanceBackupProperties) |
computeInstanceBackupProperties | object | Output only. Compute Engine specific backup properties. (id: ComputeInstanceBackupProperties) |
consistencyTime | string (google-datetime) | Output only. The point in time when this backup was captured from the source. |
createTime | string (google-datetime) | Output only. The time when the instance was created. |
description | string | Output only. The description of the Backup instance (2048 characters or less). |
diskBackupProperties | object | Output only. Disk specific backup properties. (id: DiskBackupProperties) |
enforcedRetentionEndTime | string (google-datetime) | Optional. The backup can not be deleted before this time. |
etag | string | Optional. Server specified ETag to prevent updates from overwriting each other. |
expireTime | string (google-datetime) | Optional. When this backup is automatically expired. |
gcpBackupPlanInfo | object | Output only. Configuration for a Google Cloud resource. (id: GCPBackupPlanInfo) |
labels | object | Optional. Resource labels to represent user provided metadata. No labels currently defined. |
resourceSizeBytes | string (int64) | Output only. source resource size in bytes at the time of the backup. |
satisfiesPzi | boolean | Optional. Output only. Reserved for future use. |
satisfiesPzs | boolean | Optional. Output only. Reserved for future use. |
serviceLocks | array | Output only. The list of BackupLocks taken by the service to prevent the deletion of the backup. |
state | string | Output only. The Backup resource instance state. |
updateTime | string (google-datetime) | Output only. The time when the instance was updated. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. Identifier. Name of the backup to create. It must have the format"projects//locations//backupVaults//dataSources/{datasource}/backups/{backup}" . {backup} cannot be changed after creation. It must be between 3-63 characters long and must be unique within the datasource. |
backupApplianceBackupProperties | object | Output only. Backup Appliance specific backup properties. (id: BackupApplianceBackupProperties) |
backupApplianceLocks | array | Optional. The list of BackupLocks taken by the accessor Backup Appliance. |
backupType | string | Output only. Type of the backup, unspecified, scheduled or ondemand. |
cloudSqlInstanceBackupProperties | object | Output only. Cloud SQL specific backup properties. (id: CloudSqlInstanceBackupProperties) |
computeInstanceBackupProperties | object | Output only. Compute Engine specific backup properties. (id: ComputeInstanceBackupProperties) |
consistencyTime | string (google-datetime) | Output only. The point in time when this backup was captured from the source. |
createTime | string (google-datetime) | Output only. The time when the instance was created. |
description | string | Output only. The description of the Backup instance (2048 characters or less). |
diskBackupProperties | object | Output only. Disk specific backup properties. (id: DiskBackupProperties) |
enforcedRetentionEndTime | string (google-datetime) | Optional. The backup can not be deleted before this time. |
etag | string | Optional. Server specified ETag to prevent updates from overwriting each other. |
expireTime | string (google-datetime) | Optional. When this backup is automatically expired. |
gcpBackupPlanInfo | object | Output only. Configuration for a Google Cloud resource. (id: GCPBackupPlanInfo) |
labels | object | Optional. Resource labels to represent user provided metadata. No labels currently defined. |
resourceSizeBytes | string (int64) | Output only. source resource size in bytes at the time of the backup. |
satisfiesPzi | boolean | Optional. Output only. Reserved for future use. |
satisfiesPzs | boolean | Optional. Output only. Reserved for future use. |
serviceLocks | array | Output only. The list of BackupLocks taken by the service to prevent the deletion of the backup. |
state | string | Output only. The Backup resource instance state. |
updateTime | string (google-datetime) | Output only. The time when the instance was updated. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , backupVaultsId , dataSourcesId , backupsId | view | Gets details of a Backup. |
list | select | projectsId , locationsId , backupVaultsId , dataSourcesId | pageSize , pageToken , filter , orderBy , view | Lists Backups in a given project and location. |
patch | update | projectsId , locationsId , backupVaultsId , dataSourcesId , backupsId | updateMask , requestId | Updates the settings of a Backup. |
delete | delete | projectsId , locationsId , backupVaultsId , dataSourcesId , backupsId | requestId | Deletes a Backup. |
restore | exec | projectsId , locationsId , backupVaultsId , dataSourcesId , backupsId | Restore from 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 |
---|---|---|
backupVaultsId | string | |
backupsId | string | |
dataSourcesId | string | |
locationsId | string | |
projectsId | string | |
filter | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
requestId | string | |
updateMask | string (google-fieldmask) | |
view | string |
SELECT
examples
- get
- list
Gets details of a Backup.
SELECT
name,
backupApplianceBackupProperties,
backupApplianceLocks,
backupType,
cloudSqlInstanceBackupProperties,
computeInstanceBackupProperties,
consistencyTime,
createTime,
description,
diskBackupProperties,
enforcedRetentionEndTime,
etag,
expireTime,
gcpBackupPlanInfo,
labels,
resourceSizeBytes,
satisfiesPzi,
satisfiesPzs,
serviceLocks,
state,
updateTime
FROM google.backupdr.backups
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND backupVaultsId = '{{ backupVaultsId }}' -- required
AND dataSourcesId = '{{ dataSourcesId }}' -- required
AND backupsId = '{{ backupsId }}' -- required
AND view = '{{ view }}';
Lists Backups in a given project and location.
SELECT
name,
backupApplianceBackupProperties,
backupApplianceLocks,
backupType,
cloudSqlInstanceBackupProperties,
computeInstanceBackupProperties,
consistencyTime,
createTime,
description,
diskBackupProperties,
enforcedRetentionEndTime,
etag,
expireTime,
gcpBackupPlanInfo,
labels,
resourceSizeBytes,
satisfiesPzi,
satisfiesPzs,
serviceLocks,
state,
updateTime
FROM google.backupdr.backups
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND backupVaultsId = '{{ backupVaultsId }}' -- required
AND dataSourcesId = '{{ dataSourcesId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}'
AND view = '{{ view }}';
UPDATE
examples
- patch
Updates the settings of a Backup.
UPDATE google.backupdr.backups
SET
data__labels = '{{ labels }}',
data__enforcedRetentionEndTime = '{{ enforcedRetentionEndTime }}',
data__expireTime = '{{ expireTime }}',
data__etag = '{{ etag }}',
data__backupApplianceLocks = '{{ backupApplianceLocks }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND backupVaultsId = '{{ backupVaultsId }}' --required
AND dataSourcesId = '{{ dataSourcesId }}' --required
AND backupsId = '{{ backupsId }}' --required
AND updateMask = '{{ updateMask}}'
AND requestId = '{{ requestId}}'
RETURNING
name,
done,
error,
metadata,
response;
DELETE
examples
- delete
Deletes a Backup.
DELETE FROM google.backupdr.backups
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND backupVaultsId = '{{ backupVaultsId }}' --required
AND dataSourcesId = '{{ dataSourcesId }}' --required
AND backupsId = '{{ backupsId }}' --required
AND requestId = '{{ requestId }}';
Lifecycle Methods
- restore
Restore from a Backup
EXEC google.backupdr.backups.restore
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@backupVaultsId='{{ backupVaultsId }}' --required,
@dataSourcesId='{{ dataSourcesId }}' --required,
@backupsId='{{ backupsId }}' --required
@@json=
'{
"requestId": "{{ requestId }}",
"computeInstanceTargetEnvironment": "{{ computeInstanceTargetEnvironment }}",
"diskTargetEnvironment": "{{ diskTargetEnvironment }}",
"regionDiskTargetEnvironment": "{{ regionDiskTargetEnvironment }}",
"computeInstanceRestoreProperties": "{{ computeInstanceRestoreProperties }}",
"diskRestoreProperties": "{{ diskRestoreProperties }}"
}';