elastic / elastic/curator

Unable to skip some indices while restoring

Open
#1,673 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
3.1k
Forks
627
PR merge metrics
No merged PRs in 30d

Description

Unable to skip some indices while restoring

Steps to Reproduce the Problem

I want to restore all indices except starting with "A"
ES query to do it is

POST _snapshot/repo/snapshot/_restore
{
  "indices": "*,-A*",
  "index_settings": {
    "index.number_of_replicas": 0
  }
}

However, Curator requires a list of indices (Doc at https://www.elastic.co/guide/en/elasticsearch/client/curator/7.0/option_indices.html show you can pass a string but it's not true)

When providing a list ES won't restore anything.

{
  "indices": ["*,-A*"],
  "index_settings": {
    "index.number_of_replicas": 0
  }
}

Could you please allow to provide indices as a string
Do you know any other way how to restore all indices except indices starting with "A" ?


Providing indices as

"indices": ["*","-A*"]

seems to work more or less ok - it do not restore indices starting with *, but returns some curator errors

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the snapshot restore request using the issue's indices examples, comparing a string pattern with a list containing "*,-A*" and "*","-A*". Trace the Curator restore entry point and its indices validation, then verify that the requested exclusion works without Curator errors and that the documented string form is supported or corrected.

Written by the indexing model from the issue text.

Assessment

Tech stack
elasticsearch, python
Domain
backend, search
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.