[BlueOnyx:08579] Re: Moving Datacentre

Michael Stauber mstauber at blueonyx.it
Fri Sep 23 10:42:07 -05 2011


Hi Colin,

> Is there a relatively easy way to do this or am I looking at a lot of
> painful work? I imagine others have done this before ;)

Yeah, it's somewhat painful, but over the years I built a few tools to keep 
the workload down.

So what's involved after hauling the gear?

- Change of IPs of all servers and/or the VPS's and Vsites. 
- Update of the DNS. Old IPs have to be replaced with the new IPs.

For quickly changing all vsites to a new IP I often use this small script:

-------------------------------------
#!/usr/bin/perl
# List of all sites can be generated with this command: 
# ls -k1 /home/sites/ > sitelist.txt

system("ls -k1 /home/sites/ > /tmp/sitelist.txt");

$newip          = "192.168.100.100";
$sitelist       = "/tmp/sitelist.txt";

open(CONFIG, $sitelist);
@list = <CONFIG>;
close (CONFIG);

foreach $site (@list) {
    $size = length($site);
    unless ($size < 3) {
        chomp $site;
        print "Changing IP of site " . $site . " to the IP $newip \n";
        system("cmodvsite --fqdn $site --ipaddress $newip");
    }
}
-------------------------------------

For quickly changing the DNS information on a BlueOnyx DNS server you can use 
the onboard tools that blueonyx-dnstoolbox provides: http://bit.ly/pJKNQg

-- 
With best regards

Michael Stauber



More information about the Blueonyx mailing list