Migration from sqlite3 to postgres

DISCLAIMER: Make sure you fully test this migration in a test environment with actual users logging in and actual user identity management you use.
Actually the initial part migration is simple

  1. Stop the grafana service
  2. change this in your defaults.ini
# Either "mysql", "postgres" or "sqlite3", it's your choice
type = postgres
host = 127.0.0.1:5432
name = grafana
user = YOUR_USER
password= YOUR_USER_PASSWORD
  1. Start your grafana service
  2. Postgres

Now on to bringing over the data from sqllite, the hard part!

Bringing the data hits a few snags primarily when starting the grafana service after pointing the ini to postgres, all is_* columns are converted to boolean ie

"is_public"	INTEGER NOT NULL DEFAULT 0,

So need to make sure the insert scripts account for that.