Migrate Grafana from SQLite to Postgres

So you have a Grafana with the default storage backend (SQLite) and you want to move it to PostgreSQL ? You’ve come to the right place. Preparing First we need to dump the SQLite database, since it’s just a single file simply shut down Grafana to avoid any corruption and copy the grafana.db somewhere safe. It is usually located at /var/lib/grafana. In your Postgres DB create a grafana user and database then edit your Grafana configuration file to enable postgres storage....

May 29, 2023 · 7 min