Class RestoreRequest
- All Implemented Interfaces:
JsonpSerializable
You can restore a snapshot only to a running cluster with an elected master node. The snapshot repository must be registered and available to the cluster. The snapshot and cluster versions must be compatible.
To restore a snapshot, the cluster's global metadata must be writable. Ensure there are't any cluster blocks that prevent writes. The restore operation ignores index blocks.
Before you restore a data stream, ensure the cluster contains a matching index template with data streams enabled. To check, use the index management feature in Kibana or the get index template API:
GET _index_template/*?filter_path=index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream
If no such template exists, you can create one or restore a cluster state that contains one. Without a matching index template, a data stream can't roll over or create backing indices.
If your snapshot contains data from App Search or Workplace Search, you must restore the Enterprise Search encryption key before you restore the snapshot.
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class co.elastic.clients.elasticsearch._types.RequestBase
RequestBase.AbstractBuilder<BuilderT extends RequestBase.AbstractBuilder<BuilderT>>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<RestoreRequest>
Json deserializer forRestoreRequest
static final Endpoint<RestoreRequest,
RestoreResponse, ErrorResponse> Endpoint "snapshot.restore
". -
Method Summary
Modifier and TypeMethodDescriptionAPI name:feature_states
API name:ignore_index_settings
final Boolean
API name:ignore_unavailable
final Boolean
API name:include_aliases
final Boolean
API name:include_global_state
final IndexSettings
API name:index_settings
indices()
API name:indices
final Time
Explicit operation timeout for connection to master nodestatic RestoreRequest
final Boolean
partial()
API name:partial
final String
API name:rename_pattern
final String
API name:rename_replacement
final String
Required - A repository namevoid
serialize
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected void
serializeInternal
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static void
final String
snapshot()
Required - A snapshot namefinal Boolean
Should this request wait until the operation has completed before returningMethods inherited from class co.elastic.clients.elasticsearch._types.RequestBase
toString
-
Field Details
-
_DESERIALIZER
Json deserializer forRestoreRequest
-
_ENDPOINT
Endpoint "snapshot.restore
".
-
-
Method Details
-
of
-
featureStates
API name:feature_states
-
ignoreIndexSettings
API name:ignore_index_settings
-
includeAliases
API name:include_aliases
-
includeGlobalState
API name:include_global_state
-
indexSettings
API name:index_settings
-
indices
API name:indices
-
masterTimeout
Explicit operation timeout for connection to master nodeAPI name:
master_timeout
-
partial
API name:partial
-
renamePattern
API name:rename_pattern
-
renameReplacement
API name:rename_replacement
-
repository
Required - A repository nameAPI name:
repository
-
snapshot
Required - A snapshot nameAPI name:
snapshot
-
waitForCompletion
Should this request wait until the operation has completed before returningAPI name:
wait_for_completion
-
serialize
Serialize this object to JSON.- Specified by:
serialize
in interfaceJsonpSerializable
-
serializeInternal
-
setupRestoreRequestDeserializer
protected static void setupRestoreRequestDeserializer(ObjectDeserializer<RestoreRequest.Builder> op)
-