Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've been tasked to upgrade an Ubuntu Server 11.04 box to one of the later versions due to support for the Natty end of life being reached last year. I've no idea how they got by for almost 12 months without noticing that the repositories don't fully work anymore but that's besides the point..

My initial thought was a clean rebuild from 12.04 or 12.10 and then build the services on top, but I'm told that downtime of the server should be kept at a minimum. To that end I'm looking at an in-place upgrade from 11.04 to 12.04/12.10.

I understand that Ubuntu upgrades should be 'staggered' - ie 11.04 > 11.10 > 12.04 > 12.10 - but I'm quite wary about performing this in-place. I'm happy to do it in stages, verifying all services and processes start and perform with each stage of the upgrade, but it just seems like an ill-advised idea to me. I may be wrong but how can I guarantee that services will stay stable through the course of the upgrade?

What are you thoughts and experiences? I'd be really appreciative of any advice or pointers you have. Thanks in advance.

share|improve this question
1  
One hint: If possible, stay at 12.04, this is a LTS release with 5 years support. 12.10 and 13.04 both have much shorter cycles (18 months up to 12.10 and 9 months for every non-LTS release starting with 13.04). Also, directly upgrading from on LTS to the next is supported. wiki.ubuntu.com/LTS –  SvW Jun 17 '13 at 12:51
    
Thank you very much - LTS is a great idea going by that. I'm running into problems running do-release-upgrade at the moment to get it up to 11.10 but I will keep in mind that hint when I get there. –  runtime05 Jun 17 '13 at 12:58

1 Answer 1

You can't guarantee that services will stay stable through the course of the upgrade, so don't try. In fact, you can guarantee that most services will be unstable at least twice during the course of the upgrade: once during the service upgrade and once during the reboot to activate the new kernel. I would repeat several times to your boss/client that you won't have 100% service availability during the upgrade.

If you don't have a backup that can be rolled back in within minutes (e.g. if the server is a VM and you have a recent snapshot), then regardless of which upgrade path you choose, if anything goes wrong, you're up for a long downtime while you restore. If you're in a high-demand environment, you need to help your organisation learn that "we need minimal downtime" and "we only have one server" are incompatible philosophies.

That said, i've had excellent success with Ubuntu server upgrades (I've never actually had to restore from backup due to a broken system - i'm sure other Server Fault members can tell their war stories) and if you haven't heavily customised the configs of system-provided packages, the online upgrade approach is likely to be relatively painless. Make sure you have good backups (including a copy of /etc somewhere else on the local filesystem) and run the upgrade tool to 12.04 LTS (and as SvW suggested, stick with that version for a couple of years).

After you're finished, check for *.dpkg* files with find /etc -type f -iname '*.dpkg*' and compare the files by hand to make sure you haven't lost any important customisations. If the newer version isn't substantively different, be sure to install it (i.e. mv blah.conf blah.conf.save; mv blah.conf.dpkg-new blah.conf) so that next time you upgrade it will be the stock config and will get automatically upgraded.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.