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 — plus how to use every Dockstash feature. Pick a platform guide, your database engine, or your specific app below.
Set up and run Dockstash
Connect a fleet agent
Run a small outbound-only agent on any VPS and back up its containers from one dashboard — registration, install, project directories, and first assignment.
Schedule automatic backups
Set a daily backup, a weekly prune with retention, integrity checks, and restore drills — validated cron, one job per repository, live logs.
Restore a backup
Pick a snapshot, type the project name to confirm, restore to a new location by default, and validate before overwriting anything.
Run restore drills
Automatically restore the latest snapshot into a scratch workspace, byte- and row-diff it against the source, and get a pass/fail badge.
Set up alerts & notifications
Failure emails, a dead-man’s-switch heartbeat that catches silent stalls, webhook fan-out to Slack or PagerDuty, and an immutable audit trail.
Set a retention policy
Keep N daily, weekly, and monthly snapshots and let the scheduled prune map your policy straight onto restic forget --prune.
Configure storage destinations
Point Dockstash at your own storage VPS over SSH, save the one-time encryption password, and plan for total-loss recovery.
Troubleshoot failing backups
Read live restic logs, let stale locks fix themselves, revive offline agents, and understand heartbeat alerts.
Back up a database in Docker
PostgreSQL
Back up PostgreSQL in Docker
MySQL
Back up MySQL in Docker
MariaDB
Back up MariaDB in Docker
MongoDB
Back up MongoDB in Docker
Redis
Back up Redis in Docker
Valkey
Back up Valkey in Docker
SQLite
Back up SQLite in Docker
ClickHouse
Back up ClickHouse in Docker
Elasticsearch
Back up Elasticsearch in Docker
RabbitMQ
Back up RabbitMQ in Docker
MinIO
Back up MinIO in Docker
InfluxDB
Back up InfluxDB in Docker
Neo4j
Back up Neo4j in Docker
Back up an app stack in Docker
WordPress
CMS
Ghost
Publishing / Blog
n8n
Workflow automation
Supabase
Backend-as-a-Service
Nextcloud
File sync / Collaboration
Gitea
Git hosting
Plausible Analytics
Analytics
Umami
Analytics
Directus
Headless CMS
Strapi
Headless CMS
Appwrite
Backend-as-a-Service
PocketBase
Backend-as-a-Service
Matomo
Analytics
Mattermost
Team chat
Vaultwarden
Password manager
Uptime Kuma
Monitoring
Metabase
Business intelligence
NocoDB
No-code database
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.