How to back up Metabase in Docker (2026)

Backing up Metabase means capturing three layers at once: a consistent dump of its PostgreSQL and MySQL databases, the 2 data volumes where files live, and the compose/.env config. Dockstash scans the stack, runs the right dump command, and restics every layer to your storage VPS.

What it stores

What Metabase stores

Compose servicesmetabase, postgres
Databases detectedpostgres, mysql
Data volumesmetabase_data (application db), db_data (/var/lib/postgresql/data)
Config pathsdocker-compose.yml, .env
Step by step

The backup plan

  1. Dump the Metabase application database. Run pg_dumpall (or mysqldump --single-transaction) against the Metabase app database to capture dashboards, questions, users, and data-source connection settings consistently.
  2. Capture compose and .env config. Restic docker-compose.yml and .env, including MB_ENCRYPTION_SECRET_KEY, which encrypts stored data-source credentials in the app database.

Restoring Metabase

Metabase stores dashboards, questions, and encrypted data-source credentials in its application database. Preserve MB_ENCRYPTION_SECRET_KEY from .env or the connection credentials in the restored database cannot be decrypted. Do not confuse the app DB with the analytics databases Metabase queries — only the app DB needs backing up here.

Back up Metabase in one click All guides

Last updated: July 2026

Frequently asked questions

What does the Metabase application database contain?

Dashboards, saved questions, collections, users, and encrypted connection settings for the databases Metabase queries. A consistent dump of this app database is the backup.

Do I need to back up the databases Metabase connects to?

Those are separate data sources with their own backups. For Metabase itself you only back up its application database plus the encryption key.

Why is MB_ENCRYPTION_SECRET_KEY important?

It encrypts stored data-source credentials in the app database. Restore the database without the matching key and Metabase cannot reconnect to your data sources.