Skip to content

[FEATURE] Setting number of replicas in "convert_index_to_remote" or "snapshot" action directly #1487

@thomas315

Description

@thomas315

Is your feature request related to a problem?
When moving an index to a Searchable Snapshot we currently need to set the number of replicas either before the snapshot action or after convert_index_to_remote.
Both options are not optimal especially if you want to scale down to 0 replicas.
Doing it before will lose redundancy. Doing it after will lead unnecessary load or yellow state if you run not enough eligible nodes on which the replicas can be restored.

What solution would you like?
That you can define number of replicas directly in convert_index_to_remote action. Similar to when you restore it manually. Example:

POST /_snapshot/backup-repo/daily-snapshot/_restore
{
  "storage_type": "remote_snapshot",
  "rename_pattern": "(.+)",
  "rename_replacement": "$1_remote",
  "indices": "*",
  "index_settings": {
    "number_of_replicas": "0"
  }
}

Alternatively this option could also be added to the snapshot action.

What alternatives have you considered?
Currently setting replicas to 0 after they are restored.

Do you have any additional context?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions