0

We are currently working on Sitecore 9.1 project with SOLR 7.2.1. SOLR is currently installed as standalone mode and we are facing difficulties in setting up the DR environment with standalone mode. So we will be planning to move SOLR in to SolrCloud.

Since existing SOLR indexes has filled with data, what would be the best way to migrate the existing indexes into SolrCloud?

2
  • How long will regulating the index collections take ? Of normally have all of index collections already created with scripts like github.com/searchstax/searchstax-sitecore-plugin then just populate the schema and rebuild. Dec 23 '20 at 4:22
  • No, It is created in a conventional way. Usually it takes longer time to index the collection but not more than 8 hours. It has almost 3GB of data. Dec 23 '20 at 4:30
3

From your question what I understand is that you want a kind of blue-green migration of Solr into SolrCloud. I will suggest you, perform a rebuild index so that you will have everything thing new in SolrCloud, and it also ensures that there are no index rebuild errors after migration.

Now how we can perform this with 0 downtimes? We need to switch the Solr from SolrCloud for CM first and perform the index rebuild for master and web databases so that we will have the new indexes in SolrCloud and during the index rebuild your CD servers will use the old Solr server. Once you will make sure everything is working fine and the index rebuild is done successfully you can switch the Solr from SlorCloud one by one for all the CD instances by taking them off from the load balancer(if you are using it).

Another approach you can use by using the latest PROD databases on a lower environment and perform the SolrCloud setup, and index rebuild on that, and then you can use this new SolrCloud for PROD and revert the changes on the lower environment.

1

We recently migrated our existing Solr to Solr cloud on the Prod environments. We followed a similar kind of approach suggested by Mahendra. We first migrated the Solr to Solr Cloud on the CM by making the connection string changes, config changes and did the indexing, while the indexing is performing in the background the CD server still serves the data from old Solr so there won't be downtime while we performing the index. Once the indexing is completed you can switch the CD instances pointing to the new Solr Cloud. This works really well with 0 downtimes on the site.

We also faced some challenges while migrating the XDB data to the Solr cloud. It had 40GB worth of data and it will take a hell lot of time to complete the indexing. Only for the XDB, we found the other way to migrate. For XDB we have backed up our old data using the Solr API query and restored it in the leader Solr node in the Solr cloud. Now the leader will distribute the data to other Solr nodes in the background.

These are the commands we used for backup and restore.

Backup - http://localhost:8983/solr/your-collection-name/replication?command=backup&location=d:\\solr-backup

Restore - http://localhost:8983/solr/your-collection-name/replication?command=restore&location=d:\\solr-backup

Orginal Post

A blog that gives you a better understanding.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.