Reference documentation and code samples for the Google Cloud Gke Backup V1 Client class NamespacedResourceRestoreMode.
Defines the behavior for handling the situation where sets of namespaced
resources being restored already exist in the target cluster.
Protobuf type google.cloud.gkebackup.v1.RestoreConfig.NamespacedResourceRestoreMode
Namespace
Google \ Cloud \ GkeBackup \ V1 \ RestoreConfig
Methods
static::name
Parameter
Name
Description
value
mixed
static::value
Parameter
Name
Description
name
mixed
Constants
NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED
Value: 0
Unspecified (invalid).
Generated from protobuf enum NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED = 0;
DELETE_AND_RESTORE
Value: 1
When conflicting top-level resources (either Namespaces or
ProtectedApplications, depending upon the scope) are encountered, this
will first trigger a delete of the conflicting resource AND ALL OF ITS
REFERENCED RESOURCES (e.g., all resources in the Namespace or all
resources referenced by the ProtectedApplication) before restoring the
resources from the Backup. This mode should only be used when you are
intending to revert some portion of a cluster to an earlier state.
Generated from protobuf enum DELETE_AND_RESTORE = 1;
FAIL_ON_CONFLICT
Value: 2
If conflicting top-level resources (either Namespaces or
ProtectedApplications, depending upon the scope) are encountered at the
beginning of a restore process, the Restore will fail. If a conflict
occurs during the restore process itself (e.g., because an out of band
process creates conflicting resources), a conflict will be reported.
Generated from protobuf enum FAIL_ON_CONFLICT = 2;
MERGE_SKIP_ON_CONFLICT
Value: 3
This mode merges the backup and the target cluster and skips the
conflicting resources. If a single resource to restore exists in the
cluster before restoration, the resource will be skipped, otherwise it
will be restored.
Generated from protobuf enum MERGE_SKIP_ON_CONFLICT = 3;
MERGE_REPLACE_VOLUME_ON_CONFLICT
Value: 4
This mode merges the backup and the target cluster and skips the
conflicting resources except volume data. If a PVC to restore already
exists, this mode will restore/reconnect the volume without overwriting
the PVC. It is similar to MERGE_SKIP_ON_CONFLICT except that it will
apply the volume data policy for the conflicting PVCs:
RESTORE_VOLUME_DATA_FROM_BACKUP: restore data only and respect the
reclaim policy of the original PV;
REUSE_VOLUME_HANDLE_FROM_BACKUP: reconnect and respect the reclaim
policy of the original PV;
NO_VOLUME_DATA_RESTORATION: new provision and respect the reclaim
policy of the original PV.
Note that this mode could cause data loss as the original PV can be
retained or deleted depending on its reclaim policy.
Generated from protobuf enum MERGE_REPLACE_VOLUME_ON_CONFLICT = 4;
MERGE_REPLACE_ON_CONFLICT
Value: 5
This mode merges the backup and the target cluster and replaces the
conflicting resources with the ones in the backup. If a single resource
to restore exists in the cluster before restoration, the resource will be
replaced with the one from the backup. To replace an existing resource,
the first attempt is to update the resource to match the one from the
backup; if the update fails, the second attempt is to delete the resource
and restore it from the backup.
Note that this mode could cause data loss as it replaces the existing
resources in the target cluster, and the original PV can be retained or
deleted depending on its reclaim policy.
Generated from protobuf enum MERGE_REPLACE_ON_CONFLICT = 5;
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud Gke Backup V1 Client - Class NamespacedResourceRestoreMode (1.2.1)\n\nVersion latestkeyboard_arrow_down\n\n- [1.2.1 (latest)](/php/docs/reference/cloud-gke-backup/latest/V1.RestoreConfig.NamespacedResourceRestoreMode)\n- [1.2.0](/php/docs/reference/cloud-gke-backup/1.2.0/V1.RestoreConfig.NamespacedResourceRestoreMode)\n- [1.0.3](/php/docs/reference/cloud-gke-backup/1.0.3/V1.RestoreConfig.NamespacedResourceRestoreMode)\n- [0.8.1](/php/docs/reference/cloud-gke-backup/0.8.1/V1.RestoreConfig.NamespacedResourceRestoreMode)\n- [0.7.2](/php/docs/reference/cloud-gke-backup/0.7.2/V1.RestoreConfig.NamespacedResourceRestoreMode)\n- [0.6.0](/php/docs/reference/cloud-gke-backup/0.6.0/V1.RestoreConfig.NamespacedResourceRestoreMode)\n- [0.5.3](/php/docs/reference/cloud-gke-backup/0.5.3/V1.RestoreConfig.NamespacedResourceRestoreMode)\n- [0.4.0](/php/docs/reference/cloud-gke-backup/0.4.0/V1.RestoreConfig.NamespacedResourceRestoreMode)\n- [0.3.1](/php/docs/reference/cloud-gke-backup/0.3.1/V1.RestoreConfig.NamespacedResourceRestoreMode)\n- [0.2.0](/php/docs/reference/cloud-gke-backup/0.2.0/V1.RestoreConfig.NamespacedResourceRestoreMode)\n- [0.1.7](/php/docs/reference/cloud-gke-backup/0.1.7/V1.RestoreConfig.NamespacedResourceRestoreMode) \nReference documentation and code samples for the Google Cloud Gke Backup V1 Client class NamespacedResourceRestoreMode.\n\nDefines the behavior for handling the situation where sets of namespaced\nresources being restored already exist in the target cluster.\n\nProtobuf type `google.cloud.gkebackup.v1.RestoreConfig.NamespacedResourceRestoreMode`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ GkeBackup \\\\ V1 \\\\ RestoreConfig\n\nMethods\n-------\n\n### static::name\n\n### static::value\n\nConstants\n---------\n\n### NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED\n\n Value: 0\n\nUnspecified (invalid).\n\nGenerated from protobuf enum `NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED = 0;`\n\n### DELETE_AND_RESTORE\n\n Value: 1\n\nWhen conflicting top-level resources (either Namespaces or\nProtectedApplications, depending upon the scope) are encountered, this\nwill first trigger a delete of the conflicting resource AND ALL OF ITS\nREFERENCED RESOURCES (e.g., all resources in the Namespace or all\nresources referenced by the ProtectedApplication) before restoring the\nresources from the Backup. This mode should only be used when you are\nintending to revert some portion of a cluster to an earlier state.\n\nGenerated from protobuf enum `DELETE_AND_RESTORE = 1;`\n\n### FAIL_ON_CONFLICT\n\n Value: 2\n\nIf conflicting top-level resources (either Namespaces or\nProtectedApplications, depending upon the scope) are encountered at the\nbeginning of a restore process, the Restore will fail. If a conflict\noccurs during the restore process itself (e.g., because an out of band\nprocess creates conflicting resources), a conflict will be reported.\n\nGenerated from protobuf enum `FAIL_ON_CONFLICT = 2;`\n\n### MERGE_SKIP_ON_CONFLICT\n\n Value: 3\n\nThis mode merges the backup and the target cluster and skips the\nconflicting resources. If a single resource to restore exists in the\ncluster before restoration, the resource will be skipped, otherwise it\nwill be restored.\n\nGenerated from protobuf enum `MERGE_SKIP_ON_CONFLICT = 3;`\n\n### MERGE_REPLACE_VOLUME_ON_CONFLICT\n\n Value: 4\n\nThis mode merges the backup and the target cluster and skips the\nconflicting resources except volume data. If a PVC to restore already\nexists, this mode will restore/reconnect the volume without overwriting\nthe PVC. It is similar to MERGE_SKIP_ON_CONFLICT except that it will\napply the volume data policy for the conflicting PVCs:\n\n- RESTORE_VOLUME_DATA_FROM_BACKUP: restore data only and respect the reclaim policy of the original PV;\n- REUSE_VOLUME_HANDLE_FROM_BACKUP: reconnect and respect the reclaim policy of the original PV;\n- NO_VOLUME_DATA_RESTORATION: new provision and respect the reclaim policy of the original PV.\n\nNote that this mode could cause data loss as the original PV can be\nretained or deleted depending on its reclaim policy.\n\nGenerated from protobuf enum `MERGE_REPLACE_VOLUME_ON_CONFLICT = 4;`\n\n### MERGE_REPLACE_ON_CONFLICT\n\n Value: 5\n\nThis mode merges the backup and the target cluster and replaces the\nconflicting resources with the ones in the backup. If a single resource\nto restore exists in the cluster before restoration, the resource will be\nreplaced with the one from the backup. To replace an existing resource,\nthe first attempt is to update the resource to match the one from the\nbackup; if the update fails, the second attempt is to delete the resource\nand restore it from the backup.\n\nNote that this mode could cause data loss as it replaces the existing\nresources in the target cluster, and the original PV can be retained or\ndeleted depending on its reclaim policy.\n\nGenerated from protobuf enum `MERGE_REPLACE_ON_CONFLICT = 5;`"]]