You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Robert Gründler <ro...@dubture.com> on 2010/12/15 18:05:32 UTC

Copying the index from one solr instance to another

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

Re: Copying the index from one solr instance to another

Posted by Robert Gründler <ro...@dubture.com>.
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
> 


Re: Copying the index from one solr instance to another

Posted by Shawn Heisey <so...@elyograg.org>.
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


Re: Copying the index from one solr instance to another

Posted by Rob Casson <ro...@gmail.com>.
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 <ro...@dubture.com>:
> 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