How to export a cluster index?


(Spico Florin) #1

Hello!
I have a cluster (7 machines) with 7 nodes and 7 shards. I would like to
export the elastic search index in such a way it can be restore it on one
machine. Is there any tool or command that will do that?

I'll look forward for your answers.
Thank you.
Regards,
Florin


(vineeth mohan) #2

Ibeleive gateway is the answer -
http://www.elasticsearch.org/guide/reference/api/admin-indices-gateway-snapshot.html

Thanks
Vineeth

On Fri, Oct 21, 2011 at 7:13 PM, Spico Florin spicoflorin@gmail.com wrote:

Hello!
I have a cluster (7 machines) with 7 nodes and 7 shards. I would like to
export the elastic search index in such a way it can be restore it on one
machine. Is there any tool or command that will do that?

I'll look forward for your answers.
Thank you.
Regards,
Florin


(Shay Banon) #3

There isn't one specific, you can scan search the index and reindex it into
another cluster. Do you want to start the whole 7 node cluster on a single
machine?

On Fri, Oct 21, 2011 at 3:43 PM, Spico Florin spicoflorin@gmail.com wrote:

Hello!
I have a cluster (7 machines) with 7 nodes and 7 shards. I would like to
export the elastic search index in such a way it can be restore it on one
machine. Is there any tool or command that will do that?

I'll look forward for your answers.
Thank you.
Regards,
Florin


(Spico Florin) #4

Hello!
Thanks for your answers. My export should export the index scattered on 7
machines to one machine. Due to the fact that the two clusters are not in
the same network we should export the index in a file and then copy it to
the destination machine. After the copy process, we would like to restore
the index. The snapshot feature can help us?

Regards,
Florin

On Fri, Oct 21, 2011 at 8:22 PM, Shay Banon kimchy@gmail.com wrote:

There isn't one specific, you can scan search the index and reindex it into
another cluster. Do you want to start the whole 7 node cluster on a single
machine?

On Fri, Oct 21, 2011 at 3:43 PM, Spico Florin spicoflorin@gmail.comwrote:

Hello!
I have a cluster (7 machines) with 7 nodes and 7 shards. I would like
to export the elastic search index in such a way it can be restore it on one
machine. Is there any tool or command that will do that?

I'll look forward for your answers.
Thank you.
Regards,
Florin


(Shay Banon) #5

I suggest using the scan API then, no, the snapshot API will not help.

On Sat, Oct 22, 2011 at 6:34 PM, Spico Florin spicoflorin@gmail.com wrote:

Hello!
Thanks for your answers. My export should export the index scattered on 7
machines to one machine. Due to the fact that the two clusters are not in
the same network we should export the index in a file and then copy it to
the destination machine. After the copy process, we would like to restore
the index. The snapshot feature can help us?

Regards,
Florin

On Fri, Oct 21, 2011 at 8:22 PM, Shay Banon kimchy@gmail.com wrote:

There isn't one specific, you can scan search the index and reindex it
into another cluster. Do you want to start the whole 7 node cluster on a
single machine?

On Fri, Oct 21, 2011 at 3:43 PM, Spico Florin spicoflorin@gmail.comwrote:

Hello!
I have a cluster (7 machines) with 7 nodes and 7 shards. I would like
to export the elastic search index in such a way it can be restore it on one
machine. Is there any tool or command that will do that?

I'll look forward for your answers.
Thank you.
Regards,
Florin


(Andrej) #6

Shay, will scan search and reindexing work when I have an index where
I exclude fields from _source? When doing a scan search I can not
retrieve all fields (cause they are just analyzed, not stored), right?
So the new index wouldnt be equal. If so, what would be a good
strategy?

Thanks,
Andrej

On 21 Okt., 19:22, Shay Banon kim...@gmail.com wrote:

There isn't one specific, you can scan search the index and reindex it into
another cluster. Do you want to start the whole 7 node cluster on a single
machine?


(Shay Banon) #7

Right, if you don't store the whole _source, you can't really reindex from
elasticsearch, no black magic there... . You need to have the original
content somewhere to reindex.

On Tue, Nov 29, 2011 at 3:13 PM, Andrej Rosenheinrich <
andrej.rosenheinrich@unister.de> wrote:

Shay, will scan search and reindexing work when I have an index where
I exclude fields from _source? When doing a scan search I can not
retrieve all fields (cause they are just analyzed, not stored), right?
So the new index wouldnt be equal. If so, what would be a good
strategy?

Thanks,
Andrej

On 21 Okt., 19:22, Shay Banon kim...@gmail.com wrote:

There isn't one specific, you can scan search the index and reindex it
into
another cluster. Do you want to start the whole 7 node cluster on a
single
machine?


(Andrej) #8

Considering that most talks about reindexing actually have backups in
mind and that excluding fields from source creates problems here:
would it be an (may be long term) option to include methods for backup
of an index to ES? I'm sure I am not the only user with such an
request ...

On 29 Nov., 16:16, Shay Banon kim...@gmail.com wrote:

Right, if you don't store the whole _source, you can't really reindex from
elasticsearch, no black magic there... . You need to have the original
content somewhere to reindex.

On Tue, Nov 29, 2011 at 3:13 PM, Andrej Rosenheinrich <

andrej.rosenheinr...@unister.de> wrote:

Shay, will scan search and reindexing work when I have an index where
I exclude fields from _source? When doing a scan search I can not
retrieve all fields (cause they are just analyzed, not stored), right?
So the new index wouldnt be equal. If so, what would be a good
strategy?

Thanks,
Andrej

On 21 Okt., 19:22, Shay Banon kim...@gmail.com wrote:

There isn't one specific, you can scan search the index and reindex it
into
another cluster. Do you want to start the whole 7 node cluster on a
single
machine?


(system) #9