[Xapian-discuss] backing up a database by locking while backup
program runs
Ronan
ronan-jt00yy at mail.cognotent.com
Thu Dec 13 17:52:44 GMT 2007
Hi.
I want to back up a Xapian database. If I copy the database directory
and its contents using (for instance) rsync, and I know that throughout
the duration of the rsync process another process has had the database
open for writing, but has not actually made any modifications, can I
be sure that, on completion of the rsync process, I have a copy of the
database which is consistent and fully up-to-date?
The document at [1] makes it fairly clear that the answer is "Yes",
but I'm a little doubtful about the status of that document, since there
seem to be no links to it from the Xapian website. (The following Google
query finds nothing: "link:www.xapian.org/docs/admin_notes.html".)
[1] http://www.xapian.org/docs/admin_notes.html
I propose to use a simple PHP script like the following in order to
obtain the write lock:
<?php
$h = new XapianWritableDatabase("/my/Xapian/database", DB_OPEN);
sleep(99999);
Regards,
Ronan.
More information about the Xapian-discuss
mailing list