github-backup is a simple shellscript that uses the
module to backup all the GitHub repositories of one or more Unix users
on your system.
This backup script depends on the Git::Megapull CPAN module (version 0.101750 or later) to do its work. To install it do:
cpanm -S Git::Megapull
To install this program arrange for it to be unpacked in your
you can do this by checking it out from git:
cd /etc sudo git clone git://github.com/avar/github-backup.git
Or if your
/etc itself is in git (as mine is) you can add it as a
cd /etc sudo git submodule add git://github.com/avar/github-backup.git github-backup git commit -m"Add github-backup submodule"
Running it periodically
github-backup periodically simply run it via
systems which have configured
/etc/cron.daily directory simply do:
sudo ln -s /etc/github-backup/github-backup /etc/cron.daily/github-backup
If you've just created a user
avar on your system and want to back
up his GitHub repositories you should first. set the GitHub
token for that user, then
root user do:
# . /etc/github-backup/github-backup.conf # cd $GITHUB_BACKUP_DIRECTORY # mkdir avar # chown avar avar
And you're done,
github-backup will run the equivalent of
avar -H git config github.token to grab the token for
backup all of his repositories.
Please report any to the github-backup issue tracker on GitHub.
Ævar Arnfjörð Bjarmason email@example.com