What is the proper way on migrating you elastic-stack environment?

Hello,

So I have the Elasticsearch, Kibana, Logstash, Fleet-server, and the Package-registry all running on docker containers. I'm still testing things out, but I wanted to know what the proper way to migrate my docker environment without losing any data from Elasticsearch, any of the custom runtime fields I created, and the custom dashboards?

I tried testing it by running 'docker commit' then 'docker save' to a tar file, but when I tried to stand it back up on another server, it didn't work.

Do I just need to save my config files within my containers then transfer them to the new containers? Not really sure how to go about it and I don't want to be stuck if I ever have to move it for whatever reason.

Just saving the config files probably won't be enough. The dashboards, for example, are stored in an index inside of Elasticsearch, so you'll have to export those saved objects and then import them when a new cluster is stood up. Similar if you're wanting to save data in Elasticsearch indices - that'll have to be snapshot'd out and then restored to the new cluster. Potentially, if there's a way to do it with Docker, you could stop all of your cluster's services (Elasticsearch, Kibana, etc), capture an image of each node, and then restore the image(s) and turn the services back on - but that's not really the official way to move data.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.