4

I have a productive Ubuntu Server LTS webserver ("classical" LAMP) running 12.04.5 LTS (up-to-date, regular apt-get update && apt-get dist-upgrade). I can only access it via SSH (rented server with root access). I do not use any third-party software/sources, only the official Ubuntu ones.

I'd like to run do-release-upgrade to upgrade to 14.04.X LTS.

My question is what I can expect from this process to keep the downtime at a minimum:

  • How long will the LTS upgrade run (X minutes, X half-hours, X hours)? I know this depends on a lot of things, but a rough time-scale would be nice to know beforehand (it's very fast hardware and network connection).
  • are reboots needed inbetween (-> SSH-only-access)?
  • is constant user-input required?
  • Will the updated important services (Apache, PHP, MySQL) just run or can I expect to have to update a lot of configuration files (if so which are likely needing adjustments)?
  • Are there any other known problems that occur often on a big LTS upgrade?

2 Answers 2

4

How long will the LTS upgrade run (X minutes, X half-hours, X hours)? I know this depends on a lot of things, but a rough time-scale would be nice to know beforehand (it's very fast hardware and network connection).

Last time I did this it took just over 1/2 an hour. On a more than average internet connection. But indeed this will depend on a lot of things. If you have a desktop installed it will take longer. If you have more software installed than me it will take longer. If you have less installed it will take less time.

Are reboots needed inbetween (-> SSH-only-access)?

Not when I did it and as far as I know the upgrade is done as 1 action. So a reboot at the end will be needed.

Is constant user-input required?

No. But you probably want to watch most of the process as it happens.

Will the updated important services (Apache, PHP, MySQL) just run or can I expect to have to update a lot of configuration files (if so which are likely needing adjustments)?

It did for me: apache and mysql ran instantly afterwards; but this largely depends on your setup; if you used deprecated options that got deleted in 14.04 those might give you troubles.

Both apache and mysql show clear messages if it does crash.

One thing I would advice: stop any services yourself and make a backup of the configuration files before you start the upgrade. Make a database dump, backup my.conf and /etc/apache2/conf, sites- etc.

Are there any other known problems that occur often on a big LTS upgrade?

Yes, power outage. It seems to be very popular just when you start an upgrade for power outages to happen. So as with any major changes of your system: backup and check that you can restor it.

One other thing: after I did the upgrade on 1 machine we made an educated guess to what it would cost our company if the upgrade would bork. We decided it would be cheapest and safest to buy a new server and change the old one to a fallbackup server. That also made the upgrade easier: we could mess with apache setting, mysql settings and restore our backups. It took longer than an hour (days) but it was possible to do this during daytime and when we wanted it.

2
  • How would you suggest to make a backup? Currently I have a duplicity that is run daily. I only ignore srv, usr, cdrom, lib64, bin, sbin,boot,dev,proc,sys, tmp, run, mnt, media, and lost+found. Would that suffice to restore a failed upgrade? Jan 28, 2016 at 18:10
  • The server purchase is probably the easiest solution at some additional cost while you can easily achieve zero downtime.
    – Luca Steeb
    Feb 5, 2017 at 11:39
2

These upgrades should take less than an hour, maybe 30 minutes, but that's only the upgrade, not the testing and fixing afterwards.

You can expect several questions about configuration files: overwrite or keep the old ones. In general you should keep the old ones, otherwise Apache config will be overwritten etc. You better make sure to backup those config files. How big is your /etc folder? Back it up with proper rights (sudo cp -rp /etc /etc-backup). Same goes for the var folder. Check if there is enough space to do this.

Apache or Mysql or any other service can stop working with your current settings. Databases may not upgrade properly. PHP upgrade may cause problems. Check your mailserver.

My advice: use a local 12.04 VM in Virtualbox, install your website, check if mysql, php and apache are the same version. Check the mailserver and if the website or a cronjob sends out mail to customers, disable the mail, or change all mail addresses in the test environment to make sure customers don't get fake test mails. Make snapshots along the way so you can go back one or two steps when you make a mistake.

You can choose to use a desktop version of 12.04. That will give you the possibility to use Firefox in the VM etc. A desktop can make things a lot easier, and my guess is it won't harm the server setup for testing. This is what I do, but you might want not to.

Then with that local 12.04 VM, make the upgrade. See what problems occur. Does the website still run? Do you see errors in the logging? Be aware that this test is not an absolute guarantee that the same procedure will work on the live machine. But you will probably catch most problems.

In these cases "the cloud" has its advantages, using a VM in the cloud I mean. You can make a snapshot before upgrading. Then upgrade and go back if it goes wrong. Or you can keep the original machine running, use a snapshot to create a second VM, upgrade that to test etc.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .