{"id":37362513,"url":"https://github.com/fgeck/pbs-k8s-backup","last_synced_at":"2026-01-16T04:47:42.517Z","repository":{"id":281730038,"uuid":"940548466","full_name":"fgeck/pbs-k8s-backup","owner":"fgeck","description":"Write backups of Kubernetes PVCs or Postgres Databases to a Proxmox Backup Server","archived":false,"fork":false,"pushed_at":"2026-01-10T12:43:15.000Z","size":198,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-01-11T03:56:02.774Z","etag":null,"topics":["backup","kubernetes","postgresql","proxmox"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fgeck.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-02-28T11:20:49.000Z","updated_at":"2025-09-02T12:19:53.000Z","dependencies_parsed_at":"2025-03-10T21:31:16.008Z","dependency_job_id":"bbd76e34-6526-4dac-9c6f-a0e13389e45d","html_url":"https://github.com/fgeck/pbs-k8s-backup","commit_stats":null,"previous_names":["fgeck/pbs-k8s-backup"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/fgeck/pbs-k8s-backup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgeck%2Fpbs-k8s-backup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgeck%2Fpbs-k8s-backup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgeck%2Fpbs-k8s-backup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgeck%2Fpbs-k8s-backup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fgeck","download_url":"https://codeload.github.com/fgeck/pbs-k8s-backup/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgeck%2Fpbs-k8s-backup/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28477210,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T03:13:13.607Z","status":"ssl_error","status_checked_at":"2026-01-16T03:11:47.863Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["backup","kubernetes","postgresql","proxmox"],"created_at":"2026-01-16T04:47:42.458Z","updated_at":"2026-01-16T04:47:42.502Z","avatar_url":"https://github.com/fgeck.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PBS Kubernetes Backup\n\nA docker image which can be used to backup Pvcs or a Postgresql to PBS. Telegram notification will be sent on failure.\n\n## How to use\n\n### Backup Postgres\n\n\u003e [!IMPORTANT]\n\u003e Check the required environment variables in the respective Bash script. They must be passed to the container e.g. via secret.\n\nFollowing CronJob will dump the postgres to a temp dir, upload the content to PBS and deletes the backup from the temp dir. The script will write to `/backup`.\n\n```yaml\n---\napiVersion: batch/v1\nkind: CronJob\nmetadata:\n  name: default-postgres-backup\n  namespace: default\nspec:\n  schedule: \"0 23 * * *\"\n  jobTemplate:\n    spec:\n      template:\n        spec:\n          containers:\n          - name: pbs-k8s-backup\n            image: ghcr.io/fgeck/pbs-k8s-backup:latest\n            env:\n            - name: BACKUP_NAME\n              value: \"My-Postgresql\"  \n            envFrom:\n            - secretRef:\n                name: postgres-backup-secret\n            volumeMounts:\n            - name: temp-backup\n              mountPath: /backup\n            command: [\"/entrypoint.sh\", \"postgres\"]\n          restartPolicy: never\n          volumes:\n          - name: temp-backup\n            emptyDir:\n              sizeLimit: 6Gi\n```\n\nResult:\n\n![postgres_backup](./images/postgres_backup.png)\n\n### Backups PVCs\n\n\u003e [!IMPORTANT]\n\u003e Check the required environment variables in the respective Bash script. They must be passed to the container e.g. via secret.\n\nRunning my Kubernetes Cluster with K3s and local-path-provisioner I wanted a CronJob that backups all my dynamically provisioned PVCs to PBS.\n\nThe script will cd into `PVC_HOST_PATH` and back up all directories found there. When using local-path-provisioner this info can be found in the ConfigMap `local-path-config`.\n\nA CronJob would look as follows:\n\n```yaml\n---\napiVersion: batch/v1\nkind: CronJob\nmetadata:\n  name: default-postgres-backup\n  namespace: default\nspec:\n  schedule: \"0 23 * * *\"\n  jobTemplate:\n    spec:\n      template:\n        spec:\n          containers:\n          - name: pbs-k8s-backup\n            image: ghcr.io/fgeck/pbs-k8s-backup:latest\n            env:\n            - name: PROXMOX_BACKUP_SERVER_NAMESPACE\n              value: \"k3s/pvcs\"\n            - name: PVC_HOST_PATH\n              value: \u003cPVC_HOST_PATH\u003e # e.g. /opt/k3s/pvcs\n            envFrom:\n            - secretRef:\n                name: postgres-backup-secret\n            volumeMounts:\n            - name: pvcs\n              mountPath: /pvcs\n            command: [\"/entrypoint.sh\", \"pvcs\"]\n          restartPolicy: never\n          volumes:\n          - name: pvcs\n            hostPath:\n                path: \u003cPVC_HOST_PATH\u003e # e.g. /opt/k3s/pvcs\n                type: Directory\n```\n\nResult:\n\n![pvc_backups](./images/pvc_backup.png)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffgeck%2Fpbs-k8s-backup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffgeck%2Fpbs-k8s-backup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffgeck%2Fpbs-k8s-backup/lists"}