I am moving some svn repositories to Git. So, what I basically try to do is this:
- Setup one server with bare Git repositories from which I will pull and push to
- Setup a few backup servers for all of my repositories that are on the 1st server.
So, let's say i have a directory on my server, like: $HOME/git/
, which has bare repositories. Eg:
~/git/project1.git
~/git/project2.git
~/git/project3.git
...
My backup servers may be mirrors to this server, or keep the backed up data in archives or whatever. I suppose I can do something like:
git clone --bare ssh://gitserver/~user/git/projectX.git
Or maybe:
$ cd ~/git/project1.git
$ git bundle create ~/gitbackup/project1.bdl --all
and then copy all bundles from all projects to my backup servers.
However, having a lot of projects either strategy would be a tedious task, so in each case I would need to make some scripts to automate the task.
I wonder how are you guys doing this? Maybe there is some better way to do it than what I considered already. Any tip would be appreciated.