Hi,
I have Elasticsearch 7.11.1 and Kibana 7.11.1 installed using docker with volume bindings below.
elastic7111:
image: docker.elastic.co/elasticsearch/elasticsearch:7.11.1
container_name: elastic7111
restart: unless-stopped
ports:
- 9200:9200
hostname: elastic7111
user: elasticsearch
volumes:
- "./elastic-config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:ro"
- "./elastic-config/jvm.options:/usr/share/elasticsearch/config/jvm.options:ro"
- "./elastic-config:/usr/share/elasticsearch/config:rw"
- "./elastic-data:/usr/share/elasticsearch/data:rw"
- "./elastic-logs:/usr/share/elasticsearch/logs:rw"
- "./elastic-backup:/usr/share/elasticsearch/backup:rw"
kibana7111:
image: "docker.elastic.co/kibana/kibana:7.11.1"
container_name: kibana7111
restart: unless-stopped
ports:
- "5601:5601"
mem_limit: 2g
environment:
- "LS_JAVA_OPTS=-Xmx2g -Xms1g"
volumes:
- "./kibana.yml:/usr/share/kibana/config/kibana.yml:ro"
depends_on:
- elastic7111
Here is the elasticsearch.yaml:
cluster.name: BJBMWDEVQA-CLUSTER
node.name: elastic01
path.data: /usr/share/elasticsearch/data
path.logs: /usr/share/elasticsearch/logs
path.repo: /usr/share/elasticsearch/backup
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
bootstrap.memory_lock: true
# ---------------------------------- Network -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):
network.host: 0.0.0.0
http.port: 9200
transport.host: localhost
Note that the path.data, path.log, and path.repo all pointing the a location inside the docker container, which then binded in docker-compose volume.
And then I create a repository in Kibana using the Shared File System pointing to that path.repo location.
And then I create a "<daily-{now/d}>" policy, and manually run the policy.
I believe the task executed successfully, because I can see the files in both "elastic-backup" (host) and "/usr/share/elasticsearch/backup" (docker) directory.
[root@bjbmwelkdev elastic-backup]# ls -l
total 276
-rw-rw-r-- 1 1000 1000 83 Mar 1 20:01 index-21
-rw-rw-r-- 1 1000 1000 8 Mar 1 20:01 index.latest
drwxr-xr-x 22 elasticsearch elasticsearch 4096 Mar 1 01:43 indices
-rw-rw-r-- 1 1000 1000 95711 Mar 1 20:01 meta-QfXYX5OSTMK3TblwbZt3UQ.dat
-rw-rw-r-- 1 1000 1000 145534 Mar 1 20:40 meta-r6i_Mt6WRuywrZEcccRc-Q.dat
-rw-rw-r-- 1 1000 1000 9081 Mar 1 20:01 snap-QfXYX5OSTMK3TblwbZt3UQ.dat
-rw-rw-r-- 1 1000 1000 9081 Mar 1 20:40 snap-r6i_Mt6WRuywrZEcccRc-Q.dat
[root@bjbmwelkdev elastic-backup]#
[root@bjbmwelkdev elastic-backup]# docker exec -ti elastic7111 sh
sh-4.4$ pwd
/usr/share/elasticsearch
sh-4.4$ cd backup/
sh-4.4$ ls -l
total 276
-rw-rw-r-- 1 elasticsearch elasticsearch 83 Mar 1 13:01 index-21
-rw-rw-r-- 1 elasticsearch elasticsearch 8 Mar 1 13:01 index.latest
drwxr-xr-x 22 998 994 4096 Feb 28 18:43 indices
-rw-rw-r-- 1 elasticsearch elasticsearch 95711 Mar 1 13:01 meta-QfXYX5OSTMK3TblwbZt3UQ.dat
-rw-rw-r-- 1 elasticsearch elasticsearch 145534 Mar 1 13:40 meta-r6i_Mt6WRuywrZEcccRc-Q.dat
-rw-rw-r-- 1 elasticsearch elasticsearch 9081 Mar 1 13:01 snap-QfXYX5OSTMK3TblwbZt3UQ.dat
-rw-rw-r-- 1 elasticsearch elasticsearch 9081 Mar 1 13:40 snap-r6i_Mt6WRuywrZEcccRc-Q.dat
sh-4.4$
But the resulting snapshot is not available in Kibana Snapshot page.
Questions:
- Have I configured the docker-compose correctly?
- Why Kibana shows " You don't have any snapshots yet" in the Snapshot page. It seems like Kibana cannot read the repository location.
Please enlighten me.
Thank you.