About
backup-my-hub is my take at a simple command line tool to backup
-
both Git repositories and gists
-
for a given list of GitHub users, organizations or repositories
to a given local directory.
I started backup-my-hub because I moved most of my Git repositories to GitHub and wanted to be sure that if my account or some repository of mine ever gets deleted or blocked, I would have a backup.
Configuration
Configuration is rather simple, though a bit unusual. I picked this format for extensibility:
# cat ~/.config/backup-my-hub/main.cfg [user hartwork] [user gentoo-ev] [repository gentoo/blender-gentoo-logo] [repository gentoo/blender-gentoo-logo-overlay] [repository gentoo/eassign] [repository gentoo/elogv] [repository gentoo/fetchcommandwrapper] [repository gentoo/grub2-themes-overlay] [repository gentoo/porticron]
--help
output)
Usage (# backup-my-hub --help usage: backup-my-hub [-h] [--config FILE] [--user USER] [--verbose] [--api-token TOKEN] [--version] DIRECTORY positional arguments: DIRECTORY Local directory to sync repositories and gists to optional arguments: -h, --help show this help message and exit --config FILE Configuration file to use (default: ~/.config/backup-my- hub/main.cfg, if existing) --user USER GitHub user name; if given, configured users and repositories are ignored --verbose Increase verbosity --api-token TOKEN Authenticate to the API server (e.g. to push rate limits) --version show program's version number and exit
Alternatives
If you are looking for software doing similar things but in different ways, there are:
-
github-sync (of knu)
-
github-sync (of adw0rd), fork of ghsync