A Shell Script To Migrate Servers To Different Datacenters
You should be able to use this script to do the following:
1.) Move existing Linode servers to different Linode data centers.
2.) Migrate Linode servers to completely different provides such as Slicehost, Rackspace Cloud Serves, or even Amazon EC2.
3.) Import servers into Linode from other provides.
Download The Shell Script Directly
Let us know what you think, and if you have any questions or comments.
1 Reply
> 1) Move existing Linode servers to different Linode datacenters.
Here at Linode, you don't need a script to do that. Cloning disk images and sending them to another linode is just a couple of mouse clicks away. But your script could be quite useful for the other scenarios.
One thing: it doesn't seem that your script will automatically change IP addresses and hostnames hard-coded into Apache and Postfix configuration files, for example. You're definitely going to have trouble with e-mail if Postfix HELOs with the wrong hostname. So the user must still manually track down and change those entries, including the crucial network interfaces file.
It shouldn't be too difficult for a script to ask for a list of source IP addresses/hostnames, a corresponding list of destination IP addresses/hostnames, and automatically perform a search/replace on them. But this is likely to fail in unexpected ways if the config files are complicated, or if the destination cloud provider has special setups.