This is an old revision of the document!
To do backup on existing git repo please follow steps below.
Login to master machine.
Considering you already have key based access between master and backup server.
git remote -v
cd $HOME git --bare init --shared test.git
after you taste your login.
cd ~/test.git git remote add --mirror git@backup.k2patel.com:test.git cat .git/config
Result of last line should should contain text like the next block.
# [remote "Backup"] # url = git@backup.k2patel.com:test.git # fetch = +refs/*:refs/* # mirror = true