Elasticsearch
Learn how to use Elasticsearch with Filebase.
Last updated
Was this helpful?
Learn how to use Elasticsearch with Filebase.
Last updated
Was this helpful?
Elasticsearch is a search engine that provides a distributed full-text search engine using an HTTP web interface and JSON documents.
Elasticsearch has been certified for use with Filebase. Read below to learn how to configure Elasticsearch for use with Filebase.
This guide was tested and written using Ubuntu 20.04 in single-node mode. The Elasticsearch configuration should be tailored to your environment and adjusted to fit your operating system.
sudo snap install http
/PATH
in this guide refers to the path that Elasticsearch has been installed to. For example, the path for this configuration was: /home/filebase/elasticsearch-7.6.1/
sudo $PATH/bin/elasticsearch-plugin install -b repository-s3
$PATH/bin/elasticsearch
sudo $PATH/bin/elasticsearch-plugin list
sudo $PATH/bin/elasticsearch-keystore add s3.client.default.access_key
When prompted to create a new keystore, select Y.
When prompted for the Access Key, provide your Filebase Access Key.
sudo $PATH/bin/elasticsearch-keystore add s3.client.default.secret_key
When prompted to create a new keystore, select Y.
When prompted for the Secret Key, provide your Filebase Secret Key.
http POST 127.0.0.1:9200/_nodes/reload_secure_settings
The following is an example JSON request. You need to update the bucket name to reflect your Filebase bucket name.
You must specify the region, otherwise you will receive an access denied error.
echo '{ "type":"s3","settings":{"bucket":"filebase-sample-bucket","endpoint":"https://s3.filebase.com",”region”:”us-east-1”}}' | http PUT 127.0.0.1:9200/_snapshot/my_filebase_repository
You need to update the bucket name to reflect your Filebase bucket name.
http 127.0.0.1:9200/_cat/indices?v=true
http PUT 127.0.0.1:9200/_snapshot/my_filebase_repository/full_snapshot_021021?wait_for_completion=true
This command will take a snapshot of all of your indices, listed with the previous command, and push them to my_filebase_repository
. This will upload them to the Filebase bucket you specified in your JSON request configured above.
echo '{"indices":".geoip*"}' | http PUT 127.0.0.1:9200/_snapshot/my_filebase_repository/geoip-021021?wait_for_completion=true
http 127.0.0.1:9200/_snapshot/my_filebase_repository/full_snapshot_021021