Skip to content

orellazri/github-backup

Repository files navigation

GitHub Backup

Easily back up your GitHub repositories to a compressed tar file

Push Image

Running

Running with Docker (Recommended)

The recommended way is to use Docker to start a container that runs this program.

docker run --rm \
    -e GITHUB_USERNAME="..." \
    -e GITHUB_ACCESS_TOKEN="..." \
    -e ... \
    -v $(pwd):/backups \
    reaperberri/github-backup

Running with Python

Clone the repository and run:

pip3 install -r requirements.txt
# export environment variables here like so:
# export DESTINATION_DIR=...
python3 main.py

Environment Variables

Name Description Example
GITHUB_USERNAME Your GitHub username orellazri
GITHUB_ACCESS_TOKEN Your personal access token ...
EXCLUDE_REPOS_LIST (Optional) Comma-separated list of repositories to exclude repo1,repo2
EXCLUDE_FORKS (Optional) Whether to ignore forks you made True
DESTINATION_DIR (Optional) Directory to put the archived file into. Should only use if not running within a container! /backups

About

Back up your GitHub account to a tar file

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published