Skip to content
This repository has been archived by the owner on Sep 6, 2022. It is now read-only.

A backup script for GitHub repositories

License

Notifications You must be signed in to change notification settings

lnxd/docker-github-backup

 
 

Repository files navigation

GitHub backup script

This container contains a script, backup.py, for backing up GitHub repositories.

The script requires a GitHub token and a destination directory. It then uses the token to populate the destination directory with clones of all the repositories the token can access.

It is possible to set it to run on a schedule, and repeated runs only update the already existing backups and add new repositories, if any.

Installation

Installation can be completed via CA on Unraid.

Configuring

Create a token

For authorization you need to create a new personal GitHub token. You can do this from this page.

Step 1

When you click the Generate new token button you enter the token creation screen. Here you should give the token a descriptive name and choose its scopes, which basically determine what the token is allowed to do.

Step 2

To backup public and private repositories you need to select only the repo scope. If you have no need for private repositories just choose the public_repo scope.

Step 3

After clicking the Generate token button you're presented with the generated token. Remember to store it now, as GitHub won't show it to you anymore!

Final notes

If you notice any bugs, feel free to open an Issue or a pull request. For support with using this on Unraid, you can reach me best via the support thread on the Unraid Community Forums.

About

A backup script for GitHub repositories

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 65.5%
  • Shell 19.0%
  • Dockerfile 15.5%