Class RestoreRequest

java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch.snapshot.RestoreRequest
All Implemented Interfaces:
JsonpSerializable

@JsonpDeserializable public class RestoreRequest extends RequestBase implements JsonpSerializable
Restore a snapshot. Restore a snapshot of a cluster or data streams and indices.

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:
  • Field Details

  • Method Details

    • of

    • featureStates

      public final List<String> featureStates()
      API name: feature_states
    • ignoreIndexSettings

      public final List<String> ignoreIndexSettings()
      API name: ignore_index_settings
    • ignoreUnavailable

      @Nullable public final Boolean ignoreUnavailable()
      API name: ignore_unavailable
    • includeAliases

      @Nullable public final Boolean includeAliases()
      API name: include_aliases
    • includeGlobalState

      @Nullable public final Boolean includeGlobalState()
      API name: include_global_state
    • indexSettings

      @Nullable public final IndexSettings indexSettings()
      API name: index_settings
    • indices

      public final List<String> indices()
      API name: indices
    • masterTimeout

      @Nullable public final Time masterTimeout()
      Explicit operation timeout for connection to master node

      API name: master_timeout

    • partial

      @Nullable public final Boolean partial()
      API name: partial
    • renamePattern

      @Nullable public final String renamePattern()
      API name: rename_pattern
    • renameReplacement

      @Nullable public final String renameReplacement()
      API name: rename_replacement
    • repository

      public final String repository()
      Required - A repository name

      API name: repository

    • snapshot

      public final String snapshot()
      Required - A snapshot name

      API name: snapshot

    • waitForCompletion

      @Nullable public final Boolean waitForCompletion()
      Should this request wait until the operation has completed before returning

      API name: wait_for_completion

    • serialize

      public void serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
      Serialize this object to JSON.
      Specified by:
      serialize in interface JsonpSerializable
    • serializeInternal

      protected void serializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
    • setupRestoreRequestDeserializer

      protected static void setupRestoreRequestDeserializer(ObjectDeserializer<RestoreRequest.Builder> op)