{"id":579,"date":"2025-09-14T15:39:25","date_gmt":"2025-09-14T13:39:25","guid":{"rendered":"https:\/\/www.c-sautter.de\/?p=579"},"modified":"2025-09-14T19:10:05","modified_gmt":"2025-09-14T17:10:05","slug":"grafana-migration-von-sqlite-zu-postgresql-mit-docker-compose","status":"publish","type":"post","link":"https:\/\/www.c-sautter.de\/en\/grafana-migration-von-sqlite-zu-postgresql-mit-docker-compose\/","title":{"rendered":"Migrating Grafana from SQLite to PostgreSQL with Docker Compose"},"content":{"rendered":"<div class=\"wp-block-image is-style-default\">\n<figure class=\"alignleft size-thumbnail\"><img data-dominant-color=\"42596c\" data-has-transparency=\"true\" style=\"--dominant-color: #42596c;\" decoding=\"async\" width=\"150\" height=\"150\" src=\"https:\/\/www.c-sautter.de\/wp-content\/uploads\/2025\/09\/elephant-150x150.png\" alt=\"PostgreSQL\" class=\"wp-image-595 has-transparency\" srcset=\"https:\/\/www.c-sautter.de\/wp-content\/uploads\/2025\/09\/elephant-150x150.png 150w, https:\/\/www.c-sautter.de\/wp-content\/uploads\/2025\/09\/elephant-12x12.png 12w\" sizes=\"(max-width: 150px) 100vw, 150px\" \/><\/figure><\/div>\n\n\n<p>By default, Grafana ships with a lightweight SQLite database to store dashboards, users, and configuration. While SQLite works fine for small setups, it quickly becomes a bottleneck in production environments where reliability, performance, and scaling matter. PostgreSQL is a natural upgrade: it\u2019s robust, battle-tested, and integrates well with Grafana.<\/p>\n\n\n\n<p class=\"translation-block\">In this post, I\u2019ll walk you through migrating Grafana\u2019s default SQLite backend to PostgreSQL using Docker Compose and <strong><a href=\"https:\/\/github.com\/dimitri\/pgloader\">pgloader<\/a><\/strong>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Why Migrate to PostgreSQL?<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li class=\"translation-block\"><strong>Scalability:<\/strong> PostgreSQL handles larger datasets and higher query loads better than SQLite.<\/li>\n\n\n\n<li class=\"translation-block\"><strong>Reliability:<\/strong> Supports advanced features like replication, backups, and tuning.<\/li>\n\n\n\n<li class=\"translation-block\"><strong>Ecosystem Integration:<\/strong> Unlike SQLite, which is just a local file, PostgreSQL runs as a proper database server.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Migration Steps<\/h2>\n\n\n\n<p>We\u2019ll assume you\u2019re already running Grafana with Docker Compose, using the default SQLite backend.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. Stop the Grafana container<\/h3>\n\n\n\n<p>Before doing anything else, stop the Grafana service to prevent new writes during migration:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e1e4e8;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\" data-no-translation=\"\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2f363c;color:#d3d7dd\">Bash<\/span><span role=\"button\" tabindex=\"0\" data-code=\"docker compose stop grafana\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code data-no-translation=\"\"><span class=\"line\"><span style=\"color: #B392F0\">docker<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">compose<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">stop<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">grafana<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">2. Backup the SQLite database<\/h3>\n\n\n\n<p>The SQLite database file is usually named grafana.db and lives inside Grafana\u2019s storage directory (\/var\/lib\/grafana\/ by default). Copy it somewhere safe:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e1e4e8;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\" data-no-translation=\"\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2f363c;color:#d3d7dd\">Bash<\/span><span role=\"button\" tabindex=\"0\" data-code=\"cp .\/grafana\/data\/grafana.db .\/grafana\/data\/grafana.db.bak\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code data-no-translation=\"\"><span class=\"line\"><span style=\"color: #B392F0\">cp<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">.\/grafana\/data\/grafana.db<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">.\/grafana\/data\/grafana.db.bak<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">3. Add PostgreSQL to Docker Compose<\/h3>\n\n\n\n<p>Extend your docker-compose.yml to include a PostgreSQL service. Example:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e1e4e8;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\" data-no-translation=\"\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2f363c;color:#d3d7dd\">YAML<\/span><span role=\"button\" tabindex=\"0\" data-code=\"services:  postgres:    image: postgres:15    restart: unless-stopped    environment:      POSTGRES_USER: grafana      POSTGRES_PASSWORD: grafana      POSTGRES_DB: grafana    volumes:      - .\/postgres-data:\/var\/lib\/postgresql\/data    expose:      - &quot;5432&quot;\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code data-no-translation=\"\"><span class=\"line\"><span style=\"color: #85E89D\">services<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">  <\/span><span style=\"color: #85E89D\">postgres<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">image<\/span><span style=\"color: #E1E4E8\">: <\/span><span style=\"color: #9ECBFF\">postgres:15<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">restart<\/span><span style=\"color: #E1E4E8\">: <\/span><span style=\"color: #9ECBFF\">unless-stopped<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">environment<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      <\/span><span style=\"color: #85E89D\">POSTGRES_USER<\/span><span style=\"color: #E1E4E8\">: <\/span><span style=\"color: #9ECBFF\">grafana<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      <\/span><span style=\"color: #85E89D\">POSTGRES_PASSWORD<\/span><span style=\"color: #E1E4E8\">: <\/span><span style=\"color: #9ECBFF\">grafana<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      <\/span><span style=\"color: #85E89D\">POSTGRES_DB<\/span><span style=\"color: #E1E4E8\">: <\/span><span style=\"color: #9ECBFF\">grafana<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">volumes<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">.\/postgres-data:\/var\/lib\/postgresql\/data<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">expose<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">&quot;5432&quot;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">4. Configure Grafana to use PostgreSQL<\/h3>\n\n\n\n<p>Update your Grafana service configuration so it connects to PostgreSQL. You can either adjust environment variables in docker-compose.yml or mount a grafana.ini file. For environment variables:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e1e4e8;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\" data-no-translation=\"\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2f363c;color:#d3d7dd\">YAML<\/span><span role=\"button\" tabindex=\"0\" data-code=\"services:  grafana:    image: grafana\/grafana-oss    environment:      - GF_DATABASE_TYPE=postgres      - GF_DATABASE_HOST=postgres:5432      - GF_DATABASE_NAME=grafana      - GF_DATABASE_USER=grafana      - GF_DATABASE_PASSWORD=grafana    volumes:      - &quot;.\/data:\/var\/lib\/grafana&quot;    depends_on:      - postgres\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code data-no-translation=\"\"><span class=\"line\"><span style=\"color: #85E89D\">services<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">  <\/span><span style=\"color: #85E89D\">grafana<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">image<\/span><span style=\"color: #E1E4E8\">: <\/span><span style=\"color: #9ECBFF\">grafana\/grafana-oss<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">environment<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">GF_DATABASE_TYPE=postgres<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">GF_DATABASE_HOST=postgres:5432<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">GF_DATABASE_NAME=grafana<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">GF_DATABASE_USER=grafana<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">GF_DATABASE_PASSWORD=grafana<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">volumes<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">&quot;.\/data:\/var\/lib\/grafana&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">depends_on<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">postgres<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">5. Start PostgreSQL and initialize schema<\/h3>\n\n\n\n<p>Bring up the PostgreSQL container:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e1e4e8;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\" data-no-translation=\"\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2f363c;color:#d3d7dd\">Bash<\/span><span role=\"button\" tabindex=\"0\" data-code=\"docker compose up -d postgres\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code data-no-translation=\"\"><span class=\"line\"><span style=\"color: #B392F0\">docker<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">compose<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">up<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-d<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">postgres<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Now start Grafana once so it automatically creates the schema in PostgreSQL:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e1e4e8;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\" data-no-translation=\"\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2f363c;color:#d3d7dd\">Bash<\/span><span role=\"button\" tabindex=\"0\" data-code=\"docker compose up -d grafana\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code data-no-translation=\"\"><span class=\"line\"><span style=\"color: #B392F0\">docker<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">compose<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">up<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-d<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">grafana<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>When Grafana has finished booting, stop it again:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e1e4e8;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\" data-no-translation=\"\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2f363c;color:#d3d7dd\">Bash<\/span><span role=\"button\" tabindex=\"0\" data-code=\"docker compose stop grafana\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code data-no-translation=\"\"><span class=\"line\"><span style=\"color: #B392F0\">docker<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">compose<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">stop<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">grafana<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">6. Add pgloader to Docker Compose<\/h3>\n\n\n\n<p>pgloader makes it easy to migrate from SQLite to PostgreSQL. Add it to your docker-compose.yml:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e1e4e8;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\" data-no-translation=\"\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2f363c;color:#d3d7dd\">Bash<\/span><span role=\"button\" tabindex=\"0\" data-code=\"  pgloader:    image: ghcr.io\/dimitri\/pgloader:latest    container_name: pgloader    command: pgloader \/grafana.load    restart: &quot;no&quot;    depends_on:      - postgres    volumes:      - &quot;.\/data:\/data&quot;      - &quot;.\/grafana.load:\/grafana.load&quot;\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code data-no-translation=\"\"><span class=\"line\"><span style=\"color: #E1E4E8\">  <\/span><span style=\"color: #B392F0\">pgloader:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #B392F0\">image:<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">ghcr.io\/dimitri\/pgloader:latest<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #B392F0\">container_name:<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">pgloader<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #79B8FF\">command<\/span><span style=\"color: #E1E4E8\">: <\/span><span style=\"color: #9ECBFF\">pgloader<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\/grafana.load<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #B392F0\">restart:<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">&quot;no&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #B392F0\">depends_on:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      <\/span><span style=\"color: #B392F0\">-<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">postgres<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #B392F0\">volumes:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      <\/span><span style=\"color: #B392F0\">-<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">&quot;.\/data:\/data&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      <\/span><span style=\"color: #B392F0\">-<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">&quot;.\/grafana.load:\/grafana.load&quot;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Create grafana.load file<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e1e4e8;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\" data-no-translation=\"\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2f363c;color:#d3d7dd\">grafana.load<\/span><span role=\"button\" tabindex=\"0\" data-code=\"load database    from sqlite:\/\/\/data\/grafana.db    into postgresql:\/\/grafana:grafana@grafana-postgres:5432\/grafanawith data only, truncate, reset sequences;\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code data-no-translation=\"\"><span class=\"line\"><span style=\"color: #e1e4e8\">load database<\/span><\/span>\n<span class=\"line\"><span style=\"color: #e1e4e8\">    from sqlite:\/\/\/data\/grafana.db<\/span><\/span>\n<span class=\"line\"><span style=\"color: #e1e4e8\">    into postgresql:\/\/grafana:grafana@grafana-postgres:5432\/grafana<\/span><\/span>\n<span class=\"line\"><span style=\"color: #e1e4e8\"><\/span><\/span>\n<span class=\"line\"><span style=\"color: #e1e4e8\">with data only, truncate, reset sequences;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">7. Run pgloader<\/h3>\n\n\n\n<p>Run pgloader with options to only migrate data, ensuring sequences and constraints are reset properly:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e1e4e8;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\" data-no-translation=\"\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2f363c;color:#d3d7dd\">Bash<\/span><span role=\"button\" tabindex=\"0\" data-code=\"docker compose up pgloader\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code data-no-translation=\"\"><span class=\"line\"><span style=\"color: #B392F0\">docker<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">compose<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">up<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">pgloader<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>This will transfer all existing dashboards, users, and config into the PostgreSQL database.<\/p>\n\n\n\n<p>After pgloader was executed once you should comment it out in your docker compose file to avoid future overwrites of the postgresql database.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">8. Start Grafana with PostgreSQL<\/h3>\n\n\n\n<p>Now start Grafana again:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e1e4e8;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\" data-no-translation=\"\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2f363c;color:#d3d7dd\">Bash<\/span><span role=\"button\" tabindex=\"0\" data-code=\"docker compose up -d grafana\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code data-no-translation=\"\"><span class=\"line\"><span style=\"color: #B392F0\">docker<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">compose<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">up<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-d<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">grafana<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Grafana should now run using PostgreSQL as its backend \u2014 with all your existing data intact.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Verifying the Migration<\/h3>\n\n\n\n<p>Log into Grafana and confirm that:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Your dashboards are still there<\/li>\n\n\n\n<li>Users are intact<\/li>\n<\/ul>\n\n\n\n<p>If everything looks good, you can safely remove the old SQLite file backup later.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Full Example: docker-compose.yml<\/h3>\n\n\n\n<p>Here\u2019s a working example you can adapt to your setup:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#e1e4e8;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\" data-no-translation=\"\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2f363c;color:#d3d7dd\">YAML<\/span><span role=\"button\" tabindex=\"0\" data-code=\"version: &quot;3.9&quot;services:  grafana:    image: grafana\/grafana-oss    container_name: grafana    restart: unless-stopped    environment:      - GF_DATABASE_TYPE=postgres      - GF_DATABASE_HOST=grafana-postgres:5432      - GF_DATABASE_NAME=grafana      - GF_DATABASE_USER=grafana      - GF_DATABASE_PASSWORD=grafana    ports:      - &quot;3000:3000&quot;    volumes:      - &quot;.\/data:\/var\/lib\/grafana&quot;    depends_on:      - postgres  postgres:    image: postgres:17-alpine    container_name: grafana-postgres    restart: unless-stopped    environment:      - POSTGRES_USER=grafana      - POSTGRES_PASSWORD=grafana      - POSTGRES_DB=grafana    volumes:      - &quot;.\/postgres-data-4:\/var\/lib\/postgresql\/data&quot;    expose:      - &quot;5432&quot;  pgloader:    image: ghcr.io\/dimitri\/pgloader:latest    container_name: pgloader    command: pgloader \/grafana.load    restart: &quot;no&quot;    depends_on:      - postgres    volumes:      - &quot;.\/data:\/data&quot;      - &quot;.\/grafana.load:\/grafana.load&quot;\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code data-no-translation=\"\"><span class=\"line\"><span style=\"color: #85E89D\">version<\/span><span style=\"color: #E1E4E8\">: <\/span><span style=\"color: #9ECBFF\">&quot;3.9&quot;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #85E89D\">services<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">  <\/span><span style=\"color: #85E89D\">grafana<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">image<\/span><span style=\"color: #E1E4E8\">: <\/span><span style=\"color: #9ECBFF\">grafana\/grafana-oss<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">container_name<\/span><span style=\"color: #E1E4E8\">: <\/span><span style=\"color: #9ECBFF\">grafana<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">restart<\/span><span style=\"color: #E1E4E8\">: <\/span><span style=\"color: #9ECBFF\">unless-stopped<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">environment<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">GF_DATABASE_TYPE=postgres<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">GF_DATABASE_HOST=grafana-postgres:5432<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">GF_DATABASE_NAME=grafana<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">GF_DATABASE_USER=grafana<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">GF_DATABASE_PASSWORD=grafana<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">ports<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">&quot;3000:3000&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">volumes<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">&quot;.\/data:\/var\/lib\/grafana&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">depends_on<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">postgres<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">  <\/span><span style=\"color: #85E89D\">postgres<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">image<\/span><span style=\"color: #E1E4E8\">: <\/span><span style=\"color: #9ECBFF\">postgres:17-alpine<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">container_name<\/span><span style=\"color: #E1E4E8\">: <\/span><span style=\"color: #9ECBFF\">grafana-postgres<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">restart<\/span><span style=\"color: #E1E4E8\">: <\/span><span style=\"color: #9ECBFF\">unless-stopped<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">environment<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">POSTGRES_USER=grafana<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">POSTGRES_PASSWORD=grafana<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">POSTGRES_DB=grafana<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">volumes<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">&quot;.\/postgres-data-4:\/var\/lib\/postgresql\/data&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">expose<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">&quot;5432&quot;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">  <\/span><span style=\"color: #85E89D\">pgloader<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">image<\/span><span style=\"color: #E1E4E8\">: <\/span><span style=\"color: #9ECBFF\">ghcr.io\/dimitri\/pgloader:latest<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">container_name<\/span><span style=\"color: #E1E4E8\">: <\/span><span style=\"color: #9ECBFF\">pgloader<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">command<\/span><span style=\"color: #E1E4E8\">: <\/span><span style=\"color: #9ECBFF\">pgloader \/grafana.load<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">restart<\/span><span style=\"color: #E1E4E8\">: <\/span><span style=\"color: #9ECBFF\">&quot;no&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">depends_on<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">postgres<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">    <\/span><span style=\"color: #85E89D\">volumes<\/span><span style=\"color: #E1E4E8\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">&quot;.\/data:\/data&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">      - <\/span><span style=\"color: #9ECBFF\">&quot;.\/grafana.load:\/grafana.load&quot;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Conclusion<\/h3>\n\n\n\n<p>Migrating Grafana from SQLite to PostgreSQL is straightforward with Docker Compose and pgloader. The key is to let Grafana generate the schema first, then import the data with pgloader\u2019s data only option.<\/p>\n\n\n\n<p>You now have a more robust Grafana backend that\u2019s production-ready and easier to maintain at scale.<\/p>\n\n\n\n<p>The migration steps are of course transferable to Kubernetes setups.<\/p>","protected":false},"excerpt":{"rendered":"<p>Standardm\u00e4\u00dfig wird Grafana mit einer schlanken SQLite-Datenbank ausgeliefert, in der Dashboards, Benutzer und Konfigurationen gespeichert werden. SQLite eignet sich zwar gut f\u00fcr kleine Setups, wird jedoch schnell zu einem Engpass in Produktionsumgebungen, in denen Zuverl\u00e4ssigkeit, Leistung und Skalierbarkeit eine wichtige Rolle spielen. PostgreSQL ist eine naheliegende Upgrade-Option: Es ist robust, praxiserprobt und l\u00e4sst sich gut&#8230;<\/p>\n<p><a class=\"read-more\" href=\"https:\/\/www.c-sautter.de\/en\/grafana-migration-von-sqlite-zu-postgresql-mit-docker-compose\/\">Read More<\/a><\/p>","protected":false},"author":1,"featured_media":595,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[44,53],"tags":[54,56,55],"class_list":["post-579","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-kubernetes","category-observability","tag-grafana","tag-observability","tag-postgresql"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Grafana Migration von SQLite zu PostgreSQL mit Docker Compose - Carl-Christian Sautter<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.c-sautter.de\/en\/grafana-migration-von-sqlite-zu-postgresql-mit-docker-compose\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Grafana Migration von SQLite zu PostgreSQL mit Docker Compose - Carl-Christian Sautter\" \/>\n<meta property=\"og:description\" content=\"Standardm\u00e4\u00dfig wird Grafana mit einer schlanken SQLite-Datenbank ausgeliefert, in der Dashboards, Benutzer und Konfigurationen gespeichert werden. SQLite eignet sich zwar gut f\u00fcr kleine Setups, wird jedoch schnell zu einem Engpass in Produktionsumgebungen, in denen Zuverl\u00e4ssigkeit, Leistung und Skalierbarkeit eine wichtige Rolle spielen. PostgreSQL ist eine naheliegende Upgrade-Option: Es ist robust, praxiserprobt und l\u00e4sst sich gut...Read More\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.c-sautter.de\/en\/grafana-migration-von-sqlite-zu-postgresql-mit-docker-compose\/\" \/>\n<meta property=\"og:site_name\" content=\"Carl-Christian Sautter\" \/>\n<meta property=\"article:published_time\" content=\"2025-09-14T13:39:25+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-09-14T17:10:05+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.c-sautter.de\/wp-content\/uploads\/2025\/09\/elephant.png\" \/>\n\t<meta property=\"og:image:width\" content=\"540\" \/>\n\t<meta property=\"og:image:height\" content=\"557\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"chris\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"chris\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.c-sautter.de\/grafana-migration-von-sqlite-zu-postgresql-mit-docker-compose\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.c-sautter.de\/grafana-migration-von-sqlite-zu-postgresql-mit-docker-compose\/\"},\"author\":{\"name\":\"chris\",\"@id\":\"https:\/\/www.c-sautter.de\/#\/schema\/person\/358bfdbce75a7762072fd564be80419d\"},\"headline\":\"Grafana Migration von SQLite zu PostgreSQL mit Docker Compose\",\"datePublished\":\"2025-09-14T13:39:25+00:00\",\"dateModified\":\"2025-09-14T17:10:05+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.c-sautter.de\/grafana-migration-von-sqlite-zu-postgresql-mit-docker-compose\/\"},\"wordCount\":525,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.c-sautter.de\/#\/schema\/person\/358bfdbce75a7762072fd564be80419d\"},\"image\":{\"@id\":\"https:\/\/www.c-sautter.de\/grafana-migration-von-sqlite-zu-postgresql-mit-docker-compose\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.c-sautter.de\/wp-content\/uploads\/2025\/09\/elephant.png\",\"keywords\":[\"grafana\",\"observability\",\"postgresql\"],\"articleSection\":[\"Kubernetes\",\"Observability\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.c-sautter.de\/grafana-migration-von-sqlite-zu-postgresql-mit-docker-compose\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.c-sautter.de\/grafana-migration-von-sqlite-zu-postgresql-mit-docker-compose\/\",\"url\":\"https:\/\/www.c-sautter.de\/grafana-migration-von-sqlite-zu-postgresql-mit-docker-compose\/\",\"name\":\"Grafana Migration von SQLite zu PostgreSQL mit Docker Compose - Carl-Christian Sautter\",\"isPartOf\":{\"@id\":\"https:\/\/www.c-sautter.de\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.c-sautter.de\/grafana-migration-von-sqlite-zu-postgresql-mit-docker-compose\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.c-sautter.de\/grafana-migration-von-sqlite-zu-postgresql-mit-docker-compose\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.c-sautter.de\/wp-content\/uploads\/2025\/09\/elephant.png\",\"datePublished\":\"2025-09-14T13:39:25+00:00\",\"dateModified\":\"2025-09-14T17:10:05+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.c-sautter.de\/grafana-migration-von-sqlite-zu-postgresql-mit-docker-compose\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.c-sautter.de\/grafana-migration-von-sqlite-zu-postgresql-mit-docker-compose\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.c-sautter.de\/grafana-migration-von-sqlite-zu-postgresql-mit-docker-compose\/#primaryimage\",\"url\":\"https:\/\/www.c-sautter.de\/wp-content\/uploads\/2025\/09\/elephant.png\",\"contentUrl\":\"https:\/\/www.c-sautter.de\/wp-content\/uploads\/2025\/09\/elephant.png\",\"width\":540,\"height\":557,\"caption\":\"PostgreSQL\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.c-sautter.de\/grafana-migration-von-sqlite-zu-postgresql-mit-docker-compose\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.c-sautter.de\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Grafana Migration von SQLite zu PostgreSQL mit Docker Compose\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.c-sautter.de\/#website\",\"url\":\"https:\/\/www.c-sautter.de\/\",\"name\":\"Carl-Christian Sautter\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.c-sautter.de\/#\/schema\/person\/358bfdbce75a7762072fd564be80419d\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.c-sautter.de\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.c-sautter.de\/#\/schema\/person\/358bfdbce75a7762072fd564be80419d\",\"name\":\"chris\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.c-sautter.de\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.c-sautter.de\/wp-content\/uploads\/2023\/09\/P1100639-Bearbeitet-Kopie.jpg\",\"contentUrl\":\"https:\/\/www.c-sautter.de\/wp-content\/uploads\/2023\/09\/P1100639-Bearbeitet-Kopie.jpg\",\"width\":1657,\"height\":1657,\"caption\":\"chris\"},\"logo\":{\"@id\":\"https:\/\/www.c-sautter.de\/#\/schema\/person\/image\/\"},\"sameAs\":[\"https:\/\/www.c-sautter.de\",\"https:\/\/www.linkedin.com\/in\/carl-christian-sautter\/\"],\"url\":\"https:\/\/www.c-sautter.de\/en\/author\/chris\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Grafana Migration von SQLite zu PostgreSQL mit Docker Compose - Carl-Christian Sautter","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.c-sautter.de\/en\/grafana-migration-von-sqlite-zu-postgresql-mit-docker-compose\/","og_locale":"en_US","og_type":"article","og_title":"Grafana Migration von SQLite zu PostgreSQL mit Docker Compose - Carl-Christian Sautter","og_description":"Standardm\u00e4\u00dfig wird Grafana mit einer schlanken SQLite-Datenbank ausgeliefert, in der Dashboards, Benutzer und Konfigurationen gespeichert werden. SQLite eignet sich zwar gut f\u00fcr kleine Setups, wird jedoch schnell zu einem Engpass in Produktionsumgebungen, in denen Zuverl\u00e4ssigkeit, Leistung und Skalierbarkeit eine wichtige Rolle spielen. PostgreSQL ist eine naheliegende Upgrade-Option: Es ist robust, praxiserprobt und l\u00e4sst sich gut...Read More","og_url":"https:\/\/www.c-sautter.de\/en\/grafana-migration-von-sqlite-zu-postgresql-mit-docker-compose\/","og_site_name":"Carl-Christian Sautter","article_published_time":"2025-09-14T13:39:25+00:00","article_modified_time":"2025-09-14T17:10:05+00:00","og_image":[{"width":540,"height":557,"url":"https:\/\/www.c-sautter.de\/wp-content\/uploads\/2025\/09\/elephant.png","type":"image\/png"}],"author":"chris","twitter_card":"summary_large_image","twitter_misc":{"Written by":"chris","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.c-sautter.de\/grafana-migration-von-sqlite-zu-postgresql-mit-docker-compose\/#article","isPartOf":{"@id":"https:\/\/www.c-sautter.de\/grafana-migration-von-sqlite-zu-postgresql-mit-docker-compose\/"},"author":{"name":"chris","@id":"https:\/\/www.c-sautter.de\/#\/schema\/person\/358bfdbce75a7762072fd564be80419d"},"headline":"Grafana Migration von SQLite zu PostgreSQL mit Docker Compose","datePublished":"2025-09-14T13:39:25+00:00","dateModified":"2025-09-14T17:10:05+00:00","mainEntityOfPage":{"@id":"https:\/\/www.c-sautter.de\/grafana-migration-von-sqlite-zu-postgresql-mit-docker-compose\/"},"wordCount":525,"commentCount":0,"publisher":{"@id":"https:\/\/www.c-sautter.de\/#\/schema\/person\/358bfdbce75a7762072fd564be80419d"},"image":{"@id":"https:\/\/www.c-sautter.de\/grafana-migration-von-sqlite-zu-postgresql-mit-docker-compose\/#primaryimage"},"thumbnailUrl":"https:\/\/www.c-sautter.de\/wp-content\/uploads\/2025\/09\/elephant.png","keywords":["grafana","observability","postgresql"],"articleSection":["Kubernetes","Observability"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.c-sautter.de\/grafana-migration-von-sqlite-zu-postgresql-mit-docker-compose\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.c-sautter.de\/grafana-migration-von-sqlite-zu-postgresql-mit-docker-compose\/","url":"https:\/\/www.c-sautter.de\/grafana-migration-von-sqlite-zu-postgresql-mit-docker-compose\/","name":"Grafana Migration von SQLite zu PostgreSQL mit Docker Compose - Carl-Christian Sautter","isPartOf":{"@id":"https:\/\/www.c-sautter.de\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.c-sautter.de\/grafana-migration-von-sqlite-zu-postgresql-mit-docker-compose\/#primaryimage"},"image":{"@id":"https:\/\/www.c-sautter.de\/grafana-migration-von-sqlite-zu-postgresql-mit-docker-compose\/#primaryimage"},"thumbnailUrl":"https:\/\/www.c-sautter.de\/wp-content\/uploads\/2025\/09\/elephant.png","datePublished":"2025-09-14T13:39:25+00:00","dateModified":"2025-09-14T17:10:05+00:00","breadcrumb":{"@id":"https:\/\/www.c-sautter.de\/grafana-migration-von-sqlite-zu-postgresql-mit-docker-compose\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.c-sautter.de\/grafana-migration-von-sqlite-zu-postgresql-mit-docker-compose\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.c-sautter.de\/grafana-migration-von-sqlite-zu-postgresql-mit-docker-compose\/#primaryimage","url":"https:\/\/www.c-sautter.de\/wp-content\/uploads\/2025\/09\/elephant.png","contentUrl":"https:\/\/www.c-sautter.de\/wp-content\/uploads\/2025\/09\/elephant.png","width":540,"height":557,"caption":"PostgreSQL"},{"@type":"BreadcrumbList","@id":"https:\/\/www.c-sautter.de\/grafana-migration-von-sqlite-zu-postgresql-mit-docker-compose\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.c-sautter.de\/"},{"@type":"ListItem","position":2,"name":"Grafana Migration von SQLite zu PostgreSQL mit Docker Compose"}]},{"@type":"WebSite","@id":"https:\/\/www.c-sautter.de\/#website","url":"https:\/\/www.c-sautter.de\/","name":"Carl-Christian Sautter","description":"","publisher":{"@id":"https:\/\/www.c-sautter.de\/#\/schema\/person\/358bfdbce75a7762072fd564be80419d"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.c-sautter.de\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.c-sautter.de\/#\/schema\/person\/358bfdbce75a7762072fd564be80419d","name":"chris","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.c-sautter.de\/#\/schema\/person\/image\/","url":"https:\/\/www.c-sautter.de\/wp-content\/uploads\/2023\/09\/P1100639-Bearbeitet-Kopie.jpg","contentUrl":"https:\/\/www.c-sautter.de\/wp-content\/uploads\/2023\/09\/P1100639-Bearbeitet-Kopie.jpg","width":1657,"height":1657,"caption":"chris"},"logo":{"@id":"https:\/\/www.c-sautter.de\/#\/schema\/person\/image\/"},"sameAs":["https:\/\/www.c-sautter.de","https:\/\/www.linkedin.com\/in\/carl-christian-sautter\/"],"url":"https:\/\/www.c-sautter.de\/en\/author\/chris\/"}]}},"_links":{"self":[{"href":"https:\/\/www.c-sautter.de\/en\/wp-json\/wp\/v2\/posts\/579","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.c-sautter.de\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.c-sautter.de\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.c-sautter.de\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.c-sautter.de\/en\/wp-json\/wp\/v2\/comments?post=579"}],"version-history":[{"count":18,"href":"https:\/\/www.c-sautter.de\/en\/wp-json\/wp\/v2\/posts\/579\/revisions"}],"predecessor-version":[{"id":601,"href":"https:\/\/www.c-sautter.de\/en\/wp-json\/wp\/v2\/posts\/579\/revisions\/601"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.c-sautter.de\/en\/wp-json\/wp\/v2\/media\/595"}],"wp:attachment":[{"href":"https:\/\/www.c-sautter.de\/en\/wp-json\/wp\/v2\/media?parent=579"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.c-sautter.de\/en\/wp-json\/wp\/v2\/categories?post=579"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.c-sautter.de\/en\/wp-json\/wp\/v2\/tags?post=579"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}