Backend Study/ELK Stack
엘라스틱서치 키바나로 스냅샷 생성하기
gyu.ree
2023. 1. 24. 16:00
1. elasticsearch.yml에 path.repo 속성을 설정한다.
ex.
path.repo: ["/search_example", "/agg_example"]
2. 스냅샷 레포지토리를 생성한다.
repository는 실제 스냅샷이 저장되는 장소이다.
PUT /_snapshot/search_example
{
"type": "fs",
"settings": {
"compress": true,
"location": "/Users/kimkyuri/Documents/elasticsearch/elastic-book-snapshot-master/book_backup/search_example"
}
}


3. 스냅샷 생성하기
스냅샷이 있는지 확인하기
PUT /_snapshot/search_example/movie_search
{
"indices": "movie_search",
"ignore_unavailable": true,
"include_global_state": true
}
4. 스냅샷 복구하기
POST /_snapshot/search_example/movie-search/_restore
5. 인덱스 확인하기
GET /_cat/indices/movie_search?v&pretty