From 99029e37a8b78d938538741a5de06f8bf9e40f89 Mon Sep 17 00:00:00 2001 From: Honza Kral Date: Wed, 24 Jul 2013 16:08:25 +0200 Subject: [PATCH] snapshot_index --- elasticsearch/client/indices.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/elasticsearch/client/indices.py b/elasticsearch/client/indices.py index 145417c3..f4320724 100644 --- a/elasticsearch/client/indices.py +++ b/elasticsearch/client/indices.py @@ -131,6 +131,18 @@ class IndicesClient(NamespacedClient): return False return True + @query_params('ignore_indices') + def snapshot_index(self, index=None, params=None): + """ + The gateway snapshot API allows to explicitly perform a snapshot through the gateway of one or more indices (backup them). + http://www.elasticsearch.org/guide/reference/api/admin-indices-gateway-snapshot/ + + :arg index: A comma-separated list of index names; use `_all` or empty string for all indices + :arg ignore_indices: When performed on multiple indices, allows to ignore `missing` ones, default u'none' + """ + status, data = self.transport.perform_request('POST', _make_path(index, '_gateway', 'snapshot'), params=params) + return data + @query_params('ignore_conflicts', 'timeout', 'master_timeout') def put_mapping(self, index, doc_type, body, params=None): """