What Grafana version and what operating system are you using?
Grafana version: 10.1
OS : Ubuntu (grafana in docker)
What are you trying to achieve?
Saving the datasource settings in the UI without overwriting the settings from the provisioning file when restarting Grafana
How are you trying to achieve it?
In the provisioning folder, I added a yaml file with the settings of the datasources (with the ability to edit in the UI). In the UI, I made changes to the datasource and saved it, then restarted the Grafana docker container
What happened?
All the changes made through the UI are gone. That is, the settings from yaml from provisioning were applied again. Changing the configuration version does not help, I tried to reduce and increase the version
What did you expect to happen?
When using the datasource settings from provisioning, changes in the UI were saved.
Can you copy/paste the configuration(s) that you are having problems with?
Here is my sample settings file for provisioning
Then, create a new directory where your docker-compose file is. The name of the new directory must match the name of the directory in the docker-compose file.
mkdir ./grafana-db
Change file ownership, so the docker container can read the contents of the folder as well as write to it
I have volume configured for Grafana in docker. The problem is not that the database is being deleted, but that data from the provisioning datasource file is being overwritten in it, and I can’t influence it in any way