Moving Subversion repositories from Dreamhost to Mediatemple, Part 1by Guillermo A. Fisher
I recently created a Mediatemple (dv) hosting account, and am moving all of my sites over to it. I’ve still got some databases to move, and some WordPress installations to relocate, but I have successfully moved all of my most important Subversion repositories over. I rely on heavily on
svn, and wanted to make sure things were solid before I did any new development. Allow me to walk you through the process:
First, I did some Googling. OkCool had an awesome tutorial that covered a lot of the Dreamhost end of things, the Mediatemple KnowledgeBase — naturally — had some helpful information, and Electromute rounded things out with great information for the (dv) account. There was a bit of information that I had to contact support for, and that was related to the absence of Subversion on the server. As it turns out, installing “Developer Tools” — as is mentioned in the KnowledgeBase and on several other sites — does not install Subversion. You’ve gotta
yum it out. So, while logged into your Mediatemple account, assuming you’ve got a shell account (BaSh for this tutorial) setup, root access enabled, and Developer Tools installed, you wanna do this first:
yum install subversion
You’re going to be prompted with some questions, and you’re gonna want to agree to everything with a “y” (that is, at least, if you’re on Centos). Subversion will be installed and you’ll feel as though you’ve accomplished a great deal.
Next, you’ll want to follow the export instructions set out in the OkCool tutorial, but log in to your Dreamhost server so that you can do what I did and skip all that FTPing business by flexing your command line prowess:
for i in repo1 repo2 repo3; do svnadmin dump ~/svn/$i > ~/tmp/$i.dumpfile; scp ~/tmp/$i.dumpfile username@mediatempleIP:/var/www/vhosts/yoursite.com/httpdocs/dumps/; done
You can read more about BaSh at your leisure, but basically the code work as follows:
for i in item1 item2 item3... itemn; do some command; and possibly another one; and this one && that one on $i; done
So, what I’m doing in the code is explicitly listing out all of the subversion repositories I need moved over (because, honestly, I didn’t need all of them) and executing a series command for every item in that list.
Next, you’ll import the repositories. Stay tuned.Your Feedback Civil & constructive, please.