... | ... | @@ -67,6 +67,42 @@ Replace `<networkname>` with the name of your docker-network. |
|
|
|
|
|
#### Others
|
|
|
|
|
|
**Elasticsearch** is the search index and does not contain any data that cannot be restored, but performing a full reindex takes several hours (currently 4 for OPL), so you might consider taking backups.
|
|
|
|
|
|
Prepare backup area (only needed the first time):
|
|
|
|
|
|
sudo docker exec elasticsearch curl -XPUT 'localhost:9200/_snapshot/search_backup' -d '
|
|
|
{
|
|
|
"type": "fs",
|
|
|
"settings": {
|
|
|
"location": "/usr/share/elasticsearch/data/backup",
|
|
|
"compress": "true"
|
|
|
}
|
|
|
}'
|
|
|
|
|
|
|
|
|
Take backup using:
|
|
|
|
|
|
sudo docker exec elasticsearch curl -XPUT 'localhost:9200/_snapshot/search_backup/snapshot_1?wait_for_completion=true'
|
|
|
|
|
|
Restore from backup using:
|
|
|
|
|
|
# Import backup to volume
|
|
|
docker run --rm \
|
|
|
-v $(pwd):/from \
|
|
|
-v <dockernetwork>_elasticsearch_data:/to \
|
|
|
alpine ash -c "cd /to/backup ; tar -xf /from/esdata.tar"
|
|
|
# Close index for writes
|
|
|
sudo docker exec elasticsearch curl -XPOST 'localhost:9200/search/_close'
|
|
|
# Restore:
|
|
|
sudo docker exec elasticsearch curl -XPOST 'localhost:9200/_snapshot/search_backup/snapshot_1/_restore'
|
|
|
# Open index for writes again
|
|
|
sudo docker exec elasticsearch curl -XPOST 'localhost:9200/search/_open'
|
|
|
|
|
|
When we are deploying upgrades that requires a full reindex (due to changes in the Elasticsearch document mappings), we perform the indexing on a staging server, and copy the data to our production server using the backup/restore commands displayed above.
|
|
|
|
|
|
* Koha Zebra index
|
|
|
|
|
|
## Customizations
|
|
|
|
|
|
### Internationalization
|
... | ... | |