tags:

views:

160

answers:

2

I use a hosted subversion service for a number of personal and work development projects. While they keep backups like any hosting company should I'd like to be able to create my own local backups as well just in case. This service allows you to request and download a backup, but they charge money to do this. Is there anyway I can generate a backup/dump of my hosted repository by connecting to it as a client through HTTPS?

+1  A: 

Theoretically "no", as the dump can be only performed by svnadmin command. However, there's a non-trivial solution to circumvent that.

There are two ways, a simple one, and a hard one. The simple one is a utility called rsvndump (remote SVN dump), you can find it here: http://rsvndump.sourceforge.net/

If the simpler one doesn't work for you (rsvnadmin has it's limitations as written on it's manpage), there's the complex one:

The second harder method requires you to install SVK, a client for distributed version control, built using svn, as a extended client. Unfortunately the installation procedure is non-trivial, here's a guide to help though.

You now list the remote repository using SVK:

svk ls URL-to-SVN

Follow the instructions. Voila, you have a local copy of the repository :). The first two revisions are SVK related, so to do a dump now, you run:

svnadmin dump -r2:HEAD ~/.svk/local > repository.dump

And there you have it.

SVK has also the advantage of being prebuilt for windows (here's the link).

Kornel Kisielewicz
+3  A: 

You can use svnsync command. It will basically get every revision of a source SVN database and commit them to your backup database. It can be slow the first time you run it as it gets all the changes one at a time, but once the first sync was done it's a nice solution.

Martin
Note that `svnsync` requires the server to be running SVN version 1.4 or higher.
Craig McQueen