Hi Yann,
Thank you for your response, you saved me from a *lot* of headache. So the
revised flow:
- Upgrade oldcluster to 1.0.0.
- Implement a logger in the application which dumps all index API calls
into a file.
- Backup my index on oldcluster following these docs:
http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/modules-snapshots.html
- Restore the backed up index on newcluster following the same docs.
- Run the log from after the last _id in the snapshot. Repeat until
they're the same.
- Change the IP to newcluster in the application.
- Repeat step 5 one more time.
- Remove logging, delete logs.
- Shut down oldcluster.
In this case, the switch should not be noticed by anyone and the data
integrity is guaranteed, right?
Cheers,
Attila
On Wed, 19 Feb 2014, Yann Barraud wrote:
Hi,
If I get you well, you'll face an issue. Renaming oldcluster will
make it "forget" previous indexes. (Take a look at data you'll find a
dir named "oldcluster").
The step you're missing is to backup data fro oldcluster
Then shtudown, rename
Then restore...
Or even shutdown and restore on new cluster...
Cheers,
Yann
Le mercredi 19 février 2014 16:01:03 UTC+1, Attila Bukor a écrit :
Hey everybody,
I have a question regarding the migration of the indices to a
new cluster
seamlessly. Let me first describe the situation:
I have a project which uses Elasticsearch since a few weeks
ago. This is our
first Elasticsearch project, and as we are satisfied with it,
we decided to
dedicate a cluster of 3 nodes to run Elasticsearch (lets call it
"newcluster"). It is up and running separately from our old 1-node
Elasticsearch installation ("oldcluster"). We want to migrate
everything to
newcluster, and turn oldcluster off. All 4 servers are running
Ubuntu Server,
Elasticsearch is installed from the official deb package,
oldcluster is
0.90.10 and newcluster 1.0.0.
I came up with the following solution, but I'm not sure it will
work:
- Upgrade oldcluster to 1.0.0 (tested it in dev, should work)
- Backup the index (we have only one index right now) in case
something goes
wrong.
- Change oldcluster's name to newcluster.
- Wait until the nodes synchronize themselves (how can I check
if they're in
sync?)
- Shut down oldcluster.
Thank you very much,
Attila
--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/le2lbk%24v8v%241%40ger.gmane.org.
For more options, visit https://groups.google.com/groups/opt_out.