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 vicky desai <vi...@germinait.com> on 2013/03/14 08:20:24 UTC

Solr Replication

Hi,

I am using solr 4 setup. For the backup purpose once in a day I start one
additional tomcat server with cores having empty data folders and which acts
as a slave server. However it does not replicate data from the master unless
there is a commit on the master. Is there a possibility to pull data from
master core without firing a commit operation on that core 



--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-Replication-tp4047266.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr Replication

Posted by Erick Erickson <er...@gmail.com>.
Why do you think that during a backup any write activity would corrupt your
backup? Solr "backs up" live indexes all the time, that's what's happening,
in effect, when you replicate from a master to a slave. There's no
requirement that the master stop indexing. The replication "backup" command
Ahmet told you about is using the same mechanism.

Solr/Lucene index segments are write-once. backup/replication essentially
copies closed segments around which, since they aren't changing, aren't
affected by other indexing activity.

So the process is this:

1> a backup/replication starts. At this point, a list is made of all the
currently-closed segments and these segments will NOT be deleted until the
backup/replication is complete.
2> all the segments in <1> are copied. This is a complete snapshot of your
index.
3> after all the segments are copied, they are released and may then be
deleted in the normal merge process.

Of course another way to do backups would be set up a machine that just
does a replication (think of it as a "special slave") periodically. Another
would be to have the master keep backups automatically, seesee:
http://wiki.apache.org/solr/SolrReplication,  and look for numberOfBackups.

Best
Erick


On Fri, Mar 15, 2013 at 1:03 AM, vicky desai <vi...@germinait.com>wrote:

> Hi,
>
> I have a multi core setup and there is continuous updation going on in each
> core. Hence I dont prefer a bckup as it would either cause a downtime or if
> during a backup there is a write activity my backup will be corrupted. Can
> you please suggest if there is a cleaner way to handle this
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Solr-Replication-tp4047266p4047591.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: Solr Replication

Posted by vicky desai <vi...@germinait.com>.
Hi,

I have a multi core setup and there is continuous updation going on in each
core. Hence I dont prefer a bckup as it would either cause a downtime or if
during a backup there is a write activity my backup will be corrupted. Can
you please suggest if there is a cleaner way to handle this



--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-Replication-tp4047266p4047591.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr Replication

Posted by Ahmet Arslan <io...@yahoo.com>.
Hi Vicky,

May be   <str name="replicateAfter">startup</str> ?

For backups http://master_host:port/solr/replication?command=backup would be more suitable.

or <str name="backupAfter">startup</str>


--- On Thu, 3/14/13, vicky desai <vi...@germinait.com> wrote:

> From: vicky desai <vi...@germinait.com>
> Subject: Solr Replication
> To: solr-user@lucene.apache.org
> Date: Thursday, March 14, 2013, 9:20 AM
> Hi,
> 
> I am using solr 4 setup. For the backup purpose once in a
> day I start one
> additional tomcat server with cores having empty data
> folders and which acts
> as a slave server. However it does not replicate data from
> the master unless
> there is a commit on the master. Is there a possibility to
> pull data from
> master core without firing a commit operation on that core 
> 
> 
> 
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Solr-Replication-tp4047266.html
> Sent from the Solr - User mailing list archive at
> Nabble.com.
>