Looking at the relevant section of Version Control with Subversion, it looks like it should be easy. Just create a dumpfile on the old box and load it to a new repository on the new one.
So on the old box
$ svnadmin dump repos > dumpfileand copy the dumpfile onto the new box.
Last time I setup subversion + apache for HTTP access. This time I'm going to try svn+ssh.
As usual, Ubuntu provides a good general reference.
$ sudo apt-get install subversionSetup a subversion user and group, add myself to the group
$ sudo addgroup svnCreate the repository and load the dumpfile
$ sudo useradd -g svn -m -p <pwd> svn
$ sudo usermod -a -G svn <my_user>
$ sudo su svnI want svnserve process to start when the box boots, so I added this line to
$ cd /home/svn
$ svnadmin create repos
$ svnadmin load repos < dumpfile
sudo -u svn svnserve -d -r /home/svnI'll make a proper init.d script like this one later.
Restart the box
Verify I am a member of the svn group
$ groupsVerify that svnserve process started
$ ps -ef | grep svnserveVerify I can read the repository locally
$ svn list svn://localhost/repos/<project>/trunk
Setup access to the repository from Eclipse on my laptop
(I already have the subclipse plugin installed).
File / Import
Checkout Projects from SVN
Create a new repository location
That fails with an error dialog and this message on the console:
The system cannot find the file specified.
svn: Can't create tunnel: The system cannot find the file specified.
Back to Google... The answer is here.
The problem was that Eclipse was not configured with an SSH client. Quick fix for me was to switch the Eclipse / Team / SVN configuration from JavaHL (which requires external SSH client) to SVNKit (which includes one). Now it works.
Edit! Actually, not quite there yet...
On attempting to commit to the repository, I got error
svn: Commit failed (details follow):It turns out that svn+ssh does not connect to the svnserve daemon I started above, but rather creates a temporary svnserve process (on each invocation) as the ssh user. And in the setup above, the ssh user has read access to the repos, but not write access. (Just like if you use subversion + apache and don't make the repository writable by the www-data user).
svn: Can't create directory '/home/svn/repos/db/transactions/1-1.txn':
Temporary workaround (to commit my current work) is to make the whole repository writable by my ssh user
$ cd /home/svnNow the commit succeeds.
$ sudo chown <sshuser>:<sshuser> -R repos
Next task is to read the relevant section of the Subversion manual more carefully. My original setup above will support working with the repository using svn://<host>/repos. I might just go with that for now.