Elasticsearch

[Elasticsearch] Elasticsearch snapshot 데이터 연동

데이터 세상 2022. 1. 15. 14:11

Elasticsearch snapshot 데이터 연동

Elasticsearch를 실행한 후 path.repo에서 설정한 물리적인 스냅숏 데이터를 elasticsearch로 인식시켜야 한다.

curl -H "Content-Type: application/json" 
-XPUT "http://localhost:9200/_snapshot/snapshottest" -d "{
	\"type\":\"fs\", 
	\"settings\":{
		\"location\":\"path\\repo\\test", 
		\"compress\": true}
}"

 

curl 명령어 실행 후 Content-Type header 오류 발생 시 다음 옵션 추가

-H "Content-Type: application/json"

 

"error":"Content-Type header [application/x-www-form-urlencoded] is not supported","status":406

 

curl 명령어 실행 후 다음과 같은 오류 발생으로 인해 "을 \"로 변경 후 명령 실행

"error":{"root_cause":[{"type":"json_parse_exception","reason":"Unexpected character (''' (code 39)):

 

반응형

'Elasticsearch' 카테고리의 다른 글

[Elasticsearch] Elasticsearch Cluster, Node  (0) 2022.01.15
[Elasticsearch] Elasticsearch 데이터 구조  (0) 2022.01.15
[Kibana] Kibana 설치  (0) 2022.01.15
[Elasticsearch] Elasticsearch 설치  (0) 2022.01.14
[OpenJDK] OpenJDK 설치  (0) 2022.01.14