Supported Databases
Jagad supports three database engines: PostgreSQL, MySQL, and MariaDB. Each database type uses its own dump tool for full backups and a separate engine for incremental backups.
Overview
| Database | Full Backup Tool | Incremental Engine | Port Default |
|---|---|---|---|
| PostgreSQL | pg_dump | pgBackRest (WAL-based) | 5432 |
| MySQL | mysqldump | Percona XtraBackup | 3306 |
| MariaDB | mariadb-dump / mysqldump | Mariabackup | 3306 |
PostgreSQL
Type identifier: postgresql
Minimum version: PostgreSQL 12 (recommended 14+)
Full backup method: Jagad executes pg_dump with the custom format (--format=c) and streams the output through a pipeline:
pg_dump stdout → gzip → (optional AES-256-GCM encrypt) → S3 multipart uploadThe exact command built is:
pg_dump -h <host> -p <port> -U <username> -d <database> --no-password --clean --if-exists --format=cThe password is passed via the PGPASSWORD environment variable.
Incremental backup method: Jagad uses pgBackRest for WAL-based incremental backups. pgBackRest tracks changes at the WAL (Write-Ahead Log) level and can perform differential and incremental backups efficiently.
- Full:
pgbackrest --type=full backup - Incremental:
pgbackrest --type=incr backup
The pgBackRest configuration is auto-generated by Jagad with S3 as the repository target.
SSL/TLS support: Use the ssl_mode setting with values: disable, allow, prefer (default), require, verify-ca, verify-full.
MySQL
Type identifier: mysql
Minimum version: MySQL 8.0 (recommended 8.4+)
Full backup method: Jagad executes mysqldump with --single-transaction for consistent, non-blocking backups and streams the output:
mysqldump stdout → gzip → (optional AES-256-GCM encrypt) → S3 multipart uploadThe exact command built is:
mysqldump -h <host> -P <port> -u <username> --password=<password> --single-transaction --routines --triggers --events <database>Key flags used:
--single-transaction— consistent read without locking tables (InnoDB)--routines— include stored procedures and functions--triggers— include triggers--events— include scheduled events
Incremental backup method: Jagad uses Percona XtraBackup for page-level incremental backups. XtraBackup copies InnoDB data pages and tracks changes between backups.
- Full:
xtrabackup --backup --stream=xbstream - Incremental:
xtrabackup --backup --stream=xbstream --incremental-lsn=<LSN>
The xbstream output is piped through gzip directly to S3 with no intermediate disk storage.
SSL/TLS support: Use the ssl_mode setting with values: false, true, skip-verify, preferred (custom).
MariaDB
Type identifier: mariadb
Minimum version: MariaDB 10.6 (recommended 11.0+)
Full backup method: Jagad first tries mariadb-dump, falling back to mysqldump if not found. The dump command is identical to MySQL's with the same flags:
mariadb-dump -h <host> -P <port> -u <username> --password=<password> --single-transaction --routines --triggers --events <database>The pipeline is identical:
mariadb-dump stdout → gzip → (optional AES-256-GCM encrypt) → S3 multipart uploadIncremental backup method: Jagad uses Mariabackup (an XtraBackup fork maintained by the MariaDB project) for page-level incremental backups. Mariabackup is compatible with XtraBackup's xbstream format.
- Full:
mariabackup --backup --stream=xbstream - Incremental:
mariabackup --backup --stream=xbstream --incremental-lsn=<LSN>
If mariabackup is not found in PATH, Jagad falls back to xtrabackup automatically.
SSL/TLS support: Same as MySQL — use the ssl_mode setting.
Incremental Backup Support Matrix
The following table shows the feature matrix for incremental backups:
| Capability | PostgreSQL (pgBackRest) | MySQL (XtraBackup) | MariaDB (Mariabackup) |
|---|---|---|---|
| Full backup | ✅ | ✅ | ✅ |
| Incremental (WAL/page based) | ✅ | ✅ | ✅ |
| Automatic base detection | ✅ | ❌ (LSN required) | ❌ (LSN required) |
| Streaming to S3 | ✅ (via config) | ✅ (xbstream pipe) | ✅ (xbstream pipe) |
| No disk spooling | ✅ | ✅ | ✅ |
| Compression | zstd (level 6) | gzip | gzip |
| Encryption | AES-256-GCM | AES-256-GCM | AES-256-GCM |
Full Backup vs Incremental Backup
| Aspect | Full Backup | Incremental Backup |
|---|---|---|
| Tool | pg_dump / mysqldump / mariadb-dump | pgBackRest / XtraBackup / Mariabackup |
| Size | Complete logical dump | Only changed pages since last backup |
| Speed | Slower for large databases | Much faster (typically 10-100x) |
| Restore | Single file, standalone | Requires base full backup + all incrementals |
| Granularity | Row-level SQL | Page-level binary |
| Best for | Small to medium databases, logical restore | Large databases, frequent backups |
| Cross-version | ✅ Can restore to different versions | ❌ Must restore to same version |
Database Discovery
Jagad automatically discovers databases on a server when a connection is added. It uses:
- PostgreSQL:
SELECT datname FROM pg_database WHERE datistemplate = false - MySQL/MariaDB:
SHOW DATABASES(filtering out system databases:information_schema,performance_schema,mysql,sys)
You can then select which discovered databases to include in backups.
Connection Parameters
Each database connection requires:
| Parameter | PostgreSQL | MySQL | MariaDB |
|---|---|---|---|
name | Required | Required | Required |
db_type | postgresql | mysql | mariadb |
host | Required | Required | Required |
port | 5432 (default) | 3306 (default) | 3306 (default) |
username | Required | Required | Required |
password | Required | Required | Required |
ssl_mode | prefer (default) | Configurable | Configurable |