Change datasource in dashboard without messing up

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

  • What are you trying to achieve?
    changing datasource in graphs

  • How are you trying to achieve it?

  • What happened?
    Grapf configuration is resettet when changing datasource with different type. More specific, the query part is resettet

  • What did you expect to happen?
    only change datasource without damaging the graph

We have to change from elastic-5 to opensearch-1 and grafana 8 (no openbsearch support) to 9 (no elastic5 support in the standard modul, has to be change to opensearch modul, but needs change of datasource too)
I have to change the datasource from elastic to opensearch modul and change the datasoure in all graphs in all dashboards, but the datasource is not more referenced via slug, i have to take care of datasource type and uid, so i cant delete the old DS and create a new one with the same name.

So my question is, how to migrate from elastic to opensearch without killing all my dashboards.

Have you already looked into this article: