Skip to content Skip to navigation
  • Connect with Rich Lawson on LinkedIn

Upgrading Ubuntu

Last weekend, I upgraded this webserver to Ubuntu version 12.04, which is the first time I've ever upgraded a Linux server. Previously, I had always done a fresh install and then reconfigured everything. Unfortunately, I ran into problems with some of my configuration files during the upgrade.

As the Ubuntu upgrade process runs through package updates, it suggests keeping any customized configuration files by default, even when there are new versions available for particular packages. I thought that it would be smart to selectively keep some of the configuration files, while replacing others, depending on the levels of custom configuration within the file. This worked for everything other than email, probably because there were significant changes in the new version of Dovecot that is packaged with Ubuntu 12.04. Although I was able to correct the configuration so that I could connect to email via IMAP and send out email from the server, I was unable to actually receive any email. Even after attempting to pull the updated configuration files for both Postfix and Dovecot and then update them with my configuration settings, I was still unable to receive email.

I ended up restoring an image backup that I had taken of the server just before performing the upgrade. At this point, I knew which configuration files were going to get replaced, so I re-ran the upgrade and let the system replace all of the files. Afterwards, I manually applied my configuration settings. This part went quickly, and I'm now upgraded to Ubuntu 12.04! It will really save time in the future to follow this method and ensure that everything is properly upgraded before re-applying custom configuration settings.

If I had been more worried about uptime, I would have created a new server instance based off the latest image, built out everything there, and then switched IP addresses to begin serving pages from the new server. The DNS TTLs on the relevant domains were already set pretty low, so this wouldn't have been too much of a problem in terms of propagation. Even so, my total downtime was probably only about a half hour combined for both upgrades (I ran the upgrade while keeping all services running), but my email was down for longer as I tried to troubleshoot to correct the problem with receiving emails after the initial upgrade.

I should also mention some great free tools that I found while attempting to troubleshoot the email issues:

  • IntoDNS is a service that checks over DNS entries for a particular domain and flags problems. This tool helped me to discover that the subdomain used for mail should have full address record instead of a CNAME record. Even though the email had been working before without any noticeable problems, it seems that there is the potential for lost email if address records are not used.
  • mxToolbox is a similar tool that provides good information about domain mail configuration specifically. It will even run checks to see if the domain is blacklisted. When I ran the SMTP test, it alerted me to a reverse DNS mismatch. When I set up the server, I had not configured the reverse DNS.

Overall, this was a good learning experience, and I won't be worried about upgrading to new versions of Ubuntu in the future.