Skip to main content

Supported Databases

jokowipe.id currently supports PostgreSQL and MySQL. Backups are performed by the agent running on your server using native database dump tools.

Support Matrix​

DatabaseBackup ToolStatus
PostgreSQLpg_dump✅ Supported
MySQLmysqldump✅ Supported
MongoDBmongodump🚧 Planned
Redisredis-cli / BGSAVE🚧 Planned

PostgreSQL​

Requirements​

  • pg_dump installed on the agent machine (same major version as the database, or newer)
  • User must have pg_read_all_data or superuser role

Configuration​

database:
type: postgres
url: "postgres://backup_user:password@localhost:5432/mydb"
options:
format: custom # custom (default), plain, directory, tar
compress: true # Enable compression (default: true)
schema_only: false # Backup schema only (no data)
exclude_tables: # Tables to exclude
- sessions
- audit_logs

Example​

# The agent runs this command internally:
pg_dump --format=custom --compress=9 \
"postgres://backup_user:password@localhost:5432/mydb" \
> /tmp/backup-20240115-020001.dump

Restore​

pg_restore --clean --if-exists \
--dbname="postgres://user:pass@localhost:5432/mydb" \
/tmp/backup-20240115-020001.dump

MySQL / MariaDB​

Requirements​

  • mysqldump installed on the agent machine
  • User must have SELECT, LOCK TABLES, SHOW VIEW, EVENT, TRIGGER privileges

Configuration​

database:
type: mysql
url: "mysql://backup_user:password@localhost:3306/mydb"
options:
single_transaction: true # Use --single-transaction (InnoDB)
skip_lock_tables: false
include_databases: # Backup multiple databases
- mydb
- analytics
exclude_tables:
- cache

Example​

# Internal command:
mysqldump --single-transaction --quick --lock-tables=false \
--user=backup_user --password=password \
--host=localhost mydb | gzip > /tmp/backup.sql.gz

MongoDB​

Requirements​

  • mongodump installed (part of MongoDB Database Tools)
  • User must have backup role

Configuration​

database:
type: mongodb
url: "mongodb://backup_user:password@localhost:27017/mydb"
options:
auth_db: admin
oplog: false # Include oplog for point-in-time recovery
compress: true
include_collections:
- users
- orders

Redis​

Requirements​

  • redis-cli installed
  • CONFIG SET permission or a pre-configured save policy

Notes​

Redis backups use the BGSAVE command to trigger an RDB snapshot, then copy the RDB file. This means:

  • No point-in-time restore (only full snapshots)
  • AOF (append-only file) backup is supported via configuration
database:
type: redis
url: "redis://:password@localhost:6379"
options:
method: rdb # rdb or aof
wait_for_save: true # Wait for BGSAVE to complete

Installing Required Tools​

The agent itself is a single binary, but backup tools must be installed separately on the agent machine.

# PostgreSQL client tools
sudo apt-get install postgresql-client-16

# MySQL client tools
sudo apt-get install mysql-client

# MongoDB tools
wget https://fastdl.mongodb.org/tools/db/mongodb-database-tools-ubuntu2204-x86_64-100.9.4.deb
sudo dpkg -i mongodb-database-tools-*.deb
Check Tool Availability

Run jokowipe-agent doctor to check that all required backup tools are installed and accessible.

$ jokowipe-agent doctor
✓ pg_dump: found (v16.1)
✓ mysqldump: found (v8.0.36)
✗ mongodump: not found — install mongodb-database-tools