1

One of the cool things about the Linode VPS is being able to clone the entire server and move a copy of it to a new Linode server. That way you can have a test server that mirrors your production with zero variance. This is especially cool when testing new things without fearing you're going to break your production server (ehem -php upgrade on aegir anyone...) I'm not talking about sub-site within aegir, but rather the whole honking Aegir instance. Clone it to another server, and launch it under a different IP address. So naturally, I really wanted to clone of my entire production instance and launch it as test server under a different IP/domain name. I'm trying to figure out a repeatable process for setting up a test server that resembles a point in time snapshot of my production server.

Sounds simple and straightforward, right? Nope. Aegir to blame I think, but not sure. All I know is I can't get it to work.

I have (CentOS 5.8, Apache, PHP 5.2 running Aegir and about 6 open atrium sites running subdomains off main URL). As I mentioned, I want there to be zero variation between current production and this new test Linode. Linode's clone/backup features seem to make this possible in theory, but I'm stuck in the mud with launching my test server given that all it's configurations are set to my production site. I understand I can't just boot my test linode server (different IP address) from the restored volumes of my production server because all the settings match my production site and bad things would happen such as SQL on the test site trying to connect to my production site, etc. What I did so far is pretty simple:

Restored my production linode volumes/profile to a new linode VPS (same data center) Through GoDaddy I have pointed the test domain name to the Linode VPS address. I changed to the new domain name in /etc/sysconfig/network I changed to the new IP address in var/aegir/config/server_master/apache/vhostd/example.com I changed to the new IP address in /etc/httpd/conf.d/aegir.conf I thought that would be it, and I'd just type it the testserver URL and I'd start doing stuff. Not so :( I think the first clue was that I didn't have a static IP inside ifcfg-eth) file.. Instead it said BOOTPROTO=dhcp

I can't believe how mysterious it really is to change a IP address of a Linode clone... I thought it was as simple as pointing a test domain name at the test linode ip address, adding a couple name servers, and pasting in the new IP address. But it appears aegir is wired in some strange ways.

Taking a step back, the only thing that's different here is my IP address... It's kind of like making an exact copy of a guy named 'Bill', and renaming him 'Tom', but everything else about the two is the same. So is there an easy way for this to happen with cento/aegir?

Thoughts? Steps involved? More detail the better. Thanks!

user656002
  • 31
  • 1
  • 4

1 Answers1

0

http://library.linode.com/migration/migrate-server-to-linode#sph_configuring-the-disk-images

On the Linode, which should still be running in rescue mode, enter the following command to change directories:

cd /media/xvda

Now enter the following command to replace all instances of your old IP address. Be sure to replace all instances of the old IP address with the new IP address. In this example, 98.76.54.32 is the old IP address and 12.34.56.78 is the Linode's IP address:

find ./ -type f -exec sed -i 's/98\.76\.54\.32/12\.34\.56\.78/' {} \;

The entire mounted filesystem will be recursively searched for any instances of your old IP address. Note that this replacement operation can take a while to complete.

chx
  • 1,705
  • 2
  • 16
  • 25
  • Isn't there some kind of default gateway, netmask and dns servers to change also? –  Dec 24 '12 at 10:12
  • Thanks, I got encouraged with this documentation. But unfortunately, it did not work. I'm now thinking this is a unique problem specifically with CentOS and/or Aegir. The later most likely. Aegir is pretty awesome, right up until you need to change something small. Not worth it IMO. Anyone with aegir/centos insight or clues would be much appreciated!!! – user656002 Dec 24 '12 at 18:23