Replicate an Opensolr Index

A follower that keeps copying, not a clone

Replicate an index

Replicate makes one of your indexes, the target, follow another one, the source. The target copies the source's documents and keeps copying every change. It is a follower, not an independent clone.

Source index you write here Target index follows the source copies every change every 20 seconds Source index you write here copies every change every 20 seconds Target index follows the source
Write to the source. The target checks for changes every 20 seconds and copies them.

01 · Before you start

  • Both indexes are yours and already exist. Create the target first: Create an index.
  • Both run the same Solr version. The target can be in another region.
  • Whatever the target holds today is replaced by the source.

02 · Steps

  1. Open Solr > Index List and click the Replicate this index icon on the row of the source.
  2. The Replicate index window shows the Master index (the source) and its Solr version.
  3. In Replicate to index, pick the target. The list shows only your indexes with the same Solr version.
  4. Click Replicate. “Replicated” means it is set up; “Replication failed” comes with a link to contact support.

The target receives the documents and most configuration files of the source (schema, synonyms, stopwords and the like; not solrconfig.xml), then follows every change.

Changed the login of the source?

If you change the HTTP Auth username or password of the source, click Replicate again. You do not need a new target.

03 · Watch it, pause it, keep a copy

The Replication status icon in the Index List shows whether an index is a leader or a follower, which indexes pull from it and its last successful and failed copies. Its buttons:

  • Replicate now: copy from the source at once instead of waiting.
  • Disable replication: the target stops following and keeps what it has now. From then on it is an independent copy that you can write to.
  • Enable replication: the target follows again and its content is replaced by the source at the next copy. Anything written to it in between is lost.

04 · What it is good for

  • Moving to another region or another name: replicate into the new index, disable replication, point your site to the new address.
  • A read copy close to other visitors, kept up to date for you.
  • A staging copy of your live data: replicate, then disable replication before you test on it.

For servers that fail over automatically, use a cluster. By API: API: Replicate Solr Index.

Creating Indexes