Skip to content

Automatic backup the specific Github repositories and/or branches

Notifications You must be signed in to change notification settings

xiaojias/git-backup

Repository files navigation

git-backup

Automaticly backup the specific Github repositories and/or branches.

deployment

  1. Install git and Initiate local repository; E.g:

yum install git

mkdir -p /git-backup/scripts

cd /git-backup/scripts

git init

git colone [email protected]:xiaojias/git-backup.git

mv ./git-backup/* /git-backup/scripts/

  1. Add to-be-backedup repository and branch into configuration file; E.g:

vim repo-branch-config.txt

  1. Clone the to-be-backedup reposigory into local repository;

  2. Create jobs in crontab; The jobs are similar to:

crontab -l

10 0 * * * /bin/sh /git-backup/scripts/git-backup-daily.sh 2>&1

15 0 1 * * /bin/sh /git-backup/scripts/git-backup-monthly.sh 2>&1

Constraints

  1. Organization name is hard code in Clone-repo.sh script.

About

Automatic backup the specific Github repositories and/or branches

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages