Move Your SVN Repository to rsync.net!
I’ve been keeping my Documents directory in Subversion (SVN) for a while now, and have found the ability to roll-back changes and view document history on any document I have to be a huge benefit to my workflow. Additionally, being able to keep different workstations in sync by using the SVN service has been a huge lifesaver.
Not only can I tell you what I worked on, and on what days, I can tell you when things were added/moved/archived and give myself a nice timeline of events that I can use to see what exactly I’ve accomplished over the last week/month/year.
So I’ve been re-organizing my bits lately, and am pulling an OS X Server fileserver out of “production” and have replaced it with an Infrant ReadyNAS NV+ with 2TB of storage online. I’m using their expandable RAID-X service, so I can bump this unit out past 3TB when I need to. This means I was going to lose my always-on multi-purpose server, however, so I was thinking about moving my SVN setup to my colo (that is currently serving you this webpage), but rsync.net (whom I love and recommend whole-heartedly for offsite backup/fileservice) have recently started supporting SVN (via ssh(1)) making it a real no-brainer.
This isn’t a dispatch solely to extoll the virtues of rsync.net—I’ll do that another time though, because they seriously are some of the most amazing people I’ve ever done business with. They happen to be the best in the industry as far as I’m concerned, and since I like the best of things, I use ‘em. And this new service they’re offering makes them even more attractive and reinforces my belief that I was wise to start using them.
Now, onward to the meat and potatoes. I did some testing and verified this works in my environment, and one of the excellent techs at rsync.net (seriously, you can’t beat these guys in any way for service provided, ethics, and support) validated my work and got me all squared away.
It turns out that all you need to do is move your existing repository (the actual directory of the repository on the filesystem) to your rsync.net home directory (or wherever you want to put it there—I called mine SVN-REWL on rsync.net ‘cuz that’s what I called it locally) and then aim your SVN commands yonder instead of the old one. It’ll Just Work provided you’re using the right version of SVN, I had an older repository I tested and it wouldn’t work due to db incompatibilities and some other harsh language.
Some people use local filesystem repositories even on their local machine just to have the version control and revision history on documents they work on. So if you’re one of those people, you can likewise just copy over the repository to your rsync.net account, and you’ll be ready to move on as well. This is pretty easy though I had never done it before, so I was a bit pensive and skittish.
When you’re in your SVN working copy, which is the local “live” version you work out of, be it documents, audio files, source code, headers, and all the other crap you can throw into SVN, you can open up a Terminal and do
svn info
…which will tell you all about your working copy, where you got it from, what the revision is, the URL and repository root, and other information.
In my case, it looked a lot like this:
.—-—-—-—-—-—-—-—-—-(rewl@cosmo)
`—> svn info
Path: .
URL: svn+ssh://cosmo/Volumes/projects/SVN-REWL
Repository Root: svn+ssh://cosmo/Volumes/projects/SVN-REWL
Repository UUID: 6cc96013-d40f-0410-a444-e0d3ce12975d
Revision: 179
Node Kind: directory
Schedule: normal
Last Changed Author: rewl
Last Changed Rev: 179
Last Changed Date: 2007-05-22 15:59:45 -0400 (Tue, 22 May 2007)
I fired up Fugu and copied over my SVN-REWL filesystem off cosmo (the household fileserver) to my rsync.net account via sftp, which took around an hour to do on my craptastic cable modem. Maybe two hours. I don’t really remember, I was busy catching up on email and feeds. Once it was there, I fired up svnX and set it up to browse my new copy of my repository.
FYI, this is the syntax you’ll want to use, if you’re on usw-s001 like I am:
svn+ssh://(userid)@usw-s001.rsync.net/(userid)/SVN-REWL
I told svnX that my username was 1096, which should be superfluous since you’re specifying one. I use ssh-agent and ssh keys, so I don’t need to give it a password, and I could instantly browse my newly-copied remote SVN repository. I browsed, reloaded, looked at old revisions, until I was satisfied.
But now what? Do I want to check out the entire thing again just to sync my local working copy against it? That sounds a bit counter-productive, don’t you think?
Of course SVN has a way to deal with just such an eventuality.
Go to your working copy and type in something like this (you’ll see what to do):
svn switch—relocate svn+ssh://cosmo/Volumes/projects/SVN-REWL \
svn+ssh://(userid)@usw-s001.rsync.net/(userid)/SVN-REWL
And svn’ll grind away for a while and make that change happen for you. Future update/stat/commit operations are successfully done against the rsync.net repository, and as expected, my output from svn info looks like this now:
.—-—-—-—-—-—-—-—-(emory@daydreamer)-
`—> svn info
Path: .
URL: svn+ssh://1096@usw-s001.rsync.net/1096/SVN-REWL
Repository Root: svn+ssh://1096@usw-s001.rsync.net/1096/SVN-REWL
Repository UUID: 6cc96013-d40f-0410-a444-e0d3ce12975d
Revision: 179
Node Kind: directory
Schedule: normal
Last Changed Author: rewl
Last Changed Rev: 179
Last Changed Date: 2007-05-22 15:59:45 -0400 (Tue, 22 May 2007) rewlLast Changed Rev: 179Last Changed Date: 2007-05-22 15:59:45 -0400 (Tue, 22 May 2007)
So there you have it. Moving an SVN repository to rsync.net really is painless.
Right now rsync.net is perfect for people who keep projects or documents in SVN like I do, but they don’t yet have the facility in place to allow other users to access your repository, only you. I think they’re going to be adding basic auth soon, which would allow workgroups to use rsync.net for svn and remote storage, which makes rsync.net once again more attractive than the others out there.
Thank you to the support tech that answered my questions on a Sunday afternoon 15 minutes after I sent an email. On a holiday weekend. You made my day.



















