#Elasticdump is an NPM package required for this purpose
# Get all indices
curl -XGET 'localhost:9200/_cat/indices?v'
# Get cluster health
curl -XGET "localhost:9200/_cluster/health"
# Get path to stored data and cluster info
curl -XGET 'localhost:9200/_nodes/stats/fs?pretty'
# Backup an index to JSON file
elasticdump --input=http://localhost:9200 --input-index=index_name --output=index_mappings.json --type=mapping
elasticdump --input=http://localhost:9200 --input-index=index_name --output=index_data.json --type=data
# Delete all indices ES
curl -XDELETE 'http://localhost:9200/_all'