{"id":20807097,"url":"https://github.com/druidfi/git-backupper","last_synced_at":"2025-05-07T05:11:47.155Z","repository":{"id":148147661,"uuid":"616805932","full_name":"druidfi/git-backupper","owner":"druidfi","description":"Backup Git repositories and sync them to S3 compliant storage","archived":false,"fork":false,"pushed_at":"2024-06-17T11:28:24.000Z","size":49,"stargazers_count":11,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-07T05:11:41.324Z","etag":null,"topics":["backups","bash-script","git","github","s3"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/druidfi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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":"2023-03-21T05:44:43.000Z","updated_at":"2024-06-17T11:28:27.000Z","dependencies_parsed_at":"2024-06-17T12:59:04.859Z","dependency_job_id":null,"html_url":"https://github.com/druidfi/git-backupper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/druidfi%2Fgit-backupper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/druidfi%2Fgit-backupper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/druidfi%2Fgit-backupper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/druidfi%2Fgit-backupper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/druidfi","download_url":"https://codeload.github.com/druidfi/git-backupper/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252817647,"owners_count":21808707,"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":["backups","bash-script","git","github","s3"],"created_at":"2024-11-17T19:30:58.562Z","updated_at":"2025-05-07T05:11:47.132Z","avatar_url":"https://github.com/druidfi.png","language":"Shell","readme":"# Git Backupper\n\nBackup organization's GitHub repositories with Github CLI.\n\n- Clones repository with --mirror mode\n- Clones repository wiki if exists\n- Gets repository issues as JSON\n- Creates tar.gz archive file\n- Sync backup archives to S3 bucket\n\n## Requirements\n\n- Github CLI\n- jq\n- awscli\n\nNote: all these are pre-installed on Github Action runners and in Docker image (see below).\n\n## Usage\n\nThese scripts can be used with e.g. CI workflow, Docker container or as it is:\n\n```console\nGH_OWNER=myorg GH_LIST_LIMIT=5 ./backup.sh\n```\n\n```console\nS3_BUCKET=mybucket AWS_ACCESS_KEY_ID=mykey AWS_SECRET_ACCESS_KEY=mysecret ./s3.sh\n```\n\nTo some S3-compliant service e.g. UpCloud:\n\n```console\nS3_BUCKET=mybucket S3_REGION=europe-1 ENDPOINT_URL=https://foobar.upcloudobjects.com AWS_ACCESS_KEY_ID=mykey AWS_SECRET_ACCESS_KEY=mysecret ./s3.sh\n```\n\nSee [Github workflow](.github/workflows/backup.yml) to see how to use with Github Actions workflow.\n\n## Environment variables\n\nFor `backup.sh`:\n\n| Name           | Value   | Description                     |\n|----------------|---------|---------------------------------|\n| GH_TOKEN       |         | Specific token to use           |\n| GH_OWNER       | octocat | GitHub organization             |\n| GH_LIST_LIMIT  | 100     | How many repositories to backup |\n| GIT_CLONE_MODE | ssh     | Clone using ssh or https        |\n\nFor `s3.sh`:\n\n| Name                  | Value                            | Description                  |\n|-----------------------|----------------------------------|------------------------------|\n| S3_BUCKET             |                                  | Target S3 bucket for backups |\n| AWS_ACCESS_KEY_ID     |                                  | awscli credential            |\n| AWS_SECRET_ACCESS_KEY |                                  | awscli credential            |\n| AWSCLI_FLAGS          | --only-show-errors --no-progress | Flags for awscli             |\n| S3_REGION             | eu-central-1                     | Default region               |\n\n## Docker image\n\nUse prebuild image:\n\n```console\ndocker run -ti --rm -e GH_TOKEN=YOUR_PAT -e GH_OWNER=myorg -e GH_LIST_LIMIT=5 \\\n  -v `pwd`/backups:/app/backups ghcr.io/druidfi/git-backupper\n```\n\nBuild image as `git-backupper:latest`:\n\n```console\ndocker build . --progress plain -t git-backupper\n```\n\n## TODO\n\n- Add S3 script running to Docker image\n- Possibility to backup custom repositories\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdruidfi%2Fgit-backupper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdruidfi%2Fgit-backupper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdruidfi%2Fgit-backupper/lists"}