Skip to main content

restores

Creates, updates, deletes, gets or lists a restores resource.

Overview

Namerestores
TypeResource
Idgoogle.gkebackup.restores

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringOutput only. The full name of the Restore resource. Format: projects/*/locations/*/restorePlans/*/restores/*
backupstringRequired. Immutable. A reference to the Backup used as the source from which this Restore will restore. Note that this Backup must be a sub-resource of the RestorePlan's backup_plan. Format: projects/*/locations/*/backupPlans/*/backups/*.
clusterstringOutput only. The target cluster into which this Restore will restore data. Valid formats: - projects/*/locations/*/clusters/* - projects/*/zones/*/clusters/* Inherited from parent RestorePlan's cluster value.
completeTimestring (google-datetime)Output only. Timestamp of when the restore operation completed.
createTimestring (google-datetime)Output only. The timestamp when this Restore resource was created.
descriptionstringOptional. User specified descriptive string for this Restore.
etagstringOutput only. etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a restore from overwriting each other. It is strongly suggested that systems make use of the etag in the read-modify-write cycle to perform restore updates in order to avoid race conditions: An etag is returned in the response to GetRestore, and systems are expected to put that etag in the request to UpdateRestore or DeleteRestore to ensure that their change will be applied to the same version of the resource.
filterobjectOptional. Immutable. Filters resources for Restore. If not specified, the scope of the restore will remain the same as defined in the RestorePlan. If this is specified and no resources are matched by the inclusion_filters or everything is excluded by the exclusion_filters, nothing will be restored. This filter can only be specified if the value of namespaced_resource_restore_mode is set to MERGE_SKIP_ON_CONFLICT, MERGE_REPLACE_VOLUME_ON_CONFLICT or MERGE_REPLACE_ON_CONFLICT. (id: Filter)
labelsobjectA set of custom labels supplied by user.
resourcesExcludedCountinteger (int32)Output only. Number of resources excluded during the restore execution.
resourcesFailedCountinteger (int32)Output only. Number of resources that failed to be restored during the restore execution.
resourcesRestoredCountinteger (int32)Output only. Number of resources restored during the restore execution.
restoreConfigobjectOutput only. Configuration of the Restore. Inherited from parent RestorePlan's restore_config. (id: RestoreConfig)
statestringOutput only. The current state of the Restore.
stateReasonstringOutput only. Human-readable description of why the Restore is in its current state. This field is only meant for human readability and should not be used programmatically as this field is not guaranteed to be consistent.
troubleshootingInfoobjectOutput only. Information about the troubleshooting steps which will provide debugging information to the end users. (id: TroubleshootingInfo)
uidstringOutput only. Server generated global unique identifier of UUID format.
updateTimestring (google-datetime)Output only. The timestamp when this Restore resource was last updated.
volumeDataRestorePolicyOverridesarrayOptional. Immutable. Overrides the volume data restore policies selected in the Restore Config for override-scoped resources.
volumesRestoredCountinteger (int32)Output only. Number of volumes restored during the restore execution.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, restorePlansId, restoresIdRetrieves the details of a single Restore.
listselectprojectsId, locationsId, restorePlansIdpageSize, pageToken, filter, orderByLists the Restores for a given RestorePlan.
createinsertprojectsId, locationsId, restorePlansIdrestoreIdCreates a new Restore for the given RestorePlan.
patchupdateprojectsId, locationsId, restorePlansId, restoresIdupdateMaskUpdate a Restore.
deletedeleteprojectsId, locationsId, restorePlansId, restoresIdetag, forceDeletes an existing Restore.

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.

NameDatatypeDescription
locationsIdstring
projectsIdstring
restorePlansIdstring
restoresIdstring
etagstring
filterstring
forceboolean
orderBystring
pageSizeinteger (int32)
pageTokenstring
restoreIdstring
updateMaskstring (google-fieldmask)

SELECT examples

Retrieves the details of a single Restore.

SELECT
name,
backup,
cluster,
completeTime,
createTime,
description,
etag,
filter,
labels,
resourcesExcludedCount,
resourcesFailedCount,
resourcesRestoredCount,
restoreConfig,
state,
stateReason,
troubleshootingInfo,
uid,
updateTime,
volumeDataRestorePolicyOverrides,
volumesRestoredCount
FROM google.gkebackup.restores
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND restorePlansId = '{{ restorePlansId }}' -- required
AND restoresId = '{{ restoresId }}' -- required;

INSERT examples

Creates a new Restore for the given RestorePlan.

INSERT INTO google.gkebackup.restores (
data__description,
data__backup,
data__labels,
data__filter,
data__volumeDataRestorePolicyOverrides,
projectsId,
locationsId,
restorePlansId,
restoreId
)
SELECT
'{{ description }}',
'{{ backup }}',
'{{ labels }}',
'{{ filter }}',
'{{ volumeDataRestorePolicyOverrides }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ restorePlansId }}',
'{{ restoreId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Update a Restore.

UPDATE google.gkebackup.restores
SET
data__description = '{{ description }}',
data__backup = '{{ backup }}',
data__labels = '{{ labels }}',
data__filter = '{{ filter }}',
data__volumeDataRestorePolicyOverrides = '{{ volumeDataRestorePolicyOverrides }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND restorePlansId = '{{ restorePlansId }}' --required
AND restoresId = '{{ restoresId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples

Deletes an existing Restore.

DELETE FROM google.gkebackup.restores
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND restorePlansId = '{{ restorePlansId }}' --required
AND restoresId = '{{ restoresId }}' --required
AND etag = '{{ etag }}'
AND force = '{{ force }}';