Backups
Scheduled database backups that are actually proven to restore. After each run, Docksy restores the dump into a throwaway container and checks it.
Supported databases
| Template | Dump method | Verification query |
|---|---|---|
| PostgreSQL | pg_dumpall | SELECT 1 + database count |
| MySQL / MariaDB | mysqldump --all-databases | SELECT 1 + database count |
| MongoDB | mongodump --archive | db.stats() |
| Redis | BGSAVE + copy dump.rdb | DBSIZE |
Create a backup job
Open a database app → Backups → New backup:
- Schedule: hourly, daily or weekly
- Retention: keep the last N runs
- Destination: local (
/var/lib/docksy/backups/<app>/on the server) or any S3-compatible storage (AWS S3, Cloudflare R2, Backblaze B2, MinIO…), with endpoint, bucket, region, keys and prefix. The secret key is write-only. - Verify after each run: on by default. Leave it on.
You can also Run now at any time. Running a backup once right after setup is a good idea.
How a run works
- The dump runs inside the database container:
docker exec … | gzip > /var/lib/docksy/backups/<app>/<timestamp>.gz - If configured, it's uploaded to S3-compatible storage.
- Old runs are pruned down to the retention count.
- Verification: a temporary container from the same image starts, the dump is restored into it, a sanity query runs, and the container is removed. The run is marked
passedorfailed.
A failed run or a failed verification fires the critical Backup failed alert.
Restore
Restoring overwrites the live database. Docksy requires an explicit confirmation in the UI, the API ({"confirm": true}), the CLI and MCP. The Claude plugin adds one more confirmation prompt on top.
Pick a run (preferably one with verified: passed) → Restore → confirm.
Why verification matters
A backup you've never restored is a hope, not a backup. Dumps silently break: a truncated upload, a version mismatch, a dump taken while a disk was full. Docksy catches these the day they happen, not the day you need the backup.
Ask Claude: "add Postgres for my api app with verified daily backups". The docksy-add-database skill creates the database, wires DATABASE_URL, and runs and verifies the first backup.