ipfs-search makes daily elasticsearch snapshots of the indexed data.
As soon as ipfs/go-ipfs#5815 is solved, they will be automatically published on IPFS. Inthe meantime, you may contact the team on IRC/Matrix (#ipfssearch on Freenode or #ipfs-search:chat.weho.st on Matrix) for less recent 'manual' shares of the snaphshot.
To pin the snapshots:
ipfs pin add $hash
To automatically resume the pinning when interrupted you can use the following command:
while [ 1 ]; do ipfs pin add $hash; sleep 60; done
Download the ipfs-search
snapshot with ipfs add pin
then mount it using
FUSE or use ipfs get
\
Add the path of the downloaded snapshot to the configuration file:
- Open
elasticsearch.yml
- Add:
path.repo: ["path/to/snapshot"]
- Run the elasticsearch Now use the following command to register the repository with any name (for example: ipfs_search)
curl -X PUT "localhost:9200/_snapshot/ipfs_search" -H 'Content-Type: application/json' -d'
{
"type": "fs",
"settings": {
"location": "path/to/snapshot",
"compress": true
}
}'
To list all of the available snapshots:searchsearch
curl -X GET "localhost:9200/_snapshot/ipfs_search/_all?pretty"
To show a specific snapshot (for example the snapshot snapshot_181025-0316)
curl -X GET "localhost:9200/_snapshot/ipfs_search/snapshot_181025-0316?pretty"
Restore the specified snapshot with this command
curl -X POST "localhost:9200/_snapshot/elastic_search/snapshot_181025-0316/_restore?wait_for_completion=true"
For further information use elasticsearch snapshots.