-
Notifications
You must be signed in to change notification settings - Fork 9
/
README
48 lines (31 loc) · 1.33 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
elasticbackup
=============
elasticbackup is a set of two command-line tools,
elasticbackup, and
elasticrestore
that you can use to backup and restore data from ElasticSearch indices using
their scroll[1] and bulk[2] APIs.
installing
----------
elasticbackup is available on the Python Package Index, so you can just
pip install elasticbackup
usage
-----
To backup the data from an index "foo" on a remote server, "es-1.mydomain.com",
that listens on port 9200, you can run
elasticbackup es-1.mydomain.com:9200 foo
By default, this will create two files in your working directory. One contains a
JSON-serialisation of the index's mappings. The other contains a dump of the
documents in the index, serialised as JSON, one per line.
To restore these files to a local index, you might run
elasticrestore -d <documents> -m <mappings> localhost:9200 myfoo
For more information and complete options allowed by elasticbackup and
elasticrestore, run
elasticbackup -h
elasticrestore -h
license
-------
elasticbackup is released under the terms of the MIT license, a copy of which
can be found in this distribution, in the LICENSE file.
[1]: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-scroll.html
[2]: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-bulk.html