umputun / github-backup-docker

Docker wrapper for github-backup

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

github-backup-docker Docker Automated build

Dockerized version of python-github-backup with extra automation. This container makes a backup daily and keeps up to defined number of backups.

Install and run

  1. Generate github access token. Give it a repo scope with full access to repositories.
  2. Get provided docker-compose.yml. If needed change the mapping for volumes and MAX_BACKUPS number
  3. Change TZ (see the list)
  4. Set TOKEN (in environment or directly in docker-compose.yml)
  5. Set GITHUB_USER (Github user accounts) and/or GITHUB_ORG (Github Organizations; make sure the user token has access to the organization). If you have multiple users/organizations, you can list thme separating names by a comma.
  6. Run docker-compose up -d to initiate daily backup

Customize Backup Options

The underlying python-github-backup library has a lot of options to customize what is backed up from github.

We can customize this by using the BACKUP_OPTIONS environment variable. By default, the container will backup everything and uses --private --all --gist. That will backup the repositories, issues, pull requests, labels, etc.

If you wanted to customize this to only backup the repository code (including private repositories), you could define the following on your docker-compose.yml file's environment:

BACKUP_OPTIONS=--private --repositories

Prepared images

Build from the source

  1. Clone this repo
  2. run docker-compose build

About

Docker wrapper for github-backup

License:MIT License


Languages

Language:Shell 86.6%Language:Dockerfile 13.4%