meskyanichi/backup — pull request #433 by portertech (2013-04-18 19:52:48+00:00)
Title: Elasticsearch Database

This adds a database: "Elasticsearch"

Currently supports tar'n all indices or a specific index (primary goal). I needed to backup yesterdays' Logstash index.

It can flush and/or close an index before backing it up, using the Elasticsearch API. This functionality is exposed via invoke_flush & invoke_close.

Example usage:

Backup::Database::Elasticsearch.defaults do |db|
db.path = "/mnt/logstash/server/data/elasticsearch"
db.index = "logstash-#{(Date.today-1).strftime(\'%Y.%m.%d\')}"
db.invoke_flush = true
db.invoke_close = false
db.host = "localhost"
db.port = 9200
end

Please let me know your thoughts.