lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Matthijs <>
Subject Re: Taking backup of a Lucene index
Date Thu, 06 Jun 2013 07:43:12 GMT
On Thu, Jun 6, 2013 at 7:38 AM, Lance Norskog <> wrote:

> The simple answer (that somehow nobody gave) is that you can make a copy
> of an index directory at any time. Indexes are changed in "generations".
> The segment* files describe the current generation of files. All active
> indexing goes on in new files. In a commit, all new files are flushed to
> disk and then the segment* files change. At any point in this sequence, all
> of the files in the directory form one consistent index.
> This isn't like MySQL or other databases where you have to shut down the
> DB to get a safe copy of the files.

If you just do a naive copy, where it gets a file list first, and then
copies them, segments can be merged during the copy and deleted by lucene
resulting in an incomplete backup, that is why you need the snapshot policy
to keep them around until the copy is completed.

If you have very few updates and don't mind risking a broken index, or just
loop rsync till both sides are equal you don't need anything else indeed

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message