How to back up Umami in Docker (2026)
A complete Umami backup has three parts: dump its PostgreSQL and MySQL databases the correct way, capture the 1 data volume that hold files on disk, and save the compose file and .env. Dockstash detects all three automatically, dumps the database from the running container, and restics everything off-site.
What Umami stores
| Compose services | umami, postgres |
|---|---|
| Databases detected | postgres, mysql |
| Data volumes | db_data (/var/lib/postgresql/data) |
| Config paths | docker-compose.yml, .env |
The backup plan
- Dump the database. Run pg_dumpall -U "$POSTGRES_USER" (or mysqldump --single-transaction for a MySQL backend) to capture websites, sessions, and all pageview events in one consistent snapshot.
- Capture compose and .env config. Restic docker-compose.yml and .env. The APP_SECRET signs sessions and must match on restore, and DATABASE_URL must point at the restored database.
Restoring Umami
Umami keeps everything — websites, sessions, and events — in a single relational database, so a consistent dump is the whole backup. Preserve APP_SECRET or existing login sessions are invalidated.
Back up Umami in one click All guides
Last updated: July 2026
Related database guides
Frequently asked questions
Is a single database dump enough for Umami?
Yes. Umami stores all its data — sites, sessions, and pageview events — in one relational database. A consistent pg_dumpall or mysqldump --single-transaction captures everything.
Does Umami use Postgres or MySQL?
Either. Dockstash detects the configured backend from DATABASE_URL and runs the correct dump command for that engine.
What does APP_SECRET do?
It signs authentication tokens. Preserve it in .env on restore or all existing user sessions become invalid.