Dump all documents of Elasticsearch

后端 未结 8 1413
囚心锁ツ
囚心锁ツ 2020-12-23 11:04

Is there any way to create a dump file that contains all the data of an index among with its settings and mappings?

A Similar way as mongoDB does with mongodump

8条回答
  •  甜味超标
    2020-12-23 11:49

    ElasticSearch itself provides a way to create data backup and restoration. The simple command to do it is:

    CURL -XPUT 'localhost:9200/_snapshot//' -d '{
        "indices": "",
        "ignore_unavailable": true,
        "include_global_state": false
    }'
    

    Now, how to create, this folder, how to include this folder path in ElasticSearch configuration, so that it will be available for ElasticSearch, restoration method, is well explained here. To see its practical demo surf here.

提交回复
热议问题