Source: https://stackoverflow.com/questions/42036663/how-to-complete-copy-grafana-dashboards-from-one-server-to-other-server

  • Install / update Grafana to the same versions on both old and new site.
  • Shutdown both using sudo service grafana-server stop
  • On original Grafana check file /etc/grafana/grafana.ini
    • look for variable data
      • if you did not change it you will see something like this:
        ;data=/var/lib/grafana
    • look for [database] section for the type and host of database
      • if you did not change it you will see
        ;type = sqlite3
        ;host = 127.0.0.1:3306

        meaning you are using embedded sqLite3 database

  • If you use some external database (meaning ini file shows different type of database and some host IP then you simply copy /etc/grafana/grafana.ini file from old instance to the new one. When you start Grafana on new instance all settings will be available immediately.
  • If you use internal sqLite3 database (default) go to the data directory – there should be the file grafana.db
    • Copy this file from the old instance to the new one (preserve permissions 640 grafana:grafana)
  • Start Grafana on the new instance with sudo service grafana-server start – all users and dashboards should be available.