Migrate Grafana data to new instance

#1

We are bringing up a new instance of Grafana to modernize our infrastructure, moving from pure Docker based installation into Kubernetes environment.

From what I can find in documentation, the only thing that could be exported/imported are dashboards.
Is there a way to easily migrate data (datasources, dashboards etc) from one instance to another? Manual or automated are both fine, it is not a lot of data.

#2

Depends on what database you’re using for storing Grafana’s configuration like dashboards, users etc and/or if you’re planning to switch database. If you’re not planning to switch you’ll usually take a database backup and restore it for your new Grafana instance - it’s important here that you run the same Grafana versions on current and new until database restore is complete - you should then be able to upgrade the new instance to newer Grafana versions.

If you want to migrate Grafana configuration/settings you’ll have to make sure that the new instance uses the same settings. How you do this depends on if you’re using file-based configuration or environment variables.