lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Upayavira ...@odoko.co.uk>
Subject Re: Pause and resume indexing on SolR 4 for backups
Date Thu, 20 Dec 2012 11:58:44 GMT
I've never used it, but the replication handler has an option:

  http://master_host:port/solr/replication?command=backup 

Which will take you a backup.

Also something to note, if you don't want to use the above, and you are
running on Unix, you can create fast 'hard link' clones of lucene
indexes. Doing:

cp -lr data data.bak

will copy your index instantly. If you can avoid doing this when a
commit is happening, then you'll have a good index copy, that will take
no space on your disk and be made instantly. This is because it just
copies the directory structure, not the files themselves, and given
files in a lucene index never change (they are only ever deleted or
replaced), this works as a good copy technique for backing up.

Upayavira

On Thu, Dec 20, 2012, at 10:34 AM, Markus Jelsma wrote:
> You can use the replication handler to fetch a complete snapshot of the
> index over HTTP.
> http://wiki.apache.org/solr/SolrReplication#HTTP_API
>  
>  
> -----Original message-----
> > From:Andy D'Arcy Jewell <andy.jewell@sysmicro.co.uk>
> > Sent: Thu 20-Dec-2012 11:23
> > To: solr-user@lucene.apache.org
> > Subject: Pause and resume indexing on SolR 4 for backups
> > 
> > Hi all.
> > 
> > Can anyone advise me of a way to pause and resume SolR 4 so I can 
> > perform a backup? I need to be able to revert to a usable (though not 
> > necessarily complete) index after a crash or other "disaster" more 
> > quickly than a re-index operation would yield.
> > 
> > I can't yet afford the "extravagance" of a separate SolR replica just 
> > for backups, and I'm not sure if I'll ever have the luxury. I'm 
> > currently running with just one node, be we are not yet live.
> > 
> > I can think of the following ways to do this, each with various downsides:
> > 
> > 1) Just backup the existing index files whilst indexing continues
> >      + Easy
> >      + Fast
> >      - Incomplete
> >      - Potential for corruption? (e.g. partial files)
> > 
> > 2) Stop/Start Tomcat
> >      + Easy
> >      - Very slow and I/O, CPU intensive
> >      - Client gets errors when trying to connect
> > 
> > 3) Block/unblock SolR port with IpTables
> >      + Fast
> >      - Client gets errors when trying to connect
> >      - Have to wait for existing transactions to complete (not sure how, 
> > maybe watch socket FD's in /proc)
> > 
> > 4) Pause/Restart SolR service
> >      + Fast ? (hopefully)
> >      - Client gets errors when trying to connect
> > 
> > In any event, the web app will have to gracefully handle unavailability 
> > of SolR, probably by displaying a "down for maintenance" message, but 
> > this should preferably be only a very short amount of time.
> > 
> > Can anyone comment on my proposed solutions above, or provide any 
> > additional ones?
> > 
> > Thanks for any input you can provide!
> > 
> > -Andy
> > 
> > -- 
> > Andy D'Arcy Jewell
> > 
> > SysMicro Limited
> > Linux Support
> > E:  andy.jewell@sysmicro.co.uk
> > W:  www.sysmicro.co.uk
> > 
> > 

Mime
View raw message