Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to read a consistent version of sphinx files when reindex is running
    text
    copied!<p>I am having intermittent problems with a backup script when trying to back up sphinx index files. The backup command is more or less just a <code>tar</code> command on all files in <code>/var/lib/sphinxsearch/data</code> with a few exclusion patterns (<code>spl</code>, <code>tmp</code>, etc...)</p> <p>But the issue I'm running into is that we run almost continuous reindexes, which means the files that tar is operator on are constantly being rotated out with new versions. I have a plan to deal with this, which is to use the sphinx lockfile:</p> <ul> <li>For every index: <ul> <li>Acquire a lock on the <code>.spl</code> file (hopefully preventing the reindex from running concurrently)</li> <li>Add related files (<code>.spa</code>, <code>.spd</code>, <code>.sph</code>, <code>.spi</code>, <code>.spk</code>, <code>.spm</code>, <code>.spp</code>, <code>.sps</code>)</li> <li>Release lock on the <code>.spl</code> file</li> </ul></li> </ul> <hr> <p>My concern is that I can't seem to find any detailed documentation on <em>exactly</em> how the lockfiles are supposed to behave in sphinx. This would be a tool that interacts with the concurrency of sphinx at a low level, and I see a lot of potential pitfalls (concurrency scares me). I'm wondering if:</p> <ol> <li>Is there somewhere I can get a comprehensive description of how lockfiles work in sphinx?</li> <li>Is my plan for backing up sphinx even the right plan? I looked around google and could find nothing better, but somebody knows a better way.</li> </ol>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload