I thought I was going to have a bad time upgrading my servers. I’d tried it once before and for some reason it decided not to come back to life. I think it hadn’t updated the grub list so it was trying to boot into a kernel that wasn’t there any more. Oops.
So I went into this latest upgrade with fear, dread and anticipation. Something would go wrong and I’d have to spend hours getting it back. I’ve been backing up one server to another for a long time now, so I knew I had backups (at least until midnight), but that wasn’t enough. I backed up everything again to a completely different PC and started the process.
The backup server was the first to be upgraded. It was already on Ubuntu’s Oneiric Ocelot, so it only needed to be upgraded once to get it on to Precise Pangoline (the Long Term Support version). Careful now. Log in as me. Run Screen. SU to root. do-release-upgrade -d (precise isn’t out yet, but it’s close enough to be stable). Something is bound to go wrong.
Wait for it. AHA! A trick question! /boot/grub/menu.lst is asking if I should keep my version or install the package maintainer version. My version has old kernels, theirs must have new kernels. THEIR’S PLEASE!
Reboot.
Hold tight.
Success! It’s back up!
Ok, now we have to do the same with the main server. If this one dies then I have to work really hard to get everything back (although it is on the backup server that is alive and kicking). Problem is, this time I have to upgrade from Natty Narwhal. That’s two cycles where things can go wrong. I started the first one. It finished in no time and asked to reboot. I was a littleĀ sceptical. I didn’t restart. I checked menu.lst and compared it to the kernels that were installed. They matched. OK, reboot.
ping supermatt.net.
Replies. That’s good.
ssh supermatt.net
Connection refused. Not good. It’s already been a minute or two since I rebooted. Could it have failed? Ssh again. Refused. Oh no, oh no.
http://www.supermatt.net
It’s running. I can see my sites! Let me ssh one last time… I’m in! I was just going to fast for it. One upgrade down, one to go.
This time, instead of being SSHed into the box, I used a little thing that bitfolk, my provider, supply. It’s called Xen Shell, which basically allows you to see what you would see if you had a physical monitor attached to the VPS. When it came to rebooting this time around, I could see the whole thing happen. I watched it go down, and then my connection was removed. Damn. I tried logging back in again to see if I could. I’m in. I can see it starting up. Login prompt. YES! It says 12.04! Ssh: fine! Http: fine! Excellent, three nail biting upgrades and absolutely nothing went wrong.
Now I’m happy in the knowledge I can upgrade my servers again with little fuss, but I don’t need to. Precise Pangolin, codename for Ubuntu 12.04 LTS is being supported for many years to come, so I don’t need to upgrade my distribution for at least two more years.