{"id":41106317,"url":"https://github.com/ebiiim/gitbackup","last_synced_at":"2026-01-22T15:19:30.242Z","repository":{"id":64298022,"uuid":"566230019","full_name":"ebiiim/gitbackup","owner":"ebiiim","description":"A Kubernetes Operator for scheduled backup of Git repositories.","archived":false,"fork":false,"pushed_at":"2025-01-22T11:05:30.000Z","size":164,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-22T12:21:46.683Z","etag":null,"topics":["backup","git","kubernetes","operator"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ebiiim.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-11-15T08:33:30.000Z","updated_at":"2025-01-22T11:05:34.000Z","dependencies_parsed_at":"2023-01-15T09:00:50.998Z","dependency_job_id":null,"html_url":"https://github.com/ebiiim/gitbackup","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/ebiiim/gitbackup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebiiim%2Fgitbackup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebiiim%2Fgitbackup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebiiim%2Fgitbackup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebiiim%2Fgitbackup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ebiiim","download_url":"https://codeload.github.com/ebiiim/gitbackup/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ebiiim%2Fgitbackup/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28665056,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T14:01:31.714Z","status":"ssl_error","status_checked_at":"2026-01-22T13:59:23.143Z","response_time":144,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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","git","kubernetes","operator"],"created_at":"2026-01-22T15:19:30.137Z","updated_at":"2026-01-22T15:19:30.233Z","avatar_url":"https://github.com/ebiiim.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Git Backup Operator\n\n[![GitHub](https://img.shields.io/github/license/ebiiim/gitbackup)](https://github.com/ebiiim/gitbackup/blob/main/LICENSE)\n[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/ebiiim/gitbackup)](https://github.com/ebiiim/gitbackup/releases/latest)\n[![CI](https://github.com/ebiiim/gitbackup/actions/workflows/ci.yaml/badge.svg)](https://github.com/ebiiim/gitbackup/actions/workflows/ci.yaml)\n![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/ebiiim/gitbackup)\n[![Go Report Card](https://goreportcard.com/badge/github.com/ebiiim/gitbackup)](https://goreportcard.com/report/github.com/ebiiim/gitbackup)\n[![codecov](https://codecov.io/gh/ebiiim/gitbackup/branch/main/graph/badge.svg)](https://codecov.io/gh/ebiiim/gitbackup)\n\nA [Kubernetes Operator](https://kubernetes.io/docs/concepts/extend-kubernetes/operator/) for scheduled backup of Git repositories.\n\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n\n- [Overview](#overview)\n- [Getting Started](#getting-started)\n  - [Installation](#installation)\n  - [Backup a Git repository with a `Repository` resource](#backup-a-git-repository-with-a-repository-resource)\n  - [Backup many Git repositories with a `Collection` resource](#backup-many-git-repositories-with-a-collection-resource)\n  - [Uninstallation](#uninstallation)\n- [Developing](#developing)\n  - [Prerequisites](#prerequisites)\n  - [Run a development cluster with kind](#run-a-development-cluster-with-kind)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n## Overview\n\n1. You create a `Repository` resource.\n2. The Operator creates a `CronJob` resource from it.\n3. The `CronJob` does the actual work.\n\n```yaml\napiVersion: gitbackup.ebiiim.com/v1beta1\nkind: Repository\nmetadata:\n  name: repo1\nspec:\n  src: https://github.com/ebiiim/gitbackup\n  dst: https://gitlab.com/ebiiim/gitbackup\n  schedule: \"0 6 * * *\"\n  gitCredentials:\n    name: repo1-secret # specify a Secret resource in the same namespace\n```\n\n## Getting Started\n\nSupported Kubernetes versions: __1.21 or higher__\n\n### Installation\n\nMake sure you have [cert-manager](https://cert-manager.io/) deployed, as it is used to generate webhook certificates.\n\n```sh\nkubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.10.0/cert-manager.yaml\n```\n\n\u003e ⚠️ You may have to wait a second for cert-manager to be ready.\n\nDeploy the Operator with the following command. It creates `gitbackup-system` namespace and deploys CRDs, controllers and other resources.\n\n```sh\nkubectl apply -f https://github.com/ebiiim/gitbackup/releases/download/v0.2.1/gitbackup.yaml\n```\n\n### Backup a Git repository with a `Repository` resource\n\nFirst, create a `Secret` resource that contains `.git-credentials`.\n\t\n```sh\nkubectl create secret generic repo1-secret --from-file=$HOME/.git-credentials\n```\n\nNext, create a `Repository` resource.\n\n```yaml\napiVersion: gitbackup.ebiiim.com/v1beta1\nkind: Repository\nmetadata:\n  name: repo1\nspec:\n  src: https://github.com/ebiiim/gitbackup\n  dst: https://gitlab.com/ebiiim/gitbackup\n  schedule: \"0 6 * * *\"\n  gitCredentials:\n    name: repo1-secret\n```\n\nFinally, confirm that resources has been created.\n\n```\n$ kubectl get repos\nNAME    AGE\nrepo1   5s\n\n$ kubectl get cronjobs\nNAME              SCHEDULE    SUSPEND   ACTIVE   LAST SCHEDULE   AGE\ngitbackup-repo1   0 6 * * *   False     0        \u003cnone\u003e          5s\n```\n\n\u003e 💡 You can test the `CronJob` by manually triggering it.\n\u003e \n\u003e ```sh\n\u003e kubectl create job --from=cronjob/\u003cname\u003e \u003cjob-name\u003e\n\u003e ```\n\n### Backup many Git repositories with a `Collection` resource\n\nFirst, create a `Secret` resource that contains `.git-credentials`.\n\t\n```sh\nkubectl create secret generic coll1-secret --from-file=$HOME/.git-credentials\n```\n\nNext, create a `Collection` resource.\n\n```yaml\napiVersion: gitbackup.ebiiim.com/v1beta1\nkind: Collection\nmetadata:\n  name: coll1\nspec:\n  schedule: \"0 6 * * *\"\n  gitCredentials:\n    name: coll1-secret\n  repos:\n    - name: gitbackup\n      src: https://github.com/ebiiim/gitbackup\n      dst: https://gitlab.com/ebiiim/gitbackup\n    - name: foo\n      src: https://example.com/src/foo\n      dst: https://example.com/dst/foo\n    - name: bar\n      src: https://example.com/src/bar\n      dst: https://example.com/dst/bar\n```\n\nFinally, confirm that resources has been created.\n\n```\n$ kubectl get colls\nNAME    AGE\ncoll1   5s\n\n$ kubectl get repos\nNAME                AGE\ncoll1-bar           5s\ncoll1-foo           5s\ncoll1-gitbackup     5s\n\n$ kubectl get cronjobs\nNAME                        SCHEDULE    SUSPEND   ACTIVE   LAST SCHEDULE   AGE\ngitbackup-coll1-bar         2 6 * * *   False     0        \u003cnone\u003e          5s\ngitbackup-coll1-foo         1 6 * * *   False     0        \u003cnone\u003e          5s\ngitbackup-coll1-gitbackup   0 6 * * *   False     0        \u003cnone\u003e          5s\n```\n\n\u003e 💡 Each job runs one minute apart.\n\n### Uninstallation\n\nDelete the Operator and resources with the following command.\n\n```sh\nkubectl delete -f https://github.com/ebiiim/gitbackup/releases/download/v0.2.1/gitbackup.yaml\n```\n\n## Developing\n\nThis Operator uses [Kubebuilder](https://github.com/kubernetes-sigs/kubebuilder) (v3.8.0), so we basically follow the Kubebuilder way. See the [Kubebuilder Documentation](https://book.kubebuilder.io/introduction.html) for details.\n\n### Prerequisites\n\nMake sure you have the following tools installed:\n\n- Git\n- Make\n- Go\n- Docker\n\n### Run a development cluster with [kind](https://kind.sigs.k8s.io/)\n\n```sh\n./hack/dev-kind-reset-cluster.sh # create a K8s cluster `kind-gitbackup`\n./hack/dev-kind-deploy.sh # build and deploy the Operator\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Febiiim%2Fgitbackup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Febiiim%2Fgitbackup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Febiiim%2Fgitbackup/lists"}