Tuesday, October 19, 2010

Migrating svn

Tried a hot copy, but the svn server was a different version.
This caused lots of problems while trying to checkout / compare via eclipse.

So, what finally saved me was dumping / loading commands:
* svnadmin dump (like svnadmin dump /svn/incentto/salesrocket/ > /svn/salesrocket.svn_dump)
* scp the dump file locally (like  scp root@64.57.246.169:/svn/salesrocket.svn_dump /svn/salesrocket.svn_dump)
* svnadmin load (like svnadmin load /svn/incentto/salesrocket/ < /svn/salesrocket.svn_dump)

Worked great.  Also, I used yum to install svn.  That got a much more recent version of svn going since I'm moving everything.  Followed this tutorial http://wiki.centos.org/HowTos/Subversion

The commands to install: 

yum install mod_dav_svn subversion

Then some fancy stuff so I could browse the repos - but this didn't work
cd /etc/httpd/conf.d/
vim subversion.conf

Set the user and password for svn:
 htpasswd -m /svn/dav-svn.password salesrocket

Commands to create the repo before loading the dump file:

mkdir /svn/incentto/salesrocket
cd /svn/incentto/salesrocket
svnadmin create salesrocket
chown -R apache.apache salesrocket

Did dump as above.


Created user access:
cd /svn/incentto/salesrocket/conf
vim svnserve.conf (specified the passwd file)
vim passwd (added my salesrocket = mysecretpassword)

Migrating Apache-Tomcat virtual hosts

I made several changes at once, so it's possible some of these aren't needed.  However, the system seems to be working now and here's what I put.


First, a symbolic link for index home page...
ln -s /home/salesrocket/incentto.com/html/index.shtml /var/www/vhosts/incentto.com/httpdocs/index.html


This is because they moved me from cpanel typical file setup to plesk.  Fun.


--------------------------
Then, what probably got the setup to work was modifying the apache files.
The command vim /opt/tomcat/conf/server.xml allowed me to add some host tags.


        <Host name="preview.incentto.com" appBase="/opt/tomcat/webapps/IncenttoPRE">
                <Context path="" docBase="/opt/tomcat/webapps/IncenttoPRE"/>
        </Host>

        <Host name="incentto.com" appBase="/opt/tomcat/webapps/IncenttoPROD">
                <Context path="" docBase="/opt/tomcat/webapps/IncenttoPROD"/>
        </Host>



Not 100% sure that both docbase and appbase are needed, but it's working.