Migrating a node from one distribution to another
I would like to migrate my node from Fedora 9 to Ubuntu 10.04.
I kinda understand I might need to lease 2 nodes during that transfer process, but what would be the best way to do this?
4 Replies
Get new Linode, Setup Ubuntu, get all your app's running, translate your config files (location and syntax), tranfer your data, test, test, test, Change DNS records, wait, test, take down Fedora Linode.
Just leave plenty of time to learn the new syntax (apt instead of yum, init.d instead of service) and where the config files are and what their names are changed to.
Personally I wouldn't run a production server on Ubuntu (or Fedora for that matter) - I stick with CentOS and Debian Stable (of course You Mileage May Vary).
@vonskippy:
There is no "best way".
Get new Linode, Setup Ubuntu, get all your app's running, translate your config files (location and syntax), tranfer your data, test, test, test, Change DNS records, wait, test, take down Fedora Linode.
Just leave plenty of time to learn the new syntax (apt instead of yum, init.d instead of service) and where the config files are and what their names are changed to.
Personally I wouldn't run a production server on Ubuntu (or Fedora for that matter) - I stick with CentOS and Debian Stable (of course You Mileage May Vary).
Thanks.
I am familiar with Ubuntu. I have been running it on a dedicated server for more than a year.
Not worried about the admin or install part.
But… Red Hat really does value stability above all else, even more than Debian, so versions do tend to be behind. On my last CentOS install, I did have to compile a newer version of php, though it was really pretty easy, it put it outside of the package management.
2. Install Ubuntu 9.10 on it. (Avoid the newest release.)
3. apt-get all the packages you need, and get some security set up.
4. Copy your site to the new linode. Also get a database dump and load it up.
5. Create a subdomain in the DNS manager, and point it at the new linode's IP address.
6. Add the subdomain as an alias to the virtual host configuration.
7. Test your site with the subdomain until you're sure everything's fine.
8. Meanwhile, go to the DNS manager and change the TTL to 5 minutes.
9. Shut down the original site or put up some sort of maintenance notice.
10. Copy the latest files and database to the new linode. You may use rsync to speed up the process.
11. Go to the DNS manager and point your main site's domain at the new linode.
12. Wait a few minutes for the changes to propagate.
13. Test again.
14. Remove the subdomain, and restore the default TTL.
15. Remove the old linode.
As an alternative to a temporary subdomain, you may edit your own hosts file (/etc/hosts in Linux, C:\Windows\System32\drivers\etc\hosts in Windows) to simulate a change in the DNS. But in that case you have to keep track of which site (old or new) you're looking at at any given time, or else you might get confused.
Some software such as Wordpress will remember the domain where it was first installed, and refuse to work properly if it changes. Fixing this requires adjusting two configuration directives stored in the database. It's nasty.
If you absolutely want Ubuntu 10.04, be aware that the MySQL installation process tends to hang under certain circumstances. If that happens, you must fire up another terminal, find the process ID of something that says "mysql 5." (ending with the dot), and kill it manually. Installation will proceed as normal after that. Happened to me a few days ago. Not sure if they fixed it yet. Also, Ubuntu 10.04 deprecated the init.d syntax for starting and stopping processes, in favor of a "start service" syntax. Somewhat annoying if you're following a tutorial.