Jason Lee
  • Home
  • Github
Sign in Subscribe

elasticsearch

A collection of 2 posts
elasticsearch

Elasticsearch 常用查詢語法

1. 列出全部 indices GET /_cat/indices 2. 列出全部 snapshot repo GET /_snapshot 3. 列出全部 snapshot GET /_cat/snapshots/{snapshot_repo}?v&s=i
Jan 28, 2019
elasticsearch

Elasticsearch Restore

今天手滑不小心把 production 的 index 刪除了,嚇都嚇死了...幸好平時有做備份,今天剛好臨時演練一下,所以有了這一篇文章,因為我指誤刪了一個 index, 但我平常備份是整個 cluster 備份,所以這本是從 cluster 的完整備份檔取一個 index 來做還原。 首先需要把你的 index 先 close,之後再進行還原,當 Elasticsearch 還原好之後,它會自動把 index 打開 POST /index-xxx/_close POST _snapshot/s3_repository/backup-xxx/_restore { "indices": "index-xxx", "ignore_unavailable": true, "include_global_state": true } Reference: https:
Apr 24, 2018 1 min read
Page 1 of 1
Jason Lee © 2025
Powered by Ghost