Migrate Grafana data to new instance

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.

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.

hi all. this topic seems to be old, but i faced with similar situation.
we are using oracle database/sql query for the most dashboards and don’t have plan to switch database.
basically all of our dashboards live in an instance(old), and now we since we created our own instance(new), we would like to move everything to the new one.
grafana version is the same in both instances. how to move/migrate them using database backup which mentioned above? the link takes me to the page where how can i upgrade the version!

For grafana backend are you using sqlite or something else?

we are using oracle sql.

So this is not the dashboard data but the database grafana itself is running on. You can see this in your ini file

interesting, how to locate that file? our instance running on gaiaclould. i looked to find (/usr/local/etc/grafana/grafana.ini) which provided in (Configure Grafana | Grafana documentation) and could not find it.
second qus: once find it, then what to do?

Who installed this instance on gaia? what os is it installed on?

I don’t have enough information on that since the whole configuration process done by gaia/grafana team, but base on the url, i see all of them contain with gaiacloud, so I think the instance hosted on gaia paltform.

unless someone here knows about that hosting service, you are going to have to call them and find out.

so they confirmed that the instance running on gaiacloud and backend db is mysql.

1 Like

cool. So the new instance is still with this hosting company? Why wont they do the migration for you?

right, both instance running at the same place, when i explain that what i need, they have no clue what I am talking about and each time pointing me to export/import process.

might want to start thinking about getting a new hosting company, that is ridiculous. what is the old version and the new version?

both instances are the same version, current instance(as i referred old) is not belong to us and we did create a new instance to have 100% ownership of it, and now want to move everything.

1 Like

i saw you replied here and give them another approach API to get dashboards and Panels?
is this maybe something i can try?

i would use this approach

  • take a backup of the old one
  • create the a new instance locally in your own network or server (test)
  • restore the back up of the old to the new one (test)
  • test things out
  • then when all is well, try the same restore steps to the new instance.