Copying the index from one solr instance to another

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Copying the index from one solr instance to another

Robert Gründler
Hi again,

let's say you have 2 solr Instances, which have both exactly the same configuration (schema, solrconfig, etc).

Could it cause any troubles if we import an index from a SQL database on solr instance A, and copy the whole
index to the datadir of solr instance B (both solr instances run on different servers) ?.

As far as i can tell, this should work and solr instance B should have the exact same index as solr instance A after the copy-process.

Do we miss something, or is this workflow safe to go with?

-robert
Reply | Threaded
Open this post in threaded view
|

Re: Copying the index from one solr instance to another

Shawn Heisey-4
On 12/15/2010 10:05 AM, Robert Gründler wrote:
> Hi again,
>
> let's say you have 2 solr Instances, which have both exactly the same configuration (schema, solrconfig, etc).
>
> Could it cause any troubles if we import an index from a SQL database on solr instance A, and copy the whole
> index to the datadir of solr instance B (both solr instances run on different servers) ?.
>
> As far as i can tell, this should work and solr instance B should have the exact same index as solr instance A after the copy-process.

I believe this should work, but I would take a couple of precautions.  
I'd stop Solr before putting the new index into place.  If you can't
have it down for the entirety of the copy process, then copy it into an
adjacent directory, shut down solr, rename the directories, and restart
Solr.

If the Solr that built the index (specifically, the Lucene that comes
with it) is newer than the one that you are copying to, it won't work.

If you've checked all that and if you're still having trouble, let us know.

Shawn

Reply | Threaded
Open this post in threaded view
|

Re: Copying the index from one solr instance to another

Robert Gründler
thanks for your feedback. we can shutdown both solr servers for the time of the copy-process, and both
solr instances run the same version, so we should be ok.

i'll let you know if we encounter any troubles.


-robert



On Dec 15, 2010, at 18:11 , Shawn Heisey wrote:

> On 12/15/2010 10:05 AM, Robert Gründler wrote:
>> Hi again,
>>
>> let's say you have 2 solr Instances, which have both exactly the same configuration (schema, solrconfig, etc).
>>
>> Could it cause any troubles if we import an index from a SQL database on solr instance A, and copy the whole
>> index to the datadir of solr instance B (both solr instances run on different servers) ?.
>>
>> As far as i can tell, this should work and solr instance B should have the exact same index as solr instance A after the copy-process.
>
> I believe this should work, but I would take a couple of precautions.  I'd stop Solr before putting the new index into place.  If you can't have it down for the entirety of the copy process, then copy it into an adjacent directory, shut down solr, rename the directories, and restart Solr.
>
> If the Solr that built the index (specifically, the Lucene that comes with it) is newer than the one that you are copying to, it won't work.
>
> If you've checked all that and if you're still having trouble, let us know.
>
> Shawn
>

Reply | Threaded
Open this post in threaded view
|

Re: Copying the index from one solr instance to another

Rob Casson
In reply to this post by Robert Gründler
just making sure that you're aware of the built-in replication:

     http://wiki.apache.org/solr/SolrReplication

can pull the indexes, along with config files.

cheers,
rob

2010/12/15 Robert Gründler <[hidden email]>:

> Hi again,
>
> let's say you have 2 solr Instances, which have both exactly the same configuration (schema, solrconfig, etc).
>
> Could it cause any troubles if we import an index from a SQL database on solr instance A, and copy the whole
> index to the datadir of solr instance B (both solr instances run on different servers) ?.
>
> As far as i can tell, this should work and solr instance B should have the exact same index as solr instance A after the copy-process.
>
> Do we miss something, or is this workflow safe to go with?
>
> -robert