Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Subversion: Is there anything faster than "svnsync"?

So I have my subversion repository stored on some cloud (for example code.google.com) but due to various reasons I need to make my code non-public.

I decided I needed to download the entire repository and migrate to my own svn server.

So I went about using:

svnsync init DEST SRC
svnsync sync DEST

And it took about 0.5 seconds for each revision of the repo!

Luckily my repo only had like 200 revisions... so a couple of minutes to wait. But what about mature projects that have 200,000 or 2,000,000 revisions!

... 2e6 * 0.5 / 60 / 60 / 24 ~ about 11 days!


Is there anything faster than "svnsync" to download your repo from a cloud?

like image 948
Trevor Boyd Smith Avatar asked Feb 08 '10 03:02

Trevor Boyd Smith


1 Answers

I have this same problem in my collection of repositories that have hundreds of thousands of revisions. Here is how I get around it:

  1. Create empty repository on mirror.
  2. Create a gziped dump file of my repository. (my backup system already does this) (note: this step took overnight to send my giant repository across continent)
  3. scp (or your favorite remote file copy technique), the dump file to the mirror server.
  4. Load repository, making sure to specify --force-uuid.
  5. Set up the revprops on revision 0. I just took a normally configured blank repository and looked at its rev 0.

Now you are ready to run svnsync on your master server. This will continue from wherever your dump left off at.

like image 85
Mike Miller Avatar answered Sep 21 '22 07:09

Mike Miller