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 Ron Mayer <rm...@0ape.com> on 2010/10/28 00:12:17 UTC

If I want to move a core from one physical machine to another....

If I want to move a core from one physical machine to another,
is it as simple as just
   scp -r core5 otherserver:/path/on/other/server/
and then adding
    <core name="core5name" instanceDir="core5" />
on that other server's solr.xml file and restarting the server there?



PS: Should have I been able to figure the answer to that
    out by RTFM somewhere?

Re: If I want to move a core from one physical machine to another....

Posted by Gora Mohanty <go...@mimirtech.com>.
On Thu, Oct 28, 2010 at 3:42 AM, Ron Mayer <rm...@0ape.com> wrote:
> If I want to move a core from one physical machine to another,
> is it as simple as just
>   scp -r core5 otherserver:/path/on/other/server/
> and then adding
>    <core name="core5name" instanceDir="core5" />
> on that other server's solr.xml file and restarting the server there?

If "core5" is the local Solr data directory for that core,
yes that should work. Of course, you will also have to ensure
that the schema, and other configuration details, e.g., in
solrconfig.xml, match.

> PS: Should have I been able to figure the answer to that
>    out by RTFM somewhere?

Maybe not specifically noted, but copying Solr's index by
copying the data directory to a new machine was always
possible, as far as I know.

Regards,
Gora

Re: If I want to move a core from one physical machine to another....

Posted by Ken Stanley <do...@gmail.com>.
On Thu, Oct 28, 2010 at 8:07 AM, Ephraim Ofir <Ep...@icq.com> wrote:

> How is this better than replication?
>
> Ephraim Ofir
>
>
It's not; for our needs here, we have not set up replication through SOLR.
We are working through OOM problems/performance tuning first, then "best
practices" second. I just wanted the OP to know that it can be done, and how
we do it. :)

RE: If I want to move a core from one physical machine to another....

Posted by Ephraim Ofir <Ep...@icq.com>.
How is this better than replication?

Ephraim Ofir


-----Original Message-----
From: Ken Stanley [mailto:dohpaz@gmail.com] 
Sent: Thursday, October 28, 2010 1:59 PM
To: solr-user@lucene.apache.org
Subject: Re: If I want to move a core from one physical machine to another....

On Wed, Oct 27, 2010 at 6:12 PM, Ron Mayer <rm...@0ape.com> wrote:

> If I want to move a core from one physical machine to another,
> is it as simple as just
>   scp -r core5 otherserver:/path/on/other/server/
> and then adding
>    <core name="core5name" instanceDir="core5" />
> on that other server's solr.xml file and restarting the server there?
>
>
>
> PS: Should have I been able to figure the answer to that
>    out by RTFM somewhere?
>

Ron,

In our current environment I index all of our data on one machine, and to
save time with "replication", I use scp to copy the data directory over to
our other servers. On the server that I copy from, I don't turn SOLR off,
but on the servers that I copy to, I shutdown tomcat; remove the data
directory; mv the data directory I scp'd from the source; turn tomcat back
on. I do it this way (especially with mv, versus cp) because it is the
fastest way to get the data on the other servers. And, as Gora pointed out,
you need to make sure that your configuration files match (specifically the
schema.xml) the source.

- Ken

Re: If I want to move a core from one physical machine to another....

Posted by Ken Stanley <do...@gmail.com>.
On Wed, Oct 27, 2010 at 6:12 PM, Ron Mayer <rm...@0ape.com> wrote:

> If I want to move a core from one physical machine to another,
> is it as simple as just
>   scp -r core5 otherserver:/path/on/other/server/
> and then adding
>    <core name="core5name" instanceDir="core5" />
> on that other server's solr.xml file and restarting the server there?
>
>
>
> PS: Should have I been able to figure the answer to that
>    out by RTFM somewhere?
>

Ron,

In our current environment I index all of our data on one machine, and to
save time with "replication", I use scp to copy the data directory over to
our other servers. On the server that I copy from, I don't turn SOLR off,
but on the servers that I copy to, I shutdown tomcat; remove the data
directory; mv the data directory I scp'd from the source; turn tomcat back
on. I do it this way (especially with mv, versus cp) because it is the
fastest way to get the data on the other servers. And, as Gora pointed out,
you need to make sure that your configuration files match (specifically the
schema.xml) the source.

- Ken