svnsync to mirror a subversion repository

I learned today that http access to my svn server was restricted to the campus. I want to share to the world, as described

svnsync is supposed to make this possible. I've not done it before, seems more complicated than it is because of arcane terminology.

Good guides help:

About Dreamhost in particular

In the destination repo, I had to insert the hook file. From within the svn repo directory

$ cat hooks/pre-revprop-change


if [ "$USER" = "pauljohn32" ]; then exit 0; fi

echo "Changing revision properties other than svn:log is prohibited" >&2
exit 1
Because my source repo is behind the firewall and the outside system can't get to it, it is necessary to customize a bit.

$ FROMREPO=svn+ssh://
$ export TOREPO=svn+ssh://
$ svnsync init ${TOREPO} ${FROMREPO}'s password:
Copied properties for revision 0.

$ svnsync --non-interactive sync ${TOREPO}'s password:
Transmitting file data ..............
Committed revision 1.
Copied properties for revision 1.
Transmitting file data .....
Committed revision 2.
Copied properties for revision 2.
Transmitting file data ......................
Committed revision 3.
Copied properties for revision 3.
Transmitting file data ......
Committed revision 4.
Copied properties for revision 4.
Transmitting file data ....
Committed revision 5.
Copied properties for revision 5.
Transmitting file data .
Committed revision 6.
Copied properties for revision 6.
Transmitting file data ...............
Committed revision 7.
Copied properties for revision 7.

That copied the files into the svn folder in my account.

Dreamhost "goodies" (super easy) configurator has this set so I can check out copies through the http protocol. Mostly I intend that interface to be used for checkouts by read-only users, not developers.

For example, this allows a check out without the user giving any credentials.

$ svn co

The only part of this I have not figured out yet is how to easily/automatically get updates from to I'm not too worried, though, because I didn't think I'd get this far, and i did.

About pauljohn

Paul E. Johnson is a Professor of Political Science at the University of Kansas. He is an avid Linux User, an adequate system administrator and C programmer, and humility is one of his greatest strengths.
This entry was posted in Linux and tagged , , , , , , . Bookmark the permalink.