https://github.com/schollz/github-backup
Backup all the repos from Github using the official API
https://github.com/schollz/github-backup
backup backup-script github-backup
Last synced: 8 months ago
JSON representation
Backup all the repos from Github using the official API
- Host: GitHub
- URL: https://github.com/schollz/github-backup
- Owner: schollz
- License: mit
- Created: 2020-08-20T19:18:03.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-08-21T15:21:53.000Z (over 5 years ago)
- Last Synced: 2025-04-19T23:34:08.635Z (8 months ago)
- Topics: backup, backup-script, github-backup
- Language: Python
- Homepage:
- Size: 7.81 KB
- Stars: 7
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# github-backup
As of [December, 2018](https://github.blog/2018-12-19-download-your-data/) you can download all your GitHub data with the click of a button. However, as of August 2020, this still won't work if you have too many repositories and will result in a unicorn page:

When I emailed support, they suggested to use [the official migration API](https://docs.github.com/en/rest/reference/migrations) to do the download.
So I wrote this python script to do just that. You can simply backup all the repos from Github using the official API.
## Usage
Before you start, make sure to get a `` that has admin priveleges, see [here](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token).
```
> python -m pip install loguru click requests tqdm
> wget https://raw.githubusercontent.com/schollz/github-backup/master/github-backup.py
> python github-backup.py --user schollz --token
```
## License
MIT