Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebrand to ogion #228

Merged
merged 4 commits into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ Leave the [ ] open if they are not applicable, or if you have not completed the

<!---
acceptance tests are defined in CONTRIBUTING.md file
see https://github.com/rafsaf/backuper/blob/main/CONTRIBUTING.md#acceptance-tests
see https://github.com/rafsaf/ogion/blob/main/CONTRIBUTING.md#acceptance-tests
--->
4 changes: 2 additions & 2 deletions .github/workflows/dev_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ jobs:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}

- name: Build and push backuper image
- name: Build and push ogion image
uses: docker/build-push-action@v5
with:
file: docker/Dockerfile
context: .
target: build
push: true
tags: rafsaf/backuper:dev
tags: rafsaf/ogion:dev
platforms: linux/amd64,linux/arm64
4 changes: 2 additions & 2 deletions .github/workflows/release_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ jobs:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}

- name: Build and push backuper image
- name: Build and push ogion image
uses: docker/build-push-action@v5
with:
file: docker/Dockerfile
context: .
target: build
push: true
tags: rafsaf/backuper:${{ github.ref_name }},rafsaf/backuper:latest
tags: rafsaf/ogion:${{ github.ref_name }},rafsaf/ogion:latest
platforms: linux/amd64,linux/arm64
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# backuper
# ogion
data/*
conf/*

Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ repos:
- id: pyproject-tag-check
always_run: true
args:
- https://github.com/rafsaf/backuper
- https://github.com/rafsaf/ogion
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ Both upload providers and backup targets were created with possibility to easly

Note, file `docker/docker-compose.dbs.yml` is automatically updated weekly keeping always latest tag per release cycle and adding new releases and removing those after EOL.

6. You can run backuper (`--single` here to make all backups immediatly and then exit):
6. You can run ogion (`--single` here to make all backups immediatly and then exit):

`python -m backuper.main --single`
`python -m ogion.main --single`

## Docs

Expand Down Expand Up @@ -99,9 +99,9 @@ project's [pull request template](.github/PULL_REQUEST_TEMPLATE.md).

## Releasing

On every push to `main` branch, there is automated build that will create `dev` image tag. Then usually after at minimum 1-2 days after it is propagated to some real world backuper instances and working just fine, release is made manually using GitHub releases with autogenerated changelog. After new release and tag is created, for example `4.0`, docker image with the same tag is build and uploaded to dockerhub.
On every push to `main` branch, there is automated build that will create `dev` image tag. Then usually after at minimum 1-2 days after it is propagated to some real world ogion instances and working just fine, release is made manually using GitHub releases with autogenerated changelog. After new release and tag is created, for example `4.0`, docker image with the same tag is build and uploaded to dockerhub.

See https://github.com/rafsaf/backuper/releases.
See https://github.com/rafsaf/ogion/releases.

## Docs releasing

Expand Down
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ docker_dbs_setup_down:

tests_amd64:
make docker_dbs_setup_up
docker compose -f docker/docker-compose.tests.yml run --rm --build backuper_tests_amd64
docker compose -f docker/docker-compose.tests.yml run --rm --build ogion_tests_amd64

tests_arm64:
make docker_dbs_setup_up
docker compose -f docker/docker-compose.tests.yml run --rm --build backuper_tests_arm64
docker compose -f docker/docker-compose.tests.yml run --rm --build ogion_tests_arm64

acceptance_tests_amd64:
make docker_dbs_setup_up
docker compose -f docker/docker-compose.acceptance.yml run --rm --build backuper_acceptance_test_amd64
docker compose -f docker/docker-compose.acceptance.yml run --rm --build ogion_acceptance_test_amd64

acceptance_tests_arm64:
make docker_dbs_setup_up
docker compose -f docker/docker-compose.acceptance.yml run --rm --build backuper_acceptance_test_arm64
docker compose -f docker/docker-compose.acceptance.yml run --rm --build ogion_acceptance_test_arm64

update_compose_db_file:
poetry run python backuper/tools/compose_file_generator.py > docker/docker-compose.dbs.yml
poetry run python ogion/tools/compose_file_generator.py > docker/docker-compose.dbs.yml
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
[![License](https://img.shields.io/github/license/rafsaf/backuper)](https://github.com/rafsaf/backuper/blob/main/LICENSE)
[![License](https://img.shields.io/github/license/rafsaf/ogion)](https://github.com/rafsaf/ogion/blob/main/LICENSE)
[![Python 3.12](https://img.shields.io/badge/python-3.12-blue)](https://docs.python.org/3/whatsnew/3.12.html)
[![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)
[![Tests](https://github.com/rafsaf/backuper/actions/workflows/tests.yml/badge.svg)](https://github.com/rafsaf/backuper/actions/workflows/tests.yml)
[![Type check](https://github.com/rafsaf/backuper/actions/workflows/type_check.yml/badge.svg)](https://github.com/rafsaf/backuper/actions/workflows/type_check.yml)
[![Dev build](https://github.com/rafsaf/backuper/actions/workflows/dev_build.yml/badge.svg)](https://github.com/rafsaf/backuper/actions/workflows/dev_build.yml)
[![Release build](https://github.com/rafsaf/backuper/actions/workflows/release_build.yml/badge.svg)](https://github.com/rafsaf/backuper/actions/workflows/release_build.yml)
[![Update of db versions](https://github.com/rafsaf/backuper/actions/workflows/update_compose_dbs.yml/badge.svg)](https://github.com/rafsaf/backuper/actions/workflows/update_compose_dbs.yml)
[![Tests](https://github.com/rafsaf/ogion/actions/workflows/tests.yml/badge.svg)](https://github.com/rafsaf/ogion/actions/workflows/tests.yml)
[![Type check](https://github.com/rafsaf/ogion/actions/workflows/type_check.yml/badge.svg)](https://github.com/rafsaf/ogion/actions/workflows/type_check.yml)
[![Dev build](https://github.com/rafsaf/ogion/actions/workflows/dev_build.yml/badge.svg)](https://github.com/rafsaf/ogion/actions/workflows/dev_build.yml)
[![Release build](https://github.com/rafsaf/ogion/actions/workflows/release_build.yml/badge.svg)](https://github.com/rafsaf/ogion/actions/workflows/release_build.yml)
[![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)

# Backuper
# 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 `zip` format using [7-zip](https://www.7-zip.org/), with strong AES-256 encryption under the hood.

## Documentation

- [https://backuper.rafsaf.pl](https://backuper.rafsaf.pl)
- [https://ogion.rafsaf.pl](https://ogion.rafsaf.pl)

## Supported backup targets

Expand All @@ -40,7 +40,7 @@ Backups are in `zip` format using [7-zip](https://www.7-zip.org/), with strong A

## Deployment strategies

Using docker image: `rafsaf/backuper:latest`, see all tags on [dockerhub](https://hub.docker.com/r/rafsaf/backuper/tags)
Using docker image: `rafsaf/ogion:latest`, see all tags on [dockerhub](https://hub.docker.com/r/rafsaf/ogion/tags)

- docker (docker compose) container
- kubernetes deployment
Expand All @@ -62,23 +62,23 @@ services:
image: postgres:16
environment:
- POSTGRES_PASSWORD=pwd
backuper:
image: rafsaf/backuper:latest
ogion:
image: rafsaf/ogion:latest
environment:
- POSTGRESQL_PG16=host=db password=pwd cron_rule=0 0 5 * * port=5432
- ZIP_ARCHIVE_PASSWORD=change_me
- BACKUP_PROVIDER=name=debug
```

(NOTE this will use provider [debug](https://backuper.rafsaf.pl/latest/providers/debug/) that store backups locally in the container).
(NOTE this will use provider [debug](https://ogion.rafsaf.pl/latest/providers/debug/) that store backups locally in the container).

## Real world usage

The author actively uses backuper (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.
The 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.

See how it looks for ~2GB size database:

![backuper_gcp_example_twp-min.jpg](https://raw.githubusercontent.com/rafsaf/backuper/main/docs/images/backuper_gcp_example_twp-min.jpg)
![ogion_gcp_example_twp-min.jpg](https://raw.githubusercontent.com/rafsaf/ogion/main/docs/images/ogion_gcp_example_twp-min.jpg)

<br>
<br>
14 changes: 7 additions & 7 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ ARG PYTHONUNBUFFERED=1
ARG PIP_DISABLE_PIP_VERSION_CHECK=1
ARG PIP_NO_CACHE_DIR=1
ENV ROOT_MODE="false"
ENV SERVICE_NAME="backuper"
ENV FOLDER_PATH="/var/lib/backuper"
ENV LOG_FOLDER_PATH="/var/log/backuper"
ENV SERVICE_NAME="ogion"
ENV FOLDER_PATH="/var/lib/ogion"
ENV LOG_FOLDER_PATH="/var/log/ogion"
WORKDIR ${FOLDER_PATH}

RUN apt-get -y update && apt-get -y install wget unzip gpg
Expand Down Expand Up @@ -35,13 +35,13 @@ RUN mkdir /tmp/data \
&& cp -r /tmp/data /usr/local/lib/python3.12/site-packages/botocore/ \
&& rm -rf /tmp/data

COPY backuper backuper
COPY ogion ogion
# rm 7zip to save ~5M for aarch64 when on amd64 and reverse
RUN remove_arch=$(arch | sed s/aarch64/amd64/ | sed s/x86_64/arm64/) \
&& rm -rf backuper/bin/7zip/${remove_arch}
&& rm -rf ogion/bin/7zip/${remove_arch}
# rm 7zip 7zz dynamic linked version binary
RUN target_arch=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) \
&& rm -f backuper/bin/7zip/${target_arch}/7zz
&& rm -f ogion/bin/7zip/${target_arch}/7zz

COPY scripts/docker_entrypoint.sh /docker_entrypoint.sh
RUN rm -rf scripts
Expand All @@ -57,4 +57,4 @@ COPY tests tests
CMD ["pytest"]

FROM common AS build
CMD ["python", "-m", "backuper.main"]
CMD ["python", "-m", "ogion.main"]
8 changes: 4 additions & 4 deletions docker/docker-compose.acceptance.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
services:
backuper_acceptance_test_amd64:
ogion_acceptance_test_amd64:
restart: "no"
network_mode: "host"
platform: linux/amd64
build:
context: ./../
dockerfile: docker/Dockerfile
target: build
command: python -m backuper.main --single
command: python -m ogion.main --single
env_file:
- ./../.env

backuper_acceptance_test_arm64:
ogion_acceptance_test_arm64:
restart: "no"
network_mode: "host"
platform: linux/arm64
build:
context: ./../
dockerfile: docker/Dockerfile
target: build
command: python -m backuper.main --single
command: python -m ogion.main --single
env_file:
- ./../.env
Loading