2

I have a test environment which is created every morning and then destroyed every night. Part of the environment is a SolrCloud (version 4.7) instance connected to a remote Zookeeper cluster.

The Solr instance has one shard and around 8 cores. Some of the core indexes are reasonably large in size (~1.2GB) so it takes a while to build the index from scratch each morning.

To avoid the delay, I am trying to backup the index each day and then restore it in a brand new Solr instance the following day.

To backup I am just calling curl localhost/solr/mycore/replication?command=backup&location=/tmp/backup

I then move the backup files to some permanent storage.

This works fine.

In the morning, a new Solr instance starts up with nothing in its index. I then copy the index backup files to this new instance in to the correct location and restart Solr.

However, after the restart, Solr does not show that the num of docs in the index has increased. If i look at the replication statistics in the web console of solr i can see the following for my mainindex version = 0, gen = 1 and size = 1.2GB. This size attribute seems to indicate its 'seeing' the files i've restored but not counting them as part of the index.

Zookeeper is permanently up so if i look at my solr cloud graph i can see the solr instance that was destroyed the previous day as 'Gone'. I don't know if this is relevant.

I would like to know how I can get Solr to recognize by restored backup files.

wimnat
  • 299
  • 2
  • 10

0 Answers0