Skip to content

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

DatabaseFull Backup ToolIncremental EnginePort Default
PostgreSQLpg_dumppgBackRest (WAL-based)5432
MySQLmysqldumpPercona XtraBackup3306
MariaDBmariadb-dump / mysqldumpMariabackup3306

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 upload

The exact command built is:

bash
pg_dump -h <host> -p <port> -U <username> -d <database> --no-password --clean --if-exists --format=c

The 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 upload

The exact command built is:

bash
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:

bash
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 upload

Incremental 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:

CapabilityPostgreSQL (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
Compressionzstd (level 6)gzipgzip
EncryptionAES-256-GCMAES-256-GCMAES-256-GCM

Full Backup vs Incremental Backup

AspectFull BackupIncremental Backup
Toolpg_dump / mysqldump / mariadb-dumppgBackRest / XtraBackup / Mariabackup
SizeComplete logical dumpOnly changed pages since last backup
SpeedSlower for large databasesMuch faster (typically 10-100x)
RestoreSingle file, standaloneRequires base full backup + all incrementals
GranularityRow-level SQLPage-level binary
Best forSmall to medium databases, logical restoreLarge 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:

ParameterPostgreSQLMySQLMariaDB
nameRequiredRequiredRequired
db_typepostgresqlmysqlmariadb
hostRequiredRequiredRequired
port5432 (default)3306 (default)3306 (default)
usernameRequiredRequiredRequired
passwordRequiredRequiredRequired
ssl_modeprefer (default)ConfigurableConfigurable

Released under the Apache 2.0 License.