A Shell Script To Migrate Servers To Different Datacenters

We recently migrated Slicehost slices to Linode and wrote a shell script to automate the entire process. The script works with Red Hat based Linux distributions such as Fedora and CentOS.

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.

http://www.619cloud.com/blog/migrate-li … providers/">http://www.619cloud.com/blog/migrate-linux-servers-across-cloud-providers/

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.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct