how to backup lucene index file

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

how to backup lucene index file

鞠朕
Hi,    I am using Lucene to build a Full Text search system, I put the index file in some Directory in my server, Considering robust, I think i shouldbackup the index file in somewhere else. If the index file is broken, i can switch to the backup one.    Can you tell me how to do this, use what API, can you give me a simple demo.    Thanks,From juzhen
Reply | Threaded
Open this post in threaded view
|

Re: how to backup lucene index file

Erick Erickson
Just copy the index directory, it's self contained. I'd
make sure I wasn't actively indexing to it and
I'd committed all my indexing first, but that's all.

On Wed, Jan 13, 2016 at 8:33 AM, 鞠朕 <[hidden email]> wrote:
> Hi,    I am using Lucene to build a Full Text search system, I put the index file in some Directory in my server, Considering robust, I think i shouldbackup the index file in somewhere else. If the index file is broken, i can switch to the backup one.    Can you tell me how to do this, use what API, can you give me a simple demo.    Thanks,From juzhen

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: how to backup lucene index file

Shai Erera
You should use Lucene's replicator module, which helps you take backups
from live snapshots of your index, even while indexing happens. You can
read about how to use it here:
http://shaierera.blogspot.co.il/2013/05/the-replicator.html

Shai

On Wed, Jan 13, 2016, 19:14 Erick Erickson <[hidden email]> wrote:

> Just copy the index directory, it's self contained. I'd
> make sure I wasn't actively indexing to it and
> I'd committed all my indexing first, but that's all.
>
> On Wed, Jan 13, 2016 at 8:33 AM, 鞠朕 <[hidden email]> wrote:
> > Hi,    I am using Lucene to build a Full Text search system, I put the
> index file in some Directory in my server, Considering robust, I think i
> shouldbackup the index file in somewhere else. If the index file is broken,
> i can switch to the backup one.    Can you tell me how to do this, use what
> API, can you give me a simple demo.    Thanks,From juzhen
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>