{"id":20845390,"url":"https://github.com/rafsaf/ogion","last_synced_at":"2025-05-09T02:43:28.247Z","repository":{"id":170266701,"uuid":"512443829","full_name":"rafsaf/ogion","owner":"rafsaf","description":"A tool for performing scheduled database backups and transferring encrypted data to secure clouds, for home labs, hobby projects, etc., in environments such as k8s, docker, vms.","archived":false,"fork":false,"pushed_at":"2025-05-01T15:51:48.000Z","size":11112,"stargazers_count":4,"open_issues_count":3,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-03T09:49:51.368Z","etag":null,"topics":["aws-s3","azure","backup","backup-tool","backup-utility","cron","docker","googlecloudstorage","kubernetes","mariadb","mysql","postgresql","python"],"latest_commit_sha":null,"homepage":"https://ogion.rafsaf.pl","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rafsaf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-10T13:35:29.000Z","updated_at":"2025-04-17T11:20:44.000Z","dependencies_parsed_at":"2023-10-11T00:23:52.250Z","dependency_job_id":"655b78dc-3cf0-4fcc-ae42-83cab307262e","html_url":"https://github.com/rafsaf/ogion","commit_stats":null,"previous_names":["rafsaf/backuper","rafsaf/ogion"],"tags_count":29,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafsaf%2Fogion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafsaf%2Fogion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafsaf%2Fogion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafsaf%2Fogion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rafsaf","download_url":"https://codeload.github.com/rafsaf/ogion/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253180516,"owners_count":21866935,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws-s3","azure","backup","backup-tool","backup-utility","cron","docker","googlecloudstorage","kubernetes","mariadb","mysql","postgresql","python"],"created_at":"2024-11-18T02:12:48.395Z","updated_at":"2025-05-09T02:43:28.237Z","avatar_url":"https://github.com/rafsaf.png","language":"Python","readme":"[![License](https://img.shields.io/github/license/rafsaf/ogion)](https://github.com/rafsaf/ogion/blob/main/LICENSE)\n[![Python 3.13](https://img.shields.io/badge/python-3.13-blue)](https://docs.python.org/3/whatsnew/3.13.html)\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n[![Tests](https://github.com/rafsaf/ogion/actions/workflows/tests.yml/badge.svg)](https://github.com/rafsaf/ogion/actions/workflows/tests.yml)\n[![Type check](https://github.com/rafsaf/ogion/actions/workflows/type_check.yml/badge.svg)](https://github.com/rafsaf/ogion/actions/workflows/type_check.yml)\n[![Dev build](https://github.com/rafsaf/ogion/actions/workflows/dev_build.yml/badge.svg)](https://github.com/rafsaf/ogion/actions/workflows/dev_build.yml)\n[![Release build](https://github.com/rafsaf/ogion/actions/workflows/release_build.yml/badge.svg)](https://github.com/rafsaf/ogion/actions/workflows/release_build.yml)\n[![Update of db versions](https://github.com/rafsaf/ogion/actions/workflows/update_compose_dbs.yml/badge.svg)](https://github.com/rafsaf/ogion/actions/workflows/update_compose_dbs.yml)\n\n# Ogion\n\nA 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.\n\nBackups are in `age` format using [age](https://github.com/FiloSottile/age), with strong encryption under the hood. Why age? it's modern replacement for GnuPG, available for most architectures and systems.\n\nThis project is more or less well tested cron-like runtime with predefined supported providers and backup targets (see below) with sensible defaults for backup commands. It has rich integration tests using providers container replacements: fake gcs, azurite, minio. Goal was to make 100% sure it will work in the wild.\n\nThere is **no compression before age encryption** step whatsoever. This is intentional, prepare for large backups size (compared to ogion 6.0 where 7zip was used, some backups that were 300MB now are 2.2GB). There are known exploits when mixing compression with encryption, and for small systems compression this just seems unnecessary. See:\n\n- [CRIME](https://en.wikipedia.org/wiki/CRIME)\n- [BREACH](https://en.wikipedia.org/wiki/BREACH)\n- [Known plaintext attack](https://en.wikipedia.org/wiki/Known-plaintext_attack)\n- [A Known Plaintext Attack on the PKZIP](https://link.springer.com/content/pdf/10.1007/3-540-60590-8_12.pdf)\n- [TLSv1.3 removes compression](https://blog.cloudflare.com/tls-1-3-overview-and-q-and-a/)\n\n## Documentation\n\n- [https://ogion.rafsaf.pl](https://ogion.rafsaf.pl)\n\n## Alternatives\n\nThere are better tools for big corporate databases and systems:\n\n- [pgBackRest - Reliable PostgreSQL Backup \u0026 Restore](https://pgbackrest.org/)\n- [postgres operator for k8s based on pgBackRest from crunchydata](https://access.crunchydata.com/documentation/postgres-operator/latest)\n\n## Supported backup targets\n\n- PostgreSQL ([all currently supported versions](https://endoflife.date/postgresql))\n- MariaDB ([all currently supported versions](https://endoflife.date/mariadb))\n- MySQL ([all currently supported versions](https://endoflife.date/mysql))\n- Single file\n- Directory\n\n## Supported upload providers\n\n- Google Cloud Storage bucket\n- S3 storage compatibile bucket (AWS, Minio)\n- Azure Blob Storage\n- Debug (local)\n\n## Notifications\n\n- Discord\n- Email (SMTP)\n- Slack\n\n## Deployment strategies\n\nUsing docker image: `rafsaf/ogion:latest`, see all tags on [dockerhub](https://hub.docker.com/r/rafsaf/ogion/tags)\n\n- docker (docker compose) container\n- kubernetes deployment\n\n## Architectures\n\n- linux/amd64\n- linux/arm64\n\n## Example\n\nEveryday 5am backup of PostgreSQL database defined in the same file and running in docker container.\n\n```yml\n# docker-compose.yml\n\nservices:\n  db:\n    image: postgres:17\n    environment:\n      - POSTGRES_PASSWORD=pwd\n  ogion:\n    image: rafsaf/ogion:latest\n    environment:\n      - POSTGRESQL_DB_README=host=db password=pwd cron_rule=0 0 5 * * port=5432\n      - AGE_RECIPIENTS=age1q5g88krfjgty48thtctz22h5ja85grufdm0jly3wll6pr9f30qsszmxzm2\n      - BACKUP_PROVIDER=name=debug\n```\n\n(NOTE this will use provider [debug](https://ogion.rafsaf.pl/latest/providers/debug/) that store backups locally in the container).\n\n## Real world usage\n\nThe author actively uses ogion (with GCS) for one production project [plemiona-planer.pl](https://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.\n\nSee how it looks for ~2GB size database:\n\n![ogion_gcp_example_twp-min.jpg](https://raw.githubusercontent.com/rafsaf/ogion/main/docs/images/ogion_gcp_example_twp-min.jpg)\n\n\u003cbr\u003e\n\u003cbr\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frafsaf%2Fogion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frafsaf%2Fogion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frafsaf%2Fogion/lists"}