Ogion
A tool for performing scheduled database backups and transferring encrypted data to secure public clouds, for home labs, hobby projects, etc., in environments such as k8s, docker, vms.
Backups are in age format, with strong encryption under the hood. Why age? it's modern replacement for GnuPG, available for most architectures and systems. Lzip compression is used before encryption step.
At this point, no fundamental breaking changes are planned, you may consider this as a stable, feature complete software.
Documentation
Alternatives
There are better tools for bigger databases like pgBackRest - Reliable PostgreSQL Backup & Restore.
Supported backup targets
- PostgreSQL (all currently supported versions)
- MariaDB (all currently supported versions)
- MySQL (all currently supported versions)
- Single file
- Directory
Supported upload providers
- Google Cloud Storage bucket
- S3 storage compatibile bucket (AWS, Minio)
- Azure Blob Storage
- Debug (local)
Notifications
- Discord
- Email (SMTP)
- Slack
Deployment strategies
Using docker image: rafsaf/ogion:latest, see all tags on dockerhub
- docker (docker compose) container
- kubernetes deployment
Architectures
- linux/amd64
- linux/arm64
Example
Everyday 5am backup of PostgreSQL database defined in the same file and running in docker container.
1 2 3 4 5 6 7 8 9 10 11 12 13 | |
(NOTE this will use provider debug that store backups locally in the container).
Real world usage
The author actively uses ogion (with GCS) for one production project plemiona-planer.pl postgres database (both PRD and STG) and for bunch of homelab projects including self hosted Firefly III mariadb, Grafana postgres, KeyCloak postgres, Nextcloud postgres and configuration file, Minecraft server files, and two other postgres dbs for some demo projects.
See how it looks for ~2GB size database:

Why it works
Ogion has 100% test coverage with end-to-end integration tests that guarantee it works in real scenarios. Tests run inside containers on all architectures against actual database instances (PostgreSQL 13-18, MariaDB 10.6-12.0, MySQL 8.0-9.5) defined in docker-compose.dbs.yml. Database versions are automatically updated daily via GitHub Actions to ensure compatibility with latest releases.
Each test executes the complete backup/restore cycle:
- Create test data in real database
- Run backup using actual database clients (
pg_dump,mariadb-dump) - Compress with lzip and encrypt with age
- Upload to simulated cloud storage (Azurite for Azure, fake-gcs-server for GCS, Minio for S3)
- Download the backup
- Decrypt with age and decompress with lzip
- Restore to database and verify data integrity
This end-to-end testing against real databases and cloud storage simulators ensures ogion will work reliably in production.