Graylog2/documentation

first sample docker-compose.yml should persist data

Closed this issue · 4 comments

Context

I set up Graylog in Docker using the first sample docker-compose.yml in the documentation (https://docs.graylog.org/en/3.3/pages/installation/docker.html). It was only later I read the "Persisting data" section, and lost all my Elasticsearch data.

The Graylog and Mongo docker images use volumes, so docker-compose created unnamed volumes and no data is lost if you recreate the container. However the elasticsearch-oss image does not use any volumes, so recreating the volume destroys all your data.

The slightest tweak to the settings for it in docker-compose causes it to be recreated, so even adding the named volume later causes your data to be deleted!

Expected Content

Data should not be lost so easily. I suggest just including the named volumes in the first sample docker-compose.yml presented in the documentation. Is there any reason not to?

Your Environment

  • Graylog Version: 3.3
  • Operating System: Linux

Further to the above, is there any need to persiste the graylog_data volume? The backup instructions (https://docs.graylog.org/en/3.3/pages/configuration/backup.html) don't mention any need to back it up, so does it need to be persisted?

@jalogisch would it not make sense to edit the Docker instructions to use a local volume from the start?

I think we should not, because the images that need that are not under our control.
So if elastic is changing the images or mongo we are suddenly wrong in the docs.

Having the basic functionality and the persistence split will not let the docs to be wrong.

Plus you have multiple ways of archiving persistence and we can't know what the desired way in the users environment is.

But that is only my 2 cent here. Maybe I did not see something.

Given that a specific version of the elasticsearch-oss image is specified in the example it seems unlikely the behaviour would change. Anyway the new warning is an improvement anyway, thanks.