{"id":23340128,"url":"https://github.com/sierrasoftworks/github-backup","last_synced_at":"2026-03-10T11:14:17.736Z","repository":{"id":247678348,"uuid":"826455622","full_name":"SierraSoftworks/github-backup","owner":"SierraSoftworks","description":"Automatically backup your GitHub repositories","archived":false,"fork":false,"pushed_at":"2026-03-05T00:36:04.000Z","size":2493,"stargazers_count":26,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-03-05T04:59:36.499Z","etag":null,"topics":["backup","disaster-recovery","git","github-backup"],"latest_commit_sha":null,"homepage":"https://github-backup.sierrasoftworks.com/","language":"Rust","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/SierraSoftworks.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-07-09T18:34:04.000Z","updated_at":"2026-03-05T00:36:08.000Z","dependencies_parsed_at":"2024-10-23T06:55:03.322Z","dependency_job_id":"2a06b911-44ce-4425-a754-91f5a1af3ea4","html_url":"https://github.com/SierraSoftworks/github-backup","commit_stats":null,"previous_names":["sierrasoftworks/github-backup"],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/SierraSoftworks/github-backup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SierraSoftworks%2Fgithub-backup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SierraSoftworks%2Fgithub-backup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SierraSoftworks%2Fgithub-backup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SierraSoftworks%2Fgithub-backup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SierraSoftworks","download_url":"https://codeload.github.com/SierraSoftworks/github-backup/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SierraSoftworks%2Fgithub-backup/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30331810,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T05:25:20.737Z","status":"ssl_error","status_checked_at":"2026-03-10T05:25:17.430Z","response_time":106,"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","disaster-recovery","git","github-backup"],"created_at":"2024-12-21T04:19:41.303Z","updated_at":"2026-03-10T11:14:17.722Z","avatar_url":"https://github.com/SierraSoftworks.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitHub Backup\n\n**Automatically backup your GitHub repositories to your local machine.**\n\nThis tool is designed to automatically pull the list of GitHub repositories from one, or more,\nGitHub organizations and clone (or fetch) them to your local machine. It is designed to be run\nas part of a scheduled backup process with the ultimate goal of ensuring that you have a local\ncopy of all of your GitHub repositories should the unthinkable happen.\n\n## Features\n\n- **Backup Multiple Organizations**, automatically gathering the full list of repositories for\n  each organization through the GitHub API.\n- **Backup Starred Repos**, automatically gathering the full list of your starred repositories\n- **Repo Allowlists/Denylists** to provide fine-grained control over which repositories are backed\n  up and which are not.\n- **GitHub Enterprise Support** for those of you running your own GitHub instances and not relying\n  on GitHub.com.\n\n## Example\n\n```bash\n# Run the tool directly\n./github-backup --config config.yaml\n\n# Or run it in a container\ndocker run \\\n  -v $(pwd)/config.yaml:/config.yaml \\\n  -v $(pwd)/backups:/backups \\\n  ghcr.io/SierraSoftworks/github-backup:main \\\n    --config /config.yaml\n```\n\n### Configuration\n\n```yaml\n# Run a backup every hour (will use `git fetch` for existing copies)\n# You can also omit this if you want to run a one-shot backup\nschedule: \"0 * * * *\"\n\nbackups:\n  - kind: github/repo\n    from: user # The user associated with the provided credentials\n    to: /backups/personal\n    credentials: !UsernamePassword { username: \"\u003cyour username\u003e\",  password: \"\u003cyour personal access token\u003e\" }\n    properties:\n      query: \"affiliation=owner\" # Additional query parameters to pass to GitHub when fetching repositories\n\n  - kind: github/repo\n    from: \"users/another-user\"\n    to: /backups/friend\n    credentials: !Token \"your_github_token\"\n\n  - kind: github/repo\n    from: \"orgs/my-org\"\n    to: /backups/work\n    filter: '!repo.fork \u0026\u0026 repo.name contains \"awesome\"'\n\n  - kind: github/release\n    from: \"orgs/my-org\"\n    to: /backups/releases\n    filter: '!release.prerelease \u0026\u0026 !asset.source-code'\n\n  # You can also backup single repositories directly if you wish\n  - kind: github/repo\n    from: \"repos/my-org/repo\"\n    to: /backups/work\n\n  # This is particularly useful for backing up release artifacts for\n  # specific projects.\n  - kind: github/release\n    from: \"repos/my-org/repo\"\n    to: /backups/releases\n    filter: '!release.prerelease'\n\n  # Backup all repositories starred by the currently authenticated user\n  - kind: github/repo\n    from: \"starred\"\n    to: /backups/starred/repos\n    credentials: !Token \"your_github_pat\"\n\n  # Backup all GitHub Gists for your authenticated user\n  - kind: github/gist\n    from: \"user\"\n    to: /backups/gists/user\n    credentials: !Token \"your_github_token\"\n\n  # Backup all Gists starred by the currently authenticated user\n  - kind: github/gist\n    from: \"starred\"\n    to: /backups/starred/gists\n    credentials: !Token \"your_github_pat\"\n\n  # Backup public GitHub Gist of another user\n  - kind: github/gist\n    from: \"users/another-user\"\n    to: /backups/gists/another-user\n```\n\n### OpenTelemetry Reporting\n\nIn addition to the standard logging output, this tool also supports reporting metrics to an\nOpenTelemetry-compatible backend. This can be useful for tracking the performance of the tool\nover time and configuring monitoring in case backups start to fail.\n\nConfiguration is conducted through the use of environment variables:\n\n```bash\nOTEL_EXPORTER_OTLP_ENDPOINT=https://your-otel-collector:4317\nOTEL_EXPORTER_OTLP_HEADERS=X-API-KEY=your-api-key\nOTEL_TRACES_SAMPLER=traceidratio\nOTEL_TRACES_SAMPLER_ARG=1.0\n```\n\n## Filters\n\nThis tool allows you to configure filters to control which GitHub repositories are backed up and\nwhich are not. Filters are used within the `backups` section of your configuration file and can\nbe specified on a per-user or per-organization basis.\n\nWhen writing a filter, the goal is to write a logical expression which evaluates to `true` when\nyou wish to include a repository and `false` when you wish to exclude it. The filter language supports\nseveral operators and properties which can be used to control this process.\n\n### Available filters\n\nFor `kind: github/repo` and `kind: github/star`\n\n| Field                  | Type       | Description (_Example_)                                                                            |\n|------------------------|------------|----------------------------------------------------------------------------------------------------|\n| `repo.name`            | `string`   | The name of the repository (_Hello-World_)                                                         |\n| `repo.fullname`        | `string`   | The full-name of the repository (_octocat/Hello-World_)                                            |\n| `repo.private`         | `boolean`  | Whether the repository is private                                                                  |\n| `repo.public`          | `boolean`  | Whether the repository is public                                                                   |\n| `repo.fork`            | `boolean`  | Whether the repository is a fork                                                                   |\n| `repo.size`            | `integer`  | The size of the repository, in kilobytes (_1024_).                                                 |\n| `repo.archived`        | `boolean`  | Whether the repository is archived                                                                 |\n| `repo.disabled`        | `boolean`  | Returns whether or not this repository disabled                                                    |\n| `repo.default_branch`  | `string`   | The default branch of the repository (_main_)                                                      |\n| `repo.empty`           | `boolean`  | Whether the repository is empty (When a repository is initially created, `repo.empty` is `true`)   |\n| `repo.template`        | `boolean`  | Whether this repository acts as a template that can be used to generate new repositories           |\n| `repo.forks`           | `integer`  | The number of times this repository is forked                                                      |\n| `repo.stargazers`      | `integer`  | The number of people starred this repository                                                       |\n\nFor `kind: github/release`\n\n| Field                 | Type       | Description (_Example_)                                            |\n|-----------------------|------------|--------------------------------------------------------------------|\n| `release.tag`         | `string`   | The name of the tag (_v1.0.0_)                                     |\n| `release.name`        | `string`   | The name of the release (_v1.0.0_)                                 |\n| `release.draft`       | `boolean`  | Whether the release is a draft (unpublished) release               |\n| `release.prerelease`  | `boolean`  | Whether to identify the release as a prerelease or a full release  |\n| `release.published`   | `boolean`  | Whether the release is a published (not a draft) release           |\n| `asset.name`          | `string`   | The file name of the asset (_github-backup-darwin-arm64_)          |\n| `asset.size`          | `integer`  | The size of the asset, in kilobytes. (_1024_)                      |\n| `asset.downloaded`    | `boolean`  | If the asset was downloaded at least once from the GitHub Release  |\n\nFor `kind: github/gist`\n\n| Field                   | Type      | Description                                    |\n|-------------------------|-----------|------------------------------------------------|\n| `gist.public`           | `boolean` | Whether the gist is public                     |\n| `gist.private`          | `boolean` | Whether the gist is private                    |\n| `gist.comments_enabled` | `boolean` | Whether comments are enabled for the gist      |\n| `gist.comments`         | `integer` | Number of comments on the gist                 |\n| `gist.files`            | `integer` | Number of files in the gist                    |\n| `gist.file_names`       | `array`   | List of file names in the gist                 |\n| `gist.languages`        | `array`   | List of programming languages used in the gist |\n| `gist.type`             | `string`  | Type of content in the gist                    |\n\n### Examples\n\nHere are some examples of filters you might choose to use:\n\n- `!repo.fork || !repo.archived || !repo.empty` - Do not include repositories which are forks, archived, or empty.\n- `repo.private` - Only include private repositories in your list.\n- `repo.public \u0026\u0026 !repo.fork` - Only include public repositories which are not forks.\n- `repo.name contains \"awesome\"` - Only include repositories which have \"awesome\" in their name.\n- `(repo.name contains \"awesome\" || repo.name contains \"cool\") \u0026\u0026 !repo.fork` - Only include repositories which have \"awesome\" or \"cool\" in their name and are not forks.\n- `!release.prerelease \u0026\u0026 !asset.source-code` - Only include release artifacts which are not marked as pre-releases and are not source code archives.\n- `repo.name in [\"git-tool\", \"grey\"]` - Only include repositories with the names \"git-tool\" or \"grey\".\n- `repo.stargazers \u003e= 5` - Only include repositories with at least 5 stars.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsierrasoftworks%2Fgithub-backup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsierrasoftworks%2Fgithub-backup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsierrasoftworks%2Fgithub-backup/lists"}