Docker grafana 5.4.2 to latest

I read the documentation but i still don t get how to updgrade grafana in a container without loosing data.
i did create a new container with latest version but how updgrade and not create a new container
can i have some help?


If you check the documentation you will find this part :

docker pull grafana/grafana
docker stop my-grafana-container
docker rm my-grafana-container
docker run -d --name=my-grafana-container --restart=always -v /var/lib/grafana:/var/lib/grafana grafana/grafana

What is not mentioned is that the volumes /var… used should be the one from you existing Grafana.

Since this is a major upgrade, it is strongly recommended to do a backup of your DB.

Hope it helps.

Good Luck

Oh i see so because a persitante volume existe, when i will updgrade and associate that volume i will keep my existing dashboard and data source connection ?
i’ll try that thx