This is a tool for creating backups of github repositories.
- git (including lfs)
- Issues (including comments, close-state, assignees, labels, etc)
- Pull-Requests (including git base/head, comments, close/merge-state, assignees, labels, etc)
- Releases (including assets)
- Wiki
- Repo-Projects
- GitHub-Actions results
- Discussions
- Org-Projects
- No github account needed, but possible for faster downloads
- Structured and machine readable output
- Arguments can configure what gets downloaded
- Increments of existing backups are possible (and are faster than new backups)
- It handles ratelimits (by waiting once its reached) and pagination
- Optional on-save compression of result (
--gzip
)
Dependencies: python3 (3.11 was used for testing), python3-requests
python3 github-repo-backuper.py --help
python3 github-repo-backuper.py jan9103 github-repo-backuper
Notice: The github-API ratelimit seems to be IP-based and using it up might cause
other programs, such as GE-proton download-tools, to temporarely fail.
This issue can be reduced using --reserve-rate-limit 10
(or similar).
This repo also includes a webui for viewing (and maybe in the future starting) backups.
The implementation is focused on simplicity and small to medium sized repos.
Larger repos (tested with 4475 issues) can still be viewed, but rendering the issue-list serverside can take several minutes on a overloaded raspberry pi 4.
- User / Organisation list
- Repo list
- Repo overview (README, filelist)
- Issue/PR list (with state, name, label, author, and comment-count)
- Issue/PR detail view (with name, author, labels, assignees, description, reactions, comments, state, lock-state, etc)
- Release list
- Release details
- Release asset download
- File explorer
- Wiki viewer
- Repo-Project viewer
- Discussion list
- Discussion details
- View commit diffs
- View commit history
The UI is written in the nu script language (required).
numng can be used to download the dependencies automatically.
Manual dependency installation:
mkdir nulibs
curl "https://raw.githubusercontent.com/Jan9103/webserver.nu/main/webserver/mod.nu" -o nulibs/webserver.nu
- Copy the
nutils
directory from the nutils-repo intonulibs
Starting it:
nu webui.nu
usage: python3 [SCRIPT-NAME] --help
website | script-name | note(s) |
---|---|---|
https://code.google.com/archive | google-code-archive-backuper.py |
the api is rapidly deteriorating, so its 90% workarounds and might break again |