lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ashish Sarna" <ashish.sa...@thepsi.com>
Subject RE: Taking backup of a Lucene index
Date Wed, 17 Apr 2013 11:32:56 GMT
Thanks for your replies. 

However, in my scenario, an external backup utility would be used to take
backup of the Lucene index. I just need to ensure that index do not get
changed when a search is performed over it or due to internal Lucene
housekeeping/optimization/merge activities.

Ashish

 
-----Original Message-----
From: Michael McCandless [mailto:lucene@mikemccandless.com] 
Sent: Wednesday, April 17, 2013 4:55 PM
To: java-user@lucene.apache.org
Subject: Re: Taking backup of a Lucene index

On Wed, Apr 17, 2013 at 7:02 AM, Thomas Matthijs <lists@selckin.be> wrote:
> On Wed, Apr 17, 2013 at 12:57 PM, Ashish Sarna
<ashish.sarna@thepsi.com>wrote:
>
>> I want to take back-up of a Lucene index. I need to ensure that index
files
>> would not change when I take their backup.
>>
>
>
>>
>> I am concerned about the housekeeping/merge/optimization activities which
>> Lucene performs internally. I am not sure when/how these activities are
>> performed by Lucene and how we can prevent them.
>>
>>
>
> Use a
>
http://lucene.apache.org/core/4_2_1/core/org/apache/lucene/index/SnapshotDel
etionPolicy.html
> Take a snapshot, backup/copy all the files in the commit, relase the
> snapshot

That's right!

Because Lucen is "write-once" (each file is opened, written, and never
changed, and no file is over-written), the SnapshotDeletionPolicy
let's you take a hot (live) point-in-time backup even while
IndexWriter continues making changes to the index.

As long as you hold that snapshot, all files it references will not be
deleted, just be sure to release it once you're done backing up.

Mike McCandless

http://blog.mikemccandless.com

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message