https://github.com/bitsbeats/github-backup-tool
A crunchy GitHub backup tool
https://github.com/bitsbeats/github-backup-tool
Last synced: 3 months ago
JSON representation
A crunchy GitHub backup tool
- Host: GitHub
- URL: https://github.com/bitsbeats/github-backup-tool
- Owner: bitsbeats
- License: apache-2.0
- Created: 2021-03-03T18:18:41.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-01-17T11:35:24.000Z (over 2 years ago)
- Last Synced: 2025-09-03T02:17:39.335Z (10 months ago)
- Language: Python
- Size: 71.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# github-backup-tool
BIG NOTE: This is a work-in-progress.
A crunchy tool for backing up repositories of multiple specified GitHub organizations.
## What does it do?
It will backup all Git repositories it has access to.
## What does it not do?
At this moment, it will not back up:
* Issues
* Comments
* Hooks
* ...
*Eventually*, backing up of these will be implemented.
## How to use?
1. Set up a GitHub token, with a "repo" scope.
2. Configure the `config.yaml` file accordingly.
3. Set up your running environment either via a virtualenv or distribution packages:
* virtualenv:
* Create a Python virtual environment via `virtualenv venv`
* Activate your `venv` via `source venv/bin/activate` (Consider the shell you are using, and adjuct this step accrodingly.)
* Install via `pip install github-backup-tool`
* distribution packages:
* [GitPython](https://github.com/gitpython-developers/GitPython), [GitPython@Repology](https://repology.org/project/python:gitpython/versions)
* [PyGithub](https://github.com/PyGithub/PyGithub), [PyGithub@Repology](https://repology.org/project/python:pygithub/versions)
* [PyYAML](https://pyyaml.org/), [PyYAML@Repology](https://repology.org/project/python:pyyaml/versions)
4. Run `gbt -c yourconfig.yaml`.
# TODOs:
- [x] Backup abandoned commits in master as a separate branch if commits were pushed to origin forcefully
- [ ] Backup issues
- [ ] Backup hooks
- [ ] Backup information of users, belonging to an organization
- [ ] Configuration: allow for ignoring of certain repositories
- [ ] Brainstorm about more ideas as to what to back up