Looking to set up Solr replication the old-school way—with style, security, and a splash of manual elbow grease? You've come to the right place. Let's do it properly, like grandpa used to replicate XML configs—by hand. 🧤
To configure secure replication between two OpenSolr indexes, paste the following configurations into your respective solrconfig.xml files for master and slave.
<requestHandler name="/replication" class="solr.ReplicationHandler" > <lst name="master"> <str name="replicateAfter">startup</str> <str name="replicateAfter">commit</str> <!--If configuration files need to be replicated give the names here, separated by comma --> <str name="confFiles">schema.xml,stopwords.txt,elevate.xml</str> <str name="maxNumberOfBackups">0</str> </lst> </requestHandler>
<requestHandler name="/replication" class="solr.ReplicationHandler" > <lst name="slave"> <str name="masterUrl">https://SRV.OPENSOLR.COM/SOLR/YOUR_MASTER_INDEX_NAME</str> <str name="pollInterval">00:00:5</str> <str name="httpBasicAuthUser">a</str> <str name="httpBasicAuthPassword">a</str> </lst> </requestHandler>
Make sure your master and slave indexes can communicate. That means granting access by IP:
/replication access for the slave server's IP.ping SLAVE_SERVER_HOSTNAME to find it.)/replication access for the master server's IP.ping MASTER_SERVER_HOSTNAME.)Let’s say you’re replicating between two indexes:
index.A at fr.opensolr.comindex.A_REPLICA at uk2.opensolr.com✅ Add the above XML snippets to each solrconfig.xml accordingly.
✅ Run ping fr.opensolr.com and ping uk2.opensolr.com to get their IPs.
✅ Grant those IPs access in each other’s firewall or OpenSolr control panel.
✅ Ensure identical schema.xml files on both ends. No cheating.
Reach out to us at OpenSolr Contact Page — we don't bite, and we definitely know replication.
Here’s the quick visual walkthrough for all this, for those who prefer the popcorn 🍿 approach: