Elasticsearch backup and restore

setup backup curl -XPUT 'http://localhost:9200/_snapshot/my_backup/' -d '{ "type": "fs", "settings": { "location": "/Users/sacmac/esbackups/my_backup", "compress": true } }' create backup http PUT "localhost:9200/_snapshot/my_backup/snapshot_2?wait_for_completion=true" get info on snapshot http "localhost:9200/_snapshot/my_backup/snapshot_2" restore curl -XPOST "localhost:9200/_snapshot/my_backup/snapshot_2/_restore" partial restore, including various options that can be used curl -XPOST "localhost:9200/_snapshot/my_backup/snapshot_2/_restore" -d '{ "indices": "index_1,index_2", "ignore_unavailable": "true", "include_global_state": false, "rename_pattern": "index_(.+)", "rename_replacement": "restored_index_$1" }'

February 26, 2015 · 1 min · Scott Chamberlain

note to self, secure elasticsearch

Recently I spun up a box on a cloud hosting provider planning to make a tens of thousdands of queries to an Elasticsearch instance on the same box. I could have done this on my own machine, but didn’t want to take up compute resources. I installed R and Elasticsearch on the box, then went about doing my thang. A day later when things were still running, the hosting provider sent me a message that apparently my box had been serving up a DDoS attack....

February 26, 2015 · 2 min · Scott Chamberlain