Skip to content

Database Snapshots & Restore

MultiDocker can dump and restore your project databases without you remembering the right mysqldump / pg_dump incantation. The dialect is detected automatically from the container image — MySQL/MariaDB, PostgreSQL, Redis or MongoDB.

Dumps are written under ~/.config/multi-docker/snapshots/<project>/.

mdocker db dump
mdocker db dump aurora
mdocker db dump aurora --service db --out ~/backups/aurora.sql

The dump is streamed out of the container per dialect:

Dialect Tool Extension
MySQL / MariaDB mysqldump .sql
PostgreSQL pg_dump .sql
Redis redis-cli --rdb .rdb
MongoDB mongodump --archive .archive

snapshot dumps all database services of a project in one go — handy before a migration or a risky change:

mdocker db snapshot
mdocker db snapshot aurora
mdocker db snapshots aurora # list existing snapshots

Restore from an explicit file, or from the snapshot directory by timestamp:

mdocker db restore
mdocker db restore aurora ~/backups/aurora.sql
mdocker db restore-snapshot aurora # most recent snapshot
mdocker db restore-snapshot aurora 20260101-120000

For Shopware profiles the database name, user and password are read from the shop container’s DATABASE_URL (the db container only exposes a root password), so dumps and restores automatically target the correct schema.