Grafana 7.4 recreates grafana.db everytime EC2 instance is recreated

Hello,

We have an EC2 inside Autoscaling Group (1 instance at a time) with Cloud_init / Cfn_init script to build up.

We mount an ElasticFileSystem where we have data and plugins directories to have persistent volume even if EC2 is recreated.
grafana.ini config file is changed before grafana-server is started during user data script execution.

Since yesterday we were using a 7.1.something version, and everything was working fine, Datasources, Dashboards were still present when recreated or updated.

Yesterday, version 7.4 latest with:

yum install -y grafana

And it seems that now, grafana.db file is recreated and I need to manually recreate Datasources and import Dashboards as json (fortunately we have them stored on a gitlab project).

I would avoid having to use the provisioning if having a persistent volume is sufficient.

Any ideas what could be causing this behaviour ?

Thanks a lot

hello what is an ec2? yes you have to recreeate datasureces unfortunately.

Hello. An EC2 is a VM on AWS cloud.
Elastic Filesystem is a volume (than auto extend upon needs) and can be mounted on one or more EC2s.
Changing data and plugin folder I was able to define once datasources and dashboards (in DB I think) located in this mounted volume.
And then when a new EC2 is created (change of config/crash/scaling) it was able to display the previously configured datasources and dashboards.

Since 7.4 it is not working anymore :frowning:
I did not read anything in the update to 7.4 about this.
I will try to check the release note or change log…

Thanks