... | ... | @@ -71,7 +71,7 @@ Replace `<networkname>` with the name of your docker-network. |
|
|
|
|
|
Prepare backup area (only needed the first time):
|
|
|
|
|
|
sudo docker exec elasticsearch curl -XPUT 'localhost:9200/_snapshot/search_backup' -d '
|
|
|
docker exec elasticsearch curl -XPUT 'localhost:9200/_snapshot/search_backup' -d '
|
|
|
{
|
|
|
"type": "fs",
|
|
|
"settings": {
|
... | ... | @@ -83,9 +83,9 @@ Prepare backup area (only needed the first time): |
|
|
|
|
|
Take snapshot:
|
|
|
|
|
|
sudo docker exec elasticsearch curl -XPUT 'localhost:9200/_snapshot/search_backup/snapshot_1?wait_for_completion=true'
|
|
|
docker exec elasticsearch curl -XPUT 'localhost:9200/_snapshot/search_backup/snapshot_1?wait_for_completion=true'
|
|
|
|
|
|
Import snapshot into to volume (if snappshot is from a different server)
|
|
|
Import snapshot into to volume (if snapshot is from a different server)
|
|
|
|
|
|
docker run --rm \
|
|
|
-v $(pwd):/from \
|
... | ... | @@ -94,19 +94,19 @@ Import snapshot into to volume (if snappshot is from a different server) |
|
|
|
|
|
Close index for writes
|
|
|
|
|
|
sudo docker exec elasticsearch curl -XPOST 'localhost:9200/search/_close'
|
|
|
docker exec elasticsearch curl -XPOST 'localhost:9200/search/_close'
|
|
|
|
|
|
Restore
|
|
|
|
|
|
sudo docker exec elasticsearch curl -XPOST 'localhost:9200/_snapshot/search_backup/snapshot_1/_restore'
|
|
|
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'
|
|
|
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
|
|
|
**Koha Zebra index** TODO
|
|
|
|
|
|
## Customizations
|
|
|
|
... | ... | |