Skip to main content

restores

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

Overview

Namerestores
TypeResource
Idgoogle.gkebackup.restores

Fields

NameDatatypeDescription
namestringOutput only. The full name of the Restore resource. Format: projects/*/locations/*/restorePlans/*/restores/*
descriptionstringUser specified descriptive string for this Restore.
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.
completeTimestringOutput only. Timestamp of when the restore operation completed.
createTimestringOutput only. The timestamp when this Restore resource was created.
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.
filterobjectDefines the filter for Restore. This filter can be used to further refine the resource selection of the Restore beyond the coarse-grained scope defined in the RestorePlan. exclusion_filters take precedence over inclusion_filters. If a resource matches both inclusion_filters and exclusion_filters, it will not be restored.
labelsobjectA set of custom labels supplied by user.
resourcesExcludedCountintegerOutput only. Number of resources excluded during the restore execution.
resourcesFailedCountintegerOutput only. Number of resources that failed to be restored during the restore execution.
resourcesRestoredCountintegerOutput only. Number of resources restored during the restore execution.
restoreConfigobjectConfiguration of a restore.
statestringOutput only. The current state of the Restore.
stateReasonstringOutput only. Human-readable description of why the Restore is in its current state.
uidstringOutput only. Server generated global unique identifier of UUID format.
updateTimestringOutput 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.
volumesRestoredCountintegerOutput only. Number of volumes restored during the restore execution.

Methods

NameAccessible byRequired ParamsDescription
getSELECTlocationsId, projectsId, restorePlansId, restoresIdRetrieves the details of a single Restore.
listSELECTlocationsId, projectsId, restorePlansIdLists the Restores for a given RestorePlan.
createINSERTlocationsId, projectsId, restorePlansIdCreates a new Restore for the given RestorePlan.
deleteDELETElocationsId, projectsId, restorePlansId, restoresIdDeletes an existing Restore.
patchUPDATElocationsId, projectsId, restorePlansId, restoresIdUpdate a Restore.

SELECT examples

Lists the Restores for a given RestorePlan.

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

INSERT example

Use the following StackQL query and manifest file to create a new restores resource.

/*+ create */
INSERT INTO google.gkebackup.restores (
locationsId,
projectsId,
restorePlansId,
description,
backup,
labels,
filter,
volumeDataRestorePolicyOverrides
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ restorePlansId }}',
'{{ description }}',
'{{ backup }}',
'{{ labels }}',
'{{ filter }}',
'{{ volumeDataRestorePolicyOverrides }}'
;

UPDATE example

Updates a restores resource.

/*+ update */
UPDATE google.gkebackup.restores
SET
description = '{{ description }}',
backup = '{{ backup }}',
labels = '{{ labels }}',
filter = '{{ filter }}',
volumeDataRestorePolicyOverrides = '{{ volumeDataRestorePolicyOverrides }}'
WHERE
locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND restorePlansId = '{{ restorePlansId }}'
AND restoresId = '{{ restoresId }}';

DELETE example

Deletes the specified restores resource.

/*+ delete */
DELETE FROM google.gkebackup.restores
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND restorePlansId = '{{ restorePlansId }}'
AND restoresId = '{{ restoresId }}';