No description
This repository has been archived on 2026-04-20. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
  • Python 94.2%
  • Dockerfile 5.8%
Find a file
Thenuja Viknarajah 87121fbf37
Some checks failed
ci / tests (push) Failing after 1s
ci / build (push) Has been skipped
update Dockerfile
2023-05-09 16:06:19 +01:00
.github/workflows Initial Commit 2021-11-12 18:13:45 +00:00
deploy Fixed bug on backup failure, improved deployment manifest 2021-11-13 21:38:29 +00:00
.flake8 Initial Commit 2021-11-12 18:13:45 +00:00
.gitignore Initial Commit 2021-11-12 18:13:45 +00:00
Dockerfile update Dockerfile 2023-05-09 16:06:19 +01:00
kustomization.yaml Initial Commit 2021-11-12 18:13:45 +00:00
LICENSE Initial Commit 2021-11-12 18:13:45 +00:00
main.py Added basic leader election 2021-11-16 14:07:48 +00:00
Pipfile Added basic leader election 2021-11-16 14:07:48 +00:00
Pipfile.lock Added basic leader election 2021-11-16 14:07:48 +00:00
README.md Initial Commit 2021-11-12 18:13:45 +00:00
settings.py Added basic leader election 2021-11-16 14:07:48 +00:00

postgres-to-azureblob

Simple Python application for backing up a single PostgreSQL Database and storing the output on Azure Blob Storage.

Deployment and Usage

Deployment via a kustomization.yaml file can make this easy to tweak for your specific needs and makes this simple to deploy via Flux 2 or similar.

bases:
  - github.com/binkhq/postgres-to-azureblob/deploy

patches:
  - target:
      kind: CronJob
    patch: |-
      - op: replace
        path: /metadata/name
        value: hourly-backup
  - target:
      kind: CronJob
    patch: |-
      - op: replace
        path: /spec/schedule
        value: "30 * * * *"
  - target:
      kind: CronJob
    patch: |-
      - op: replace
        path: /spec/jobTemplate/spec/template/spec/containers/0/env
        value:
          - name: blob_storage_connection_string
            valueFrom:
              secretKeyRef:
                key: connection_string
                name: azure-storage-common
          - name: blob_storage_container
            value: backups
          - name: blob_storage_path_prefix
            value: hourly
          - name: psql_connection_string
            valueFrom:
              secretKeyRef:
                key: common_postgres
                name: azure-pgfs

Notes

This project does not support Azure Database for PostgreSQL Single Server due to its non-standard connection strings, we only test on Azure Database for PostgreSQL Flexible Server and standard PostgreSQL installations.