Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: exclude 'dot indices' #25

Merged
merged 1 commit into from
Dec 15, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions templates/load_snapshot.sh.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,9 @@ fi
curl -s -XPOST --fail "$cluster_url/_snapshot/$es_repo_name/$snapshot_name/_restore" \
-H 'Content-Type: application/json'

## 3.1 get first index name
first_index_name=$(curl -s "$cluster_url/_cat/indices?format=json" | jq -r .[].index | grep -v '.geoip_databases')
## 3.1 get first index name (excluding dot indices)
## see: https://github.com/elastic/elasticsearch/issues/50251
first_index_name=$(curl -s "$cluster_url/_cat/indices?format=json" | jq -r .[].index | grep -v '^\.')
echo "first index name is $first_index_name"

## 4. make alias if alias_name set
Expand Down