Saving provisioned dashboards in database (MySQL)

  • What Grafana version and what operating system are you using?

v12.0.1

  • What are you trying to achieve?

Save (file) provisioned dashboards in database after removing the provisioning sources.

  • How are you trying to achieve it?

Following Provision Grafana | Grafana documentation .
My dashboar file looks like:

apiVersion: 1
providers:
  - name: 'Platform'
    orgId: 1
    folder: ''
    folderUid: ''
    type: file
    disableDeletion: true
    updateIntervalSeconds: 10
    allowUiUpdates: true
    options:
      path: /etc/grafana/provisioning-custom/dashboards/
      foldersFromFilesStructure: true

My deployment runs in K8s: 2 pods, MySQL (PVC for data) and grafana.

I run a first deployment and provision all my dashboards under GF_PATHS_PROVISIONING (a bunch of json files). I also provisiong datasources, alerting, etc. I start grafana and all the info (dashboards and so) are shown properly.
Then, as I want to keep all that data in my MYSQL without keeping the json files, I redeploy grfana but removing the provisiongn files (database data is persistent).

  • What happened?

I see everything (datasources, alerting, etc.) except the dashboards.
The only thing left in the dashboard table are the dashoard folders:


all the dashboards I had are gone.

(the table dashboard_provisioning, that contained all the provisioned dashboard info is empty, as expected)

  • What did you expect to happen?

The dashbaords should be stored in the databse despite the provisioning files are gone as I pass the disableDeletion option to my dashboard provider.

according to docs:

If you save a provisioned dashboard in the UI and remove the provisioning source, Grafana deletes the dashboard in the database unless you have set the option `disableDeletion` to `true`.
  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.

No errors.

Thanks

I suspect this might be the key “if you save a provisioned dashboard in the UI”

Can you try to save a provisioned dashboard in the ui and see if it preserves that dashboard?

Yes, sorry, that I tried wirhout success.

Thanks for your answer.

Arnau Bria

El dc., 2 de jul. 2025, 19:18, Josiah Solomon via Grafana Labs Community Forums <notifications@grafana.discoursemail.com> va escriure:

so you opened a dashboard, edited it so that something actually changed in the panel and saved it?

yes, that’s exactly what I did.

thanks for your answer.