Dev:IndexDump

Aus YaCyWiki
Wechseln zu: Navigation, Suche

Index Dump

To create a high availability of search peers it is necessary to transport a search index from one 'main' peer to another 'backup' peer which will become the production server for search while the main server undergoes maintenance.

There is an easy way to create index dumps from the web interface:

  • in /IndexControlURLs_p.html: push 'Create Dump', this produces a zip from the index and shows the file path to this dump
  • in /IndexControlURLs_p.html: push 'Restore Dump', this reads a dump.

Both can be done during operation. The storage of new index data is blocked while the index dump or restore funktion is called. The same operation can be done using a shell script within the bin-folder of the YaCy release:

<path-to-yacy>/bin/indexdump.sh

.. creates the solr dump and prints out the file path to the dump.

<path-to-yacy>/bin/indexrestore.sh <dumpfile>

.. reads in the dump

Therefore it is very easy to transport the search index from one peer (1) to another peer (2) with one single command line:

<path-to-yacy2>/bin/indexrestore.sh `<path-to-yacy1>/bin/indexdump.sh`

Both peers must be on the same machine within the same file system.