GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - carnivuth/github_sync: handy script to clone public repositories from a github account for backups that runs on docker container

BranchesTags
Open more actions menu

Latest commit

 

History

22 Commits
22 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
.gitignore
.gitignore
 
 
Dockerfile
Dockerfile
 
 
crontab
crontab
 
 
github_sync.sh
github_sync.sh
 
 
readme.md
readme.md
 
 
start.sh
start.sh
 
 

Repository files navigation

Github sync

A handy script for backupping public repos from a github account :) (it's just my fear of loosing data :c ).

Why this

DO BACKUPS!! this is what as been told to me since i started doing system administration tasks and projects. So i wrote this script moved by the fear of losing github repositories (as if my hard drives were more reliable than microsoft ones), originally designed to run as a cron job.

Recently i have migrated my homelab services to a configuration managed with ansible and terraform and i found myself dealing with a lot of scripts like this one that were not designed to be ported from a machine to another and the idea comes to mind:

What if i put a cron script inside a docker container?

and this abomination was born :)

How it works

The script runs as a cron job, it fetches the github api to download the list of public repos and downloads them, then it curls the configured monitoring api.

sequenceDiagram
participant github
participant github_sync
participant monitoring_tool
github_sync ->> github: pull repository list
loop public repositories
github_sync ->> github: clone repository
end
github_sync ->> monitoring_tool: notify status
Loading

Installation

Installation is done trough docker container a sample can be as follows

services:
  github_sync:
    container_name: github_sync
    image: carnivuth/github_sync:latest
    environment:
      HEALTHCHECK: "[HEALTHCHECKS.IO URL]"
      NTFY: "[NTFY URL]"
      ACCOUNT: "[GITHUB USERNAME TO BACKUP]"
    volumes:
      - "<data folder>:/var/lib/github_sync"
      - "/etc/timezone:/etc/timezone:ro"
      - "/etc/localtime:/etc/localtime:ro"

About

handy script to clone public repositories from a github account for backups that runs on docker container

Topics

backupbackup-scriptdockerdocker-composegithubrepository

Resources

Readme
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.