Results 1 to 8 of 8

Thread: Migrate hosted virtual Ubuntu server 8.04 to 10.04 [within 7 days]

  1. #1
    Join Date
    Nov 2008
    Beans
    63
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Question Migrate hosted virtual Ubuntu server 8.04 to 10.04 [within 7 days]

    I need to migrate my healthy 8.04 install to a new machine provided by my hosting company Hosteurope (due to harddisk capacities and better performance on the new product)

    Hosteurope provides a parallel installation for 7 days, so within this timespan I need to migrate the following packages and data (among others) to the new machine:

    • Apache,
    • PHP5,
    • MySQL (including several TYPO3 and Wordpress installations)
    • ProFTP
    • OpenSSL (no signed certificate)
    • Ruby on Rails + Passenger (Redmine installation)
    • Sendmail (No Mailboxes, only for sending mails)


    Ho would you approach this task?

    1. My idea was to upgrade my 8.04 distro to 10.04 first.
    2. Then install all packages that i need on the new machine (using the package list exported by dpkg --get-selection )
    3. Then send all configurations to the new machine with rsync.
    4. Then fiddle around (I am a little bit afraid of messing things up here....)


    Any other strategies, experiences?
    Last edited by jesuspresley; October 29th, 2011 at 05:57 PM.
    Netbook: Samsung NC10 Netbook 1GB RAM | Win XP
    Desktop: AMD Athlon 64 3200 | Win 7
    Server: Ubuntu Server 8.04 | Ubuntu Server 10.04

  2. #2
    Join Date
    Feb 2011
    Location
    Maryland
    Beans
    2,251

    Re: Migrate hosted virtual Ubuntu server 8.04 to 10.04 [within 7 days]

    Quote Originally Posted by jesuspresley View Post
    I need to migrate my healthy 8.04 install to a new machine provided by my hosting company Hosteurope (due to harddisk capacities and better performance on the new product)

    Hosteurope provides me with a parallel install for 7 days, so within this timespan I need to migrate the following packages and data (among others) to the new machine:

    • Apache,
    • PHP5,
    • MySQL (including several TYPO3 and Wordpress installations)
    • ProFTP
    • OpenSSL (no signed certificate)
    • Ruby on Rails + Passenger (Redmine installation)
    • Sendmail (No Mailboxes, only for sending mails)


    Ho would you approach this task?

    1. My idea was to upgrade my 8.04 distro to 10.04 first.
    2. Then install all packages that i need on the new machine (using the package list exported by dpkg --get-selection )
    3. Then send all configurations to the new machine with rsync.
    4. Then fiddle around (I am a little bit afraid of messing things up here....)


    Any other strategies, experiences?
    Obviously if you are asking you are feeling a time crunch. Lets get you more time first.

    Do you have any newer machines laying around?

    I would do this on day one.

    Get VMware ESXi. It is free for 60 days. use the converter program to pull the image of your 8.04 onto the vmware server local in your shop. NOW you have it for more than 7 days to find things you will probably miss along the way and help rebuild them.

  3. #3
    Join Date
    Feb 2011
    Location
    Maryland
    Beans
    2,251

    Re: Migrate hosted virtual Ubuntu server 8.04 to 10.04 [within 7 days]

    I would NOT upgrade your 8.04 to 10.04. Waste of time. To dangerous with a Hosted system.

  4. #4
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    8,514
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: Migrate hosted virtual Ubuntu server 8.04 to 10.04 [within 7 days]

    Start with a fresh 10.04 server. Install "LAMP" for Apache, PHP, and MySQL, and install the 10.04 packages for the remaining items like proftpd and Ruby on Rails. If you specifically want sendmail and not Postfix, then remove Postfix and install sendmail.

    Now you just need to migrate the settings from the old server to this one. For most applications, that means simply copying over the relevant configurations in /etc, e.g., /etc/apache2 for the Apache server. You'll also need to migrate data directories like /var/www.

    For MySQL, you're probably best off running mysqldump (as the MySQL root user) on the 8.04 machine to dump all the databases to a portable text file. Then import that file into the database on the new machine.

    Seven days isn't an unreasonable amount of time to accomplish this. Most of what I described can be done in a solid couple of days work.
    Last edited by SeijiSensei; October 29th, 2011 at 04:58 PM.

  5. #5
    Join Date
    Aug 2010
    Location
    Between Heatsink and CPU
    Beans
    538
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Migrate hosted virtual Ubuntu server 8.04 to 10.04 [within 7 days]

    EDIT
    SeijiSensei's advices ar far more precise and valuable...but nontheless...
    --------------------------
    I would not upgrade as well, there is always a good chance somehting 'just won't work' after your upgrade.

    I would start by testing my new environment (Ubuntu 10.04 LTS) on a virtual machine at home and see if I can backup all the data (MySQL DB, Apache2 config, WordPress install etc) from the old machine and then try to restore it into this virtual machine.

    If everything is working correctly, you can then redo same steps in your real hosted environnment.

    I would have a look here:
    http://codex.wordpress.org/Moving_WordPress
    http://www.cyberciti.biz/tips/move-m...-new-host.html
    http://tomcat.apache.org/migration.html

    My $0.02
    Last edited by e79; October 29th, 2011 at 04:54 PM.

    ** My Blog
    **

  6. #6
    Join Date
    Nov 2008
    Beans
    63
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: Migrate hosted virtual Ubuntu server 8.04 to 10.04 [within 7 days]

    Thanks so far, highly appreciated. Some detail questions:

    MySQL:
    How about copying the MySQL data directory /var/lib/mysql instead of dumping the databases?

    System users:
    I guess they can also be copied from a directory?

    File permissions:
    How to make sure that the permissions stay the same on critical files (like my.cnf)?
    Netbook: Samsung NC10 Netbook 1GB RAM | Win XP
    Desktop: AMD Athlon 64 3200 | Win 7
    Server: Ubuntu Server 8.04 | Ubuntu Server 10.04

  7. #7
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    8,514
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: Migrate hosted virtual Ubuntu server 8.04 to 10.04 [within 7 days]

    Quote Originally Posted by jesuspresley View Post
    How about copying the MySQL data directory /var/lib/mysql instead of dumping the databases?
    You can try that. While it has worked for me in the past, dumping and reloading the database may be more reliable.

    System users:
    I guess they can also be copied from a directory?
    I'm not sure what you're referring to here. All the critical user information is stored in just three files -- /etc/passwd, /etc/group, and /etc/shadow. If you copy these files you'll have the user information as before. Obviously if you have real users with home directories you'll need to copy /home as well.

    File permissions:
    How to make sure that the permissions stay the same on critical files (like my.cnf)?
    The files will have the same permissions on 10.04 as they did on 8.04, particularly files associated with system users. The uid and gid of the mysql user doesn't change across releases. If it did, chaos would ensue.

    This isn't as hard as you seem to think it will be. Plus if something goes wrong, you can just blow away the new VM and start over.

  8. #8
    Join Date
    Nov 2008
    Beans
    63
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: Migrate hosted virtual Ubuntu server 8.04 to 10.04 [within 7 days]

    Thanks for al the hints. The migration worked fine. Here is a very rough walkthough:

    • Set up a clean 10.04 system on new host
    • Installed all needed packages (handpicked, not exported from old server)
    • Imported system users and groups with Webmin user export/import function
    • Transferred important config directories (to a temp. directory first) with rsync (option -aE preserved file permissions based on uid / gid)
    • Transferred apache htdocs directory (/var/www/) and subversion root with rsync
    • Transferred mysql data directory directory (/var/lib/mysql) with rsync to temp directory on new server. Then copied handpicked innoDB files from temp to /var/lib/mysql (except system-db like mysql)
    • Backed up old server (6.5 GB) to a backup directory with rsync


    I had difficulties with Redmine (Ruby on Rails) but everything else was quite easy to manage.
    Last edited by jesuspresley; November 8th, 2011 at 04:19 PM.
    Netbook: Samsung NC10 Netbook 1GB RAM | Win XP
    Desktop: AMD Athlon 64 3200 | Win 7
    Server: Ubuntu Server 8.04 | Ubuntu Server 10.04

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •