Dashboard Export/Import to a new server fails datasource on target

When exporting a dashboard to JSON (clipboard or file), in order to import to a new installation of grafana (9.1) on a new machine, the visualizations don’t load until I go in and edit every single panel to “change” the data source to the identically named and configured DS on the new system.

This looks to me like the data source in the panels is using some other internal ID to reference it, and that is not carrying over to the new system as there does not appear to be any way to import/export data sources, leaving me to configure the DS manually and (presumably) generating a new ID.

If that is in fact the case, the import process needs to have a way of mapping the old DS entries to a new one, or we need the ability to set the DS ID in the new system to match the old one. The other alternative is a search/replace in the JSON, but that seems like a needless extra step.

If that’s not the case, then what is actually failing in this process?


are you migrating everything to the new server?

What OS are you moving it from to what?

There might an easier and less tedious way

Same OS (Debian 20.04), I only had 3 dashboards, so ultimately the search/replace in the JSON did the trick, But there’s gotta be a better way for larger scale moves

I would go the upgrade route. Clone/copy the current grafana folder :open_file_folder: then change config to give new grafana new port.

Spin the new grafana, then upgrade new grafana. Or you can upgrade the current one