atom feed34 messages in org.apache.lucene.java-userRe: problem about backup index file
FromSent OnAttachments
Grant IngersollFeb 24, 2010 5:41 am 
Chris LuFeb 24, 2010 9:00 am 
Simon WistowFeb 24, 2010 11:59 am 
Yuval FeinsteinFeb 24, 2010 12:09 pm 
Avi RosenscheinFeb 24, 2010 12:18 pm 
Marcelo OchoaFeb 24, 2010 12:22 pm 
Michael van RooyenFeb 24, 2010 12:24 pm 
Aaron LavFeb 24, 2010 1:20 pm 
Paul LibbrechtFeb 24, 2010 1:21 pm 
Avi RosenscheinFeb 24, 2010 1:38 pm 
GaneshFeb 24, 2010 9:40 pm 
luoc...@sohu.comFeb 25, 2010 12:14 am 
Paul TaylorFeb 25, 2010 12:19 am 
Uwe SchindlerFeb 25, 2010 12:29 am 
Avi RosenscheinFeb 25, 2010 1:44 am 
luocanraoFeb 25, 2010 3:46 am 
Michael McCandlessFeb 25, 2010 7:19 am 
Glen NewtonFeb 25, 2010 9:21 am 
Jason RutherglenFeb 25, 2010 9:51 am 
Grant IngersollFeb 25, 2010 10:00 am 
Grant IngersollFeb 25, 2010 10:01 am 
Grant IngersollFeb 25, 2010 10:02 am 
Mark MillerFeb 25, 2010 10:33 am 
Jason RutherglenFeb 25, 2010 3:18 pm 
N. HiraFeb 25, 2010 3:37 pm 
Mark MillerFeb 25, 2010 4:02 pm 
Thomas GuttesenFeb 25, 2010 4:05 pm 
luoc...@sohu.comFeb 25, 2010 10:47 pm 
Michael McCandlessFeb 26, 2010 12:46 am 
Paul TaylorFeb 26, 2010 1:30 am 
Glen NewtonFeb 27, 2010 7:03 am 
Uwe SchindlerFeb 27, 2010 7:17 am 
Glen NewtonFeb 27, 2010 8:18 am 
GaneshMar 1, 2010 12:56 am 
Subject:Re: problem about backup index file
From:Michael McCandless (luc@mikemccandless.com)
Date:Feb 26, 2010 12:46:06 am
List:org.apache.lucene.java-user

Well, lucene is "write once" and then, eventually, "delete once" ;)

Ie files are eventually deleted (when they are merged away).

So when you do the incremental backup, any file not listed in the current commit can be removed from your backup (assuming you only want to backup the last commit).

Don't delete the files in your last backup... keep the ones that are "in common" with your new backup as you don't need to recopy them (they will not have changed).

Mike

On Fri, Feb 26, 2010 at 1:47 AM, <luoc@sohu.com> wrote:

thanks for your paper,Michael McCandlessI have one quetion about thisFor all
other files, Lucene is "write once."This makes doing incremental backups very easy: Simply compare the file names.Once a file is written, it will never change; therefore, if you've already backed up that file, there's no need to copy it again.this means the number of
files is growing more and more.never getting less.another question:I should
delete the files previous I backup when I backup again. ----- 原文 ----- 发件人:
Michael McCandless 主 题: Re: problem about backup index file时 间: 2010年2月25日
23:19:59This is likely happening because you're attempting to copy a file
thatIndexWriter is currently writing?You shouldn't do that (copy files that are
still being written) --that just wastes bytes (they aren't used by the index),
and causesthis failure on Windows.Instead, you should use SnapshotDeletionPolicy
-- it tells youspecifically which files make up the latest commit point. Those
fileswill not be opened for writing (only for reading, if you have anIndexReader
open on that commit) and they should copy just fine onwindows.The "Hot backups
with Lucene" article (NOTE: I'm the author) inupcoming Lucene in Action 2
revision shows how to do this -- it'savailable for download from
http://manning.com/hatcher3.MikeOn Thu, Feb 25, 2010 at 3:15 AM,
&lt;luoc@sohu.com&gt; wrote:&gt; I want backup my index file,but I get
the follow error.&gt; java.io.IOException:&amp;nbsp;another program lock the
file!&amp;nbsp;at java.io.FileInputStream.readBytes(Native Method)&amp;nbsp;at
java.io.FileInputStream.read(Unknown Source)&amp;nbsp;at
com.common.Utils.copyDirectory(Utils.java:149)&amp;nbsp;at
com.common.Utils.copyDirectory(Utils.java:138)&amp;nbsp;at
com.common.Utils.copyDirectory(Utils.java:138)&amp;nbsp;at
com.index.IndexManager.backDataPolicy(IndexManager.java:398)&amp;nbsp;at
com.index.IndexManager.indexLoop(IndexManager.java:222)&amp;nbsp;at
com.Main$1.run(Main.java:48)&amp;nbsp;at java.lang.Thread.run(Unknown
Source)&gt; &amp;nbsp;&gt; How can I backup lucene file in IR
thread.---------------------------------------------------------------------To
unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.orgFor additional
commands, e-mail: java@lucene.apache.org