A self-hosted database backup automation tool for MySQL, PostgreSQL & more.
100K+
Self-hosted backup automation for databases and files, with encryption, compression, and smart retention.
Website • Documentation • Quick Start • API Reference • Changelog • Roadmap
DBackup is a comprehensive, self-hosted backup solution for databases and the files that belong to them. It provides AES-256-GCM encryption, flexible storage options, and intelligent retention policies to ensure your data is always protected and recoverable.
Whether you're running a single MySQL database or managing multiple PostgreSQL, MongoDB, and SQL Server instances, DBackup offers a unified interface with real-time monitoring, granular access control, and seamless restore capabilities. A job can also collect directories and files from any storage adapter - local paths, SFTP, SMB, FTP, WebDAV, S3, Google Drive, Dropbox, OneDrive, or rsync over SSH - so an application's dump and its data directory land in the same archive, at the same point in time, with one retention policy over both. There is no agent to install.
No vendor lock-in by design - every database backup is a standard dump (SQL, BSON, RDB, etc.) and every file backup is a plain TAR archive, both encrypted with open AES-256-GCM. Unencrypted, tar -xf is all you need. Encrypted, the format is specified byte by byte and the Recovery Kit reads it with a single Node.js script and your key. No proprietary formats, no dependencies on DBackup itself.
That promise shapes the architecture: incremental backups store whole changed files rather than deduplicated chunks, which uses more storage than a chunk-based tool like restic or Borg but keeps every backup an archive you can open by hand. See the reasoning behind that trade.
Meant for the files that belong to the applications you already back up databases for - config, uploads, certificates - collected in the same job, on the same schedule, under the same retention and key. DBackup is agentless, so a full run stages the tree on the DBackup host before packing it and needs roughly twice the source size in free space; for bulk media libraries or anything needing block-level deduplication, restic or Borg are the better tool.
.tar.gz download{job_name}, {db_name}, date/time) and named cron presets for consistent scheduling across jobsSupported Platforms: AMD64 (x86_64) • ARM64 (aarch64)
# docker-compose.yml
services:
dbackup:
image: skyfay/dbackup:latest
container_name: dbackup
restart: always
ports:
- "3000:3000"
environment:
- ENCRYPTION_KEY= # openssl rand -hex 32
- BETTER_AUTH_URL=https://localhost:3000
- BETTER_AUTH_SECRET= # openssl rand -base64 32
# All additional environment variables: https://docs.dbackup.app/user-guide/installation#environment-variables
volumes:
- ./data:/data # All persistent data (db, storage, certs)
- ./backups:/backups # Optional: used for local backups
docker-compose up -d
Open https://localhost:3000 and create your admin account (accept the self-signed certificate warning on first visit).
📖 Full installation guide: docs.dbackup.app/user-guide/getting-started
| Database | Versions | Connection Modes | Restore |
|---|---|---|---|
| PostgreSQL | 12, 13, 14, 15, 16, 17, 18 | Direct, SSH | Yes |
| MySQL | 5.7, 8.x, 9.x | Direct, SSH | Yes |
| MariaDB | 10.x, 11.x | Direct, SSH | Yes |
| MongoDB | 4.x, 5.x, 6.x, 7.x, 8.x | Direct, SSH | Yes |
| Redis | 2.8+ | Direct, SSH | Guided |
| Valkey | 7.2+ | Direct, SSH | Guided |
| SQLite | 3.x | Local, SSH | Yes |
| Microsoft SQL Server | 2017, 2019, 2022, Azure SQL Edge | Direct, SSH | Yes |
| Azure SQL Database (beta) | Single database, elastic pool | Direct | Yes (drops the target first) |
| Firebird (beta) | 3.x, 4.x, 5.x | Direct, SSH | Yes (pre-configured aliases) |
Every storage adapter listed below can also be a directory source, with a live folder tree for picking what to back up. An adapter holds one role at a time, source or destination, so a job can never back up its own archives. The same server can serve both roles as two adapters - the "Create as Directory Source" action copies one over, credentials included.
The role matters for restores: adapters that serve byte ranges fetch only the file you asked for, while SMB downloads the archive once and takes the file out of it afterwards. That applies to the adapter holding the backup, not the one the files came from.
📖 Details: File & Folder Backups • Backup Modes • Archive Format
| Destination | Details |
|---|---|
| Local Filesystem | Store backups directly on the server |
| Amazon S3 | Native AWS S3 with storage class support (Standard, IA, Glacier, Deep Archive) |
| S3 Compatible | Any S3-compatible storage (MinIO, Wasabi, etc.) |
| Cloudflare R2 | Cloudflare R2 Object Storage |
| Hetzner Object Storage | Hetzner S3 storage (fsn1, nbg1, hel1, ash) |
| Google Drive | Google Drive via OAuth2 |
| Dropbox | Dropbox via OAuth2 with chunked upload support |
| Microsoft OneDrive | OneDrive via Microsoft Graph API / OAuth2 |
| SFTP | SSH/SFTP with password, private key, or SSH agent auth |
| FTP / FTPS | Classic FTP with optional TLS |
| WebDAV | WebDAV servers (Nextcloud, ownCloud, etc.) |
| SMB (Samba) | Windows/Samba network shares (SMB2, SMB3) |
| Rsync | File transfer via rsync over SSH |
| Channel | Details |
|---|---|
| Discord | Webhook-based notifications with rich embeds |
| Slack | Incoming webhook notifications with Block Kit formatting |
| Microsoft Teams | Adaptive Card notifications via Power Automate webhooks |
| Gotify | Self-hosted push notifications with priority levels |
| ntfy | Topic-based push notifications (self-hosted or ntfy.sh) |
| Generic Webhook | JSON payloads to any HTTP endpoint (PagerDuty, etc.) |
| Telegram | Bot API push notifications to chats, groups, and channels |
| SMS (Twilio) | SMS text message alerts via Twilio API |
| Email (SMTP) | SMTP with SSL/STARTTLS support, multiple recipients |
Full documentation is available at docs.dbackup.app:
# Clone & install
git clone https://github.com/Skyfay/DBackup.git && cd DBackup
pnpm install
# Configure environment
cp .env.example .env # Edit with your secrets
# Start dev server (applies pending migrations automatically on startup)
pnpm dev
For contribution guidelines, see the CONTRIBUTING.md.
/docs/apiThe system architecture, infrastructure design, strict technology stack selection, and feature specifications for DBackup were entirely conceptualized and directed by a human System Engineer to solve real-world infrastructure challenges.
The application code was generated by AI coding agents following detailed architectural specifications and coding guidelines. All features were manually tested for correctness, stability, and real-world reliability. Automated unit tests (Vitest) and static security audits complement the manual QA process.
DBackup is thoroughly tested and used in production, but a formal manual security audit by an external developer has not yet been completed. If you are a software developer or cybersecurity professional, your expertise is highly welcome! We invite the open-source community to review the code, submit PRs, and help us elevate DBackup to a fully verified, enterprise-ready standard.
Security Disclosure: If you discover a security vulnerability, please do not open a public GitHub issue. Instead, report it responsibly via email to [email protected].
Content type
Image
Digest
sha256:d2b974328…
Size
420.2 MB
Last updated
2 days ago
docker pull skyfay/dbackup