views:

273

answers:

2

I'm in the process of moving a bunch of my work from personal SVN repo's to git repo's. I've had a cron job setup that runs svnadmin dump every night on all my repos into a remote folder. Is there similar functionality in git?

Also, I don't fully understand git, so this logic is most likely wrong, but I kept all my svn repos under a single directory (/home/svn/), does git create a similar directory that I can just copy to a remote location? Or does it only store the snapshots in the .git directory?

+4  A: 

You can just use git clone. Note that git has no equivalent to svnadmin, as every git "working copy" (to use SVN terms) is a full repository.

Matthew Flaschen
A: 

There is no way (built in to git) to copy/mirror multiple repositories to a remote computer. Either your new cron job will have to clone/push each repository individually, you you could use another way to sync all the repositories. The repositories are just ordinary files, so if you keep them all in /srv/svn or similar, you could simply rsync that directory to another computer.

There might be issues with using rsync at the same time the repositories are being updated, but if this is for personal use you can probably pretty much guarantee that the repositories are "idle" during the night time or so.

calmh