{"id":20216462,"url":"https://github.com/ucomesdag/github-backup","last_synced_at":"2026-05-05T16:31:52.802Z","repository":{"id":147599240,"uuid":"349720482","full_name":"ucomesdag/github-backup","owner":"ucomesdag","description":"Bash script to backup all your Github repositories.","archived":false,"fork":false,"pushed_at":"2024-08-16T12:12:25.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-13T22:18:04.877Z","etag":null,"topics":["backup","github"],"latest_commit_sha":null,"homepage":"https://mesd.ag/","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/ucomesdag.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"ucomesdag","buy_me_a_coffee":"ucomesdag"}},"created_at":"2021-03-20T12:36:17.000Z","updated_at":"2024-08-16T12:12:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"b32e1560-d591-4952-8880-1662f530294b","html_url":"https://github.com/ucomesdag/github-backup","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/ucomesdag%2Fgithub-backup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ucomesdag%2Fgithub-backup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ucomesdag%2Fgithub-backup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ucomesdag%2Fgithub-backup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ucomesdag","download_url":"https://codeload.github.com/ucomesdag/github-backup/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241653593,"owners_count":19997706,"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":["backup","github"],"created_at":"2024-11-14T06:28:12.100Z","updated_at":"2026-05-05T16:31:52.772Z","avatar_url":"https://github.com/ucomesdag.png","language":"Shell","funding_links":["https://github.com/sponsors/ucomesdag","https://buymeacoffee.com/ucomesdag"],"categories":[],"sub_categories":[],"readme":"# Github Backup\n\nBash script to backup all your Github repositories. All repositories are individually archived to a `.tar.bz2` archive and then gathered in a single archive. You can set the number of backups to keep and it supports `git-lfs`. Repositories can be restored to a new location with `git push --mirror \u003cremote\u003e` or accessed locally with `git bundle my-repo.bundle \u0026\u0026 git clone my-repo.bundle ../my-repo`.\n\n\n## Usage\n\n1. Create a [Github token](https://github.com/settings/tokens).\n\n   For users the scope should be `repo` (all) and for organizations `read:org`.\n\n2. Set it up.\n\n- Either export your settings prior to running the script:\n\n```\nexport GITHUB_USERNAME='github-username'\nexport GITHUB_API_TOKEN='github-token'\nexport GITHUB_ACCOUNT_TYPE='user'\nexport GITHUB_BACKUP_KEEP='5'\nexport GITHUB_BACKUP_DEST='/path/to/destination-of-the-backup'\n```\n\n- Or create a .config file in the script directory:\n\n```\nGITHUB_USERNAME='github-username'                       # github username or organization name\nGITHUB_API_TOKEN='github-token'                         # https://github.com/settings/tokens\nGITHUB_ACCOUNT_TYPE='user'                              # user -or- org (default: user)\nGITHUB_BACKUP_KEEP='5'                                  # number of backups to keep (default: 5)\nGITHUB_BACKUP_DEST='/path/to/destination-of-the-backup' # backup destination (default: script directory)\n```\n\n3. Make it executable:\n\n  ```\n  chmod +x github-backup.sh\n  ```\n\n4. Run it:\n\n  ```\n  ./github-backup.sh\n  ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fucomesdag%2Fgithub-backup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fucomesdag%2Fgithub-backup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fucomesdag%2Fgithub-backup/lists"}