# Grafana 7.4 recreates grafana.db everytime EC2 instance is recreated

**URL:** <https://community.grafana.com/t/grafana-7-4-recreates-grafana-db-everytime-ec2-instance-is-recreated/42742>\
**Category:** Installation\
**Created:** [February 6, 2021, 9:20am UTC](https://community.grafana.com/t/grafana-7-4-recreates-grafana-db-everytime-ec2-instance-is-recreated/42742 "2021-02-06T09:20:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vrevol](https://avatars.discourse-cdn.com/v4/letter/v/3d9bf3/32.png) [@vrevol](https://community.grafana.com/u/vrevol)\
**Post date:** [February 6, 2021, 9:20am UTC](https://community.grafana.com/t/grafana-7-4-recreates-grafana-db-everytime-ec2-instance-is-recreated/42742/1 "2021-02-06T09:20:08Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![melrose](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/melrose/32/14147_2.png) [@melrose](https://community.grafana.com/u/melrose)\
**Post date:** [February 6, 2021, 4:34pm UTC](https://community.grafana.com/t/grafana-7-4-recreates-grafana-db-everytime-ec2-instance-is-recreated/42742/2 "2021-02-06T16:34:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![vrevol](https://avatars.discourse-cdn.com/v4/letter/v/3d9bf3/32.png) [@vrevol](https://community.grafana.com/u/vrevol)\
**Post date:** [February 6, 2021, 5:16pm UTC](https://community.grafana.com/t/grafana-7-4-recreates-grafana-db-everytime-ec2-instance-is-recreated/42742/3 "2021-02-06T17:16:00Z")

</div>

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 ☹  
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
