On 4/8/2019 8:59 AM, kevinc wrote:
I have reindexed to a single Solr 6.6.0 index and spun up a new 3 node Solr
cluster with 1 shard and replication factor of 3.

I want to copy over the index and have it replicate to the rest of the
cluster. I have taken a copy of the data directory from the reprocessed core
and copied it into the leader's data directory. This shows up correctly as
having a 51GB index and the documents are searchable.

I have tried the following curl commands to kick off replication:

curl http://localhost:8983/solr/solrCollection1/update -H "Content-Type:
text/xml" --data-binary @test.xml
curl
http://localhost:8983/solr/solrCollection1/update?stream.body=%3Ccommit/%3E

I think the following is probably what you're going to want to do in order to transplant an existing index into a new cloud:

* Make sure you have a copy of the source index directory.
* Do not copy the tlog directory from the source.
* Create the collection in the target cloud.
* Shut down the target cloud completely.
* Delete all the index directories in the cloud.
* Copy the source index directory to one of the cloud nodes.
* Start that cloud node up.  Make sure it is all working.
* Start up the other nodes.

Once the other nodes are started, they will automatically notice that they don't have an index directory and will copy the index from the leader.

These instructions assume a single shard in both the source and the target. If you are changing the number of shards, it will be a lot easier to simply reindex into the new cloud.

Erick's message indicates another way you could go ... create the new index with a single replica, get that working, and then use ADDREPLICA (part of the Collections API) to add more replicas.

Thanks,
Shawn

Reply via email to