I have created rancher server with this command below:
sudo docker run -d --restart=unless-stopped -p 8080:8080 rancher/server
I have worked on the rancher server for some time. Now I want to backup this rancher container and deploy into new rancher container with the same data (Environment, Stacks, Containers … etc) that I have worked earlier in the old rancher server.
I stopped the current running container and I have committed that container into new image. I have created a container from that image. But in that newly created rancher server was empty. The environments, containers, stacks… etc all the configurations are gone.
This the command I have created the rancher server container from that newly created rancher server image:
sudo docker run -d --restart=unless-stopped -e CATTLE_PROMETHEUS_EXPORTER=true -p 8080:8080 -p 9108:9108 ranjith/mainrancher
How to backup and restore container with same data? How to restart the same container with different configurations?