Skip to content

DBackupDatabase & File Backup Automation

Self-hosted solution for automating database and file backups with encryption, compression, and smart retention policies.

Quick Start โ€‹

Get DBackup running in minutes with Docker:

bash
# Once: write both secrets to .env and keep the file
echo "ENCRYPTION_KEY=$(openssl rand -hex 32)" > .env
echo "BETTER_AUTH_SECRET=$(openssl rand -base64 32)" >> .env

docker run -d --name dbackup -p 3000:3000 \
  --env-file .env \
  -e BETTER_AUTH_URL="https://localhost:3000" \
  -v "$(pwd)/data:/data" \
  -v "$(pwd)/backups:/backups" \
  skyfay/dbackup:latest
yaml
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
      - TRUSTED_PROXIES=none # No reverse proxy in front. Behind one, set its address here
    volumes:
      - ./data:/data              # All persistent data (db, storage, certs)
      - ./backups:/backups        # Optional: used for local backups

Then open https://localhost:3000 and create your first admin account (accept the self-signed certificate on first visit).

โ†’ Full Installation Guide for Docker Compose, volumes, and production setup.

Supported Integrations โ€‹

DatabaseVersionsConnection ModesRestore
PostgreSQL12, 13, 14, 15, 16, 17, 18Direct, SSHYes
MySQL5.7, 8.x, 9.xDirect, SSHYes
MariaDB10.x, 11.xDirect, SSHYes
MongoDB4.x, 5.x, 6.x, 7.x, 8.xDirect, SSHYes
Redis2.8+Direct, SSHGuided
Valkey7.2+Direct, SSHGuided
SQLite3.xLocal, SSHYes
Microsoft SQL Server2017, 2019, 2022, Azure SQL EdgeDirect, SSHYes
Azure SQL Database (Beta)Single database, elastic poolDirectYes (drops the target first)
Firebird (Beta)3.x, 4.x, 5.xDirect, SSHYes (pre-configured aliases)

Your Backups, Your Control โ€‹

DBackup is designed as a convenience layer, not a dependency.

Database backups are a standard dump (SQL, BSON, RDB, etc.), the same format you'd get from running pg_dump, mysqldump, or mongodump yourself. Even encrypted, they use open AES-256-GCM with a simple sidecar .meta.json file for the IV and auth tag. If DBackup is ever unavailable, you can still:

  1. Decrypt any backup with the included standalone Node.js script (zero external dependencies)
  2. Decompress automatically (GZIP or Brotli is handled by the same script)
  3. Import the resulting dump directly with your database's native CLI tool

File backups are a plain TAR archive. Unencrypted, tar -xf backup.tar is the whole recovery procedure. Encrypted, the layout is specified byte by byte in the Archive Format reference, and the Recovery Kit's dbackup-recover.js is an independent implementation of that document - it lists and extracts single files with nothing but Node.js.

The Recovery Kit (downloadable from Vault) bundles everything you need: your encryption key, both scripts, and platform-specific helpers for Windows, Linux, and macOS.

TIP

Download your Recovery Kit after creating an Encryption Profile and store it offline (USB drive, password manager, printed). It's your safety net if DBackup or the server it runs on is no longer accessible.

The promise has a price โ€‹

Incremental backups store whole changed files and reference unchanged ones in earlier archives of the same chain. They do not use a content-addressed chunk store the way restic, Borg or Kopia do.

That costs storage: a renamed file is stored again, a one-byte change in a 10 GB file re-stores 10 GB, and nothing is deduplicated across jobs or chains. What it buys is that every archive stays a file you can open by hand, deleting a backup is deleting files rather than garbage collection, and a chain is a folder you can copy in any file browser.

If your data is mostly large binaries with small internal changes, a chunk-based tool is the better fit and we would rather say so. See the reasoning in full, or Backup Modes for what this means in practice.

Architecture at a Glance โ€‹

DBackup is built with modern technologies:

  • Frontend: Next.js 16 (App Router), React, Shadcn UI
  • Backend: Next.js Server Actions, Prisma ORM
  • Database: SQLite for application state
  • Streaming: Native Node.js streams for efficient encryption/compression

The plugin-based adapter architecture makes it easy to add new databases, storage providers, or notification channels.

Community & Support โ€‹

Development, Testing & Security โ€‹

The architecture, the technology stack and the feature specifications of DBackup are designed and directed by a human system engineer. The code is written by AI coding agents that follow those specifications and the guidelines of the project.

Every feature is tested by hand, backed by unit tests, checked against real databases and storage servers in a test lab, and audited for security by AI agents. End-to-end tests run the Docker image in that lab on every pull request that touches the app. They back up every database engine there, also over SSH, restore it and compare the content. They also send a backup to every storage server of the lab and restore it from there, and a test message to every notification receiver.

A formal security audit by an external firm has not been done yet. Independent security researchers have reviewed parts of the code and reported vulnerabilities privately. Every report was fixed in a release and published as an advisory that credits the reporter, see Security Advisories. The encryption and the backup format are publicly documented to make a full review easy. If you review code or work in security, your findings are very welcome, see the security policy for how to report them.

Released under the GNU General Public License. | Privacy ยท Legal Notice