A
A
Alexander Yelagin2015-01-26 00:45:14
elasticsearch
Alexander Yelagin, 2015-01-26 00:45:14

What are the steps for migrating elasticsearch data to a server?

Hello! There is a 30GB database in elasticsearch, you need to transfer it as quickly as possible to another server. Version 1.4.2 elasticsearch. What I tried - installed the same version of elastic on another server, stopped elastic, copied all the files from "/var/lib/elasticsearch/" to a new server (previously stopping elastic there too), launched elastic on a new server - started - no copied data . Where did I go wrong, tell me how to transfer the data correctly? I would not want to do it through import-export to files. If possible with examples or links to data transfer. Default elastic settings.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
W
warner, 2016-09-02
@warner

Of course, the question is old, but maybe someone will stumble, today it was necessary to transfer elastic data to another server. (Elasticsearch 2.3.5) Elasticsearch didn't work on the first server, only the files were there. Therefore, it would not be possible to use different backup utilities. The following helped:
I launched elastic on the new server, created an index, put 1 document in it and stopped it. (so that it creates a file structure).
On the new server, in the folder where elastic stores documents, there is a folder with the name of the cluster.
This folder contains the nodes folder, it contains the 0 folder, and in it, respectively, the indices folder, and in this folder there are subfolders by index names. For example if the cluster is called 'SuperCluster' then the standard path would be
'/var/lib/elasticsearch/SuperCluster/nodes/0/indices'
This is where I copied the files from the indices folder from the previous server. Then he launched elastic on a new server, and after a while he picked up all the indexes and began to work with them.

M
MintTea, 2015-01-26
@MintTea

I think you made a mistake somewhere here:


... copied all the files from "/var/lib/elasticsearch/" ... I would not want to do it through import-export to files...

Try to use the standard module for backup/restoring data.
Or this utility , if there is no time to configure the standard functionality. Its documentation is comprehensive, but you can let me know if you have any difficulties.

M
maximus_prime, 2017-11-23
@maximus_prime

explain to me a fool, how to set another index storage folder?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question