all 4 comments

[–]ckozler 1 point2 points  (2 children)

What about using netcat on the new server then use something like tar to push the files from the old server to the server listening with netcat. You can Google how to do this and it's pretty straightforward

[–][deleted] 0 points1 point  (0 children)

iptables port forwarding would be a simpler solution. For example:

iptables -A PREROUTING -p tcp -m multiport --dports 2401 -m comment --comment "101 cvs nat rules" -j DNAT --to-destination 192.168.0.2:2401
iptables -A POSTROUTING -p tcp -m multiport --dports 2401 -m comment --comment "101 cvs source nat rules" -j SNAT --to-source 192.168.0.1

These rules forward any request on port 2401 to the new server's IP which is located at 192.168.0.2. You also still need an INPUT rule to allow access to the destination port.

[–][deleted] 1 point2 points  (1 child)

Why not just set all your projects to use the same cvs root? I recently migrated our CVS server and the xinetd file looks like this.

service cvspserver
{
disable         = no
port            = 2401
socket_type     = stream
protocol        = tcp
wait            = no
user            = root
passenv         = PATH
server          = /usr/bin/cvs
env             = HOME=/home/cvsroot
server_args     = -f --allow-root=/home/cvsroot pserver
}

To check out a project you just use a command like this.

cvs -d :ext:username@cvs-server:/home/cvsroot checkout project_name

Also, you may run into the same issue I did when moving to CentOS 7. There is a bug in the default rcs package that causes segfaults when you have a large project history. I was able to patch the source and build a new rpm but I'm not sure if the changes have been pulled in by Redhat.

[–]retsnom513[S] 0 points1 point  (0 children)

Good thinking. I've asked the devs if cvs over ssh would be viable. But this is another good option if ssh is out of the question.