Guides

Docker backup guides

These guides show the correct way to back up each database and app in Docker: dump the database from its running container (never a live file copy), capture the data volumes and config, and store encrypted off-site Restic snapshots. Pick your database engine or your specific app below.

Frequently asked questions

Why can’t I just copy the database volume?

A running database writes to its data directory constantly. Copying it mid-write captures a torn, inconsistent state that usually will not restore. The correct backup is a logical dump (pg_dumpall, mysqldump --single-transaction, mongodump --oplog) taken from the running container.

What is the difference between a guide and a use-case page?

A guide covers one database engine (how to back up PostgreSQL, MySQL, Redis, and so on). A use-case page covers a whole app stack (WordPress, n8n, Supabase) — which databases it runs, which volumes hold files, and the full ordered backup plan.

Does Dockstash automate all of this?

Yes. Dockstash scans your Compose project, detects the databases, volumes, and config, runs the correct dump per engine, and stores encrypted Restic snapshots off-site — then drill-tests the restore so you know it works.