db-backup backs up, restores, verifies, and maintains MySQL, PostgreSQL, MongoDB, and six other engines using one configuration style. It runs as a CLI or built-in scheduler on servers, containers, or CI.
Overview
db-backup is a cross-platform tool that unifies backup, restore, verification, and maintenance for multiple database engines behind one secret-friendly configuration syntax. You can invoke it from scripts or let its multi-job scheduler run recurring jobs on servers, in containers, or in pipelines.
Supported engines include MySQL, MariaDB, PostgreSQL, MongoDB, Microsoft SQL Server, Redis, SQLite3, InfluxDB, and CouchDB. Backup modes cover full, incremental, differential, and schema-only dumps, with table include and exclude filters. Output can land on the filesystem or on S3-compatible, WebDAV, Azure Blob, or Google Cloud Storage backends, with optional encryption via AGE, GPG, or OpenSSL AES-256.
Scheduling accepts cron, intervals, clock times, natural language, day filters, and blackout windows. Retention policies support last-N, time windows, and tiered hourly through yearly rules. Compression uses zstd, gzip, bzip2, or xz. Restore works from the CLI, interactive guided mode, or config-driven profiles. Checksums and JSON sidecar metadata accompany backups, and maintenance hooks can analyze, optimize, vacuum, or reindex after successful runs.
Distribution options include a container image, precompiled binaries for Linux, BSD, macOS, and Windows, source builds, and a NixOS module. Documentation is hosted separately; a community edition covers most features, with advanced capabilities in a paid supporter tier.
Key features
- Nine database engines in one config
- Full, incremental, and schema backups
- S3, WebDAV, Azure, and GCS targets
- AGE and GPG encryption at rest
- Cron and natural-language scheduling
- Tiered retention and compression
- Guided and CLI restore flows
- Checksums and JSON backup metadata
Use cases
- Nightly production database backups
- Multi-engine backup from one scheduler
- Encrypted off-site backup archives
- Post-backup vacuum and optimize jobs
- Containerized backup sidecars