You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Jay Mandal <Ja...@AnjuSoftware.com> on 2020/12/04 20:07:51 UTC

Migrate Legacy Solr Cores to SolrCloud

Hello All,
Please can some one from the Solr Lucene Community Provide me the Steps on how to migrate an existing Solr legacy Core, data and conf(manage schema,solrconfig.xml files to SolrCloud configuration with collections and shards and where to copy the existing files to reuse the data in the solr knowledgebase.
Thanks,
Jayanta.

Regards,

Jayanta Mandal
4500 S Lakeshore Dr #620, Tempe, AZ 85282
+1.602-900-1791 ext. 10134|Direct: +1.718-316-0384
www.anjusoftware.com<http://www.anjusoftware.com>





Confidentiality Notice
====================
This email message, including any attachments, is for the sole use of the intended recipient and may contain confidential and privileged information. Any unauthorized view, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. Anju Software, Inc. 4500 S. Lakeshore Drive, Suite 620, Tempe, AZ USA 85282.

Re: Migrate Legacy Solr Cores to SolrCloud

Posted by Erick Erickson <er...@gmail.com>.
First thing I’d do is run one of the examples to insure you have Zookeeper set up etc. You can create a collection that uses the default configset.

Once that’s done, start with ‘SOLR_HOME/solr/bin/solr zk upconfig’. There’s extensive help if you just type “bin/solr zk -help”. You give it the path to an existing config directory and a name for the configset in Zookeeper.

Once that’s done, you can create the collection, the admin UI drop-down will allow you to choose the configset. Now you have a collection.

To put data in that collection, it would be best to index the data again. If you can’t do that, you MUST have created the collection with exactly one shard, replicationFactor=1 (leader-only). Shut down Solr and copy your core’s data directory (the parent of the index directory) to “the right place”. You’ll overwrite an existing data directory with a name like collection1_shard1_replica_n1/data. Do _not_ copy the entire core directory up, _just_ recursively copy the “data” dir.

Now power Solr back up and you should be good. You can use the collections API ADDREPLICA command to build out your collection for HA/DR.

NOTE: if by “existing” you mean an index created with Solr X-2 (i.e. Solr 6 or earlier and assuming you’re migrating to Solr 8) this will not work and you’ll have to re-index your data. This is not particular to SolrCloud, Lucene will refuse to open the index if it was created with any version of Solr earlier than the immediately prior major Solr release, i.e. if the index was _created_ with Solr 7, you can do the above if you’re moving to Solr 8. If you’re migrating to Solr 7, then if the old index was created with Solr 6 you’ll be ok….

Best,
Erick

> On Dec 4, 2020, at 3:07 PM, Jay Mandal <Ja...@AnjuSoftware.com> wrote:
> 
> Hello All,
> Please can some one from the Solr Lucene Community Provide me the Steps on how to migrate an existing Solr legacy Core, data and conf(manage schema,solrconfig.xml files to SolrCloud configuration with collections and shards and where to copy the existing files to reuse the data in the solr knowledgebase.
> Thanks,
> Jayanta.
> 
> Regards,
> 
> Jayanta Mandal
> 4500 S Lakeshore Dr #620, Tempe, AZ 85282
> +1.602-900-1791 ext. 10134|Direct: +1.718-316-0384
> www.anjusoftware.com<http://www.anjusoftware.com>
> 
> 
> 
> 
> 
> Confidentiality Notice
> ====================
> This email message, including any attachments, is for the sole use of the intended recipient and may contain confidential and privileged information. Any unauthorized view, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. Anju Software, Inc. 4500 S. Lakeshore Drive, Suite 620, Tempe, AZ USA 85282.