Backup Manager β Web UI untuk PostgreSQL, MySQL, dan MariaDB backup dengan S3-compatible object storage.
Jagad adalah self-hosted database backup manager dengan Web UI yang memungkinkan kamu mengelola backup database dari satu dashboard. Support full backup, scheduled backup dengan retention policy, dan S3-compatible object storage (AWS S3, Cloudflare R2, MinIO, Backblaze B2).
- π’οΈ Multi-DB β PostgreSQL, MySQL, MariaDB
- β° Scheduled Backups β Cron-based dengan retention policy auto-cleanup
- βοΈ S3-Compatible β AWS S3, Cloudflare R2, MinIO, Backblaze B2
- π Encryption at Rest β AES-256-GCM client-side encryption sebelum upload
- β Backup Verification β SHA-256 checksum verification
- β¬οΈ Download & Restore β One-click restore atau download backup file
- π Web UI β Dashboard, backup history, schedule management
- π Dark/Light Mode β Theme toggle
- π± Responsive β Mobile-friendly dengan sidebar slide-in
- Docker & Docker Compose
- PostgreSQL / MySQL / MariaDB server (yang mau di-backup)
git clone https://github.com/edsuwarna/jagad.git
cd jagad
docker compose up -dhttp://localhost:8085
Default credentials:
- Username:
admin - Password:
admin123
- Go to Connections β Add Connection
- Choose DB type (PostgreSQL, MySQL, MariaDB)
- Fill connection details (host, port, user, password)
- Test connection β Save
- Backend auto-discovers databases on the server
- Go to Storage β Add Storage
- Choose type (AWS S3, Cloudflare R2, MinIO, Backblaze B2)
- Fill endpoint, bucket, credentials
- Test β Save
- Manual: Click "Run Backup Now" on Dashboard
- Scheduled: Go to Schedules β Create Schedule β Set cron + retention
Jagad supports two database backends:
| Backend | Use Case |
|---|---|
| SQLite (default) | Single-server, zero-config β no external dependencies |
| PostgreSQL + TimescaleDB | Production, monitoring, multi-server β enables DB health metrics |
When JAGAD_DATABASE_URL is set, Jagad uses PostgreSQL with TimescaleDB for both config data AND monitoring hypertables. When unset, it falls back to SQLite.
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Docker Compose β
β β
β ββββββββββββββββ ββββββββββββββββββ β
β β Nginx (UI) ββββββΆβ Go Backend β β
β β :8085 β β :8080 β β
β β web/ static β β REST API β β
β ββββββββββββββββ β + Scheduler β β
β β + Backup Exec β β
β βββββββββ¬βββββββββ β
β β β
β ββββββββΌββββββββ β
β β PostgreSQL β β
β β +TimescaleDBβ β
β β (or SQLite) β β
β ββββββββ¬ββββββββ β
ββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββ
β
ββββββββββββββββββββββββΌβββββββββββββββββββββββ
β β β
ββββββΌβββββ βββββββΌββββββ ββββββββΌββββ
β S3 β β R2 / B2 β β MinIO β
βββββββββββ βββββββββββββ ββββββββββββ
| Layer | Technology |
|---|---|
| Backend | Go 1.25 |
| Database | SQLite (default) or PostgreSQL + TimescaleDB |
| Monitoring | TimescaleDB hypertables (health_checks, db_metrics, perf_metrics) |
| Frontend | Vanilla JS SPA + Lucide Icons |
| Scheduler | robfig/cron |
| Storage SDK | MinIO (S3-compatible) |
| Encryption | AES-256-GCM + Argon2id KDF |
| Container | Docker / Docker Compose |
| Method | Path | Description |
|---|---|---|
GET |
/api/health |
Health check |
POST |
/api/auth/login |
Login |
GET |
/api/auth/check |
Check auth status |
GET |
/api/connections |
List connections |
POST |
/api/connections |
Add connection |
PUT |
/api/connections/{id} |
Update connection |
DELETE |
/api/connections/{id} |
Delete connection |
POST |
/api/connections/{id}/test |
Test connection |
GET |
/api/connections/{id}/databases |
List discovered DBs |
POST |
/api/connections/{id}/discover |
Re-discover databases |
PUT |
/api/connections/databases/{id} |
Update DB selection |
GET |
/api/backups |
List backups |
POST |
/api/backups |
Start backup |
GET |
/api/backups/{id} |
Backup detail |
DELETE |
/api/backups/{id} |
Delete backup |
GET |
/api/backups/{id}/logs |
Backup logs |
GET |
/api/backups/{id}/download |
Download backup |
POST |
/api/backups/{id}/verify |
Verify backup |
GET |
/api/backups/stats |
Backup statistics |
GET |
/api/schedules |
List schedules |
POST |
/api/schedules |
Create schedule |
PUT |
/api/schedules/{id} |
Update schedule |
DELETE |
/api/schedules/{id} |
Delete schedule |
POST |
/api/schedules/{id}/run |
Run schedule now |
GET |
/api/restores |
List restores |
POST |
/api/backups/{id}/restore |
Restore from backup |
GET |
/api/restores/{id} |
Restore detail |
GET |
/api/storage-providers |
List storage providers |
POST |
/api/storage-providers |
Add storage provider |
PUT |
/api/storage-providers/{id} |
Update storage |
DELETE |
/api/storage-providers/{id} |
Delete storage |
POST |
/api/storage-providers/{id}/test |
Test storage |
POST |
/api/storage-providers/{id}/set-default |
Set default |
GET |
/api/monitoring/health |
Health check history (PG only) |
GET |
/api/monitoring/metrics |
Database metrics (PG only) |
GET |
/api/monitoring/performance |
Performance metrics (PG only) |
Environment variables:
| Variable | Default | Description |
|---|---|---|
JAGAD_PORT |
8080 |
API server port |
JAGAD_DATA_DIR |
/data |
SQLite + temp data directory |
JAGAD_DATABASE_URL |
(none) | PostgreSQL DSN (set to use PG+TimescaleDB instead of SQLite) |
JAGAD_ADMIN_USER |
admin |
Admin username |
JAGAD_ADMIN_PASS |
admin123 |
Admin password |
JAGAD_SECRET_KEY |
(auto) | Session secret key |
JAGAD_ENCRYPTION_KEY |
(none) | Master key for AES-256-GCM |
To migrate existing data from SQLite to PostgreSQL:
# 1. Start TimescaleDB + migrate data
docker compose up -d timescaledb
go run cmd/migrate-sqlite/main.go \
-dsn "postgres://postgres:jagad_secret@localhost:5432/jagad?sslmode=disable" \
-data-dir /path/to/your/data
# 2. Dry-run first to see what will be migrated
go run cmd/migrate-sqlite/main.go \
-dsn "postgres://postgres:jagad_secret@localhost:5432/jagad?sslmode=disable" \
-data-dir /path/to/your/data \
-dry-run
# 3. Set env and restart
export JAGAD_DATABASE_URL="postgres://postgres:jagad_secret@localhost:5432/jagad?sslmode=disable"
docker compose up -d# Run locally
make run
# Run tests
make test
# Build
make build
# Docker
make docker-runjagad/
βββ cmd/jagad/ # Main entrypoint
βββ internal/
β βββ api/ # HTTP router + response helpers
β βββ auth/ # Authentication
β βββ backup/ # Backup engine + handler
β βββ config/ # Configuration
β βββ connection/ # DB connection management
β βββ encryption/ # AES-256-GCM encryption
β βββ repository/ # SQLite data access
β βββ restore/ # Restore engine
β βββ schedule/ # Cron scheduler
β βββ storage/ # S3-compatible storage
βββ web/ # Frontend (Vanilla JS SPA)
β βββ css/style.css
β βββ js/app.js
β βββ index.html
βββ prd/ # Product requirements
βββ sketches/ # UI mockups
βββ Dockerfile # Go backend
βββ Dockerfile.frontend # Nginx frontend
βββ docker-compose.yml
βββ Makefile
- Phase 1: Foundation (Go, SQLite, Auth, Docker)
- Phase 2: Backup Engine (Full backup, S3 storage, encryption)
- Phase 3: Scheduling & Restore (Cron, retention, restore)
- Phase 4: UI MVP (Dashboard, connections, schedules, dark/light)
- Phase 5: PostgreSQL + TimescaleDB (Config & monitoring in single DB)
- Phase 6: Monitoring API (Health checks, DB metrics, performance)
- v1.1: Incremental backup engine (pgBackRest, XtraBackup, Mariabackup)
- v1.2: Notifications (Email, Telegram, Slack)
- v2.0: Multi-user, schedule templates, compression settings
Apache 2.0 Β© 2026 Endang Suwarna