Duplicate/copy index

Hi,

I have a use case where I'd like to duplicate an index and then modify the
duplicate in order to preserve the original in case we need to rollback.
The workflow would be:

  1. Index A exists with alias pointing at it
  2. Index B created by duplicating index A
  3. Index B updated with new and changed records
  4. Alias changed to point at Index B
  5. If issue with index B is discovered, repoint alias back to index A

Does anyone have any ideas on a good way to do this?

Regards,

mj.

--
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Sounds good,
you can either use your primary data source to reindex (if you have any
database for instance), or elasticsearch directly. In that case you would
use the SCAN search type
(Elasticsearch Platform — Find real-time answers at scale | Elastic)
to fetch the previously indexed documents in an optimized way. I wouldn't
do the copy then update, but I would just index the updated copy straight
away, as the update would in fact be a reindex and that means that you
would end up reindexing all your documents twice.

Using aliases is definitely the way to go here.

Good luck!

Cheers
Luca

On Tuesday, October 1, 2013 7:23:14 PM UTC+2, mj wrote:

Hi,

I have a use case where I'd like to duplicate an index and then modify the
duplicate in order to preserve the original in case we need to rollback.
The workflow would be:

  1. Index A exists with alias pointing at it
  2. Index B created by duplicating index A
  3. Index B updated with new and changed records
  4. Alias changed to point at Index B
  5. If issue with index B is discovered, repoint alias back to index A

Does anyone have any ideas on a good way to do this?

Regards,

mj.

--
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.