8

My AWS EC2 instance is running on Ubuntu 16.04. But recently I got an email from AWS that Canonical - the company that provides the support of Ubuntu 16.04 LTS - will stop its support on April 30, 2021.

So should I upgrade my instance to Ubuntu 18.04 or let my server run on 16.04. Will this upgrade affect my software and customers?

A little confused, please help!

Carolus
  • 598
  • 4
  • 18
Vision Cloud
  • 83
  • 1
  • 1
  • 3

2 Answers2

12

So should I upgrade this to Ubuntu 18.04

No. NEVER EVER upgrade a cloud instance. NEVER. Remember: ssh access is the only access you have. If that breaks your instance is gone and you depend on backups and a new instance to get back up running. It is not worth the risk.

or let my server run in 16.04.

Yes. And is is not a server, it is a cloud instance.


You have 2 disks, and if you do not fix your instance by separating system and personal files.

So ...

  • a system disk holding 16.04
  • a personal disk holding all your data.

The correct procedure:

  • detach your personal partition from the 16.04 instance
  • create a copy of your personal disk
  • create a new instance using 18.04 or 20.04
  • attach the copy to this new instance
  • boot and fix issues regarding software you have installed. Apache is normally not a problem. MySQL in 20.04 will have issues: 20.04 uses MySQL 8 so things changed. You can however install 5.6/5.7 if you want and use that.
Rinzwind
  • 293,910
  • 41
  • 570
  • 710
  • Thanks, what if I run on the Ubuntu 16.04, is there any issue – Vision Cloud Apr 06 '21 at 05:56
  • Well, looks like I have a lot of work to do. Most of my instances are 14.04. Tried to upgrade one (didn't know it was bad), and now I don't have ssh. Lol. I'll just create a new one that's a newer OS. I've tried detaching the volume, and reattaching it to a temp instance to no avail. Keep getting `sshd: /lib/x86_64-linux-gnu/libcrypt.so.1: version `XCRYPT_2.0' not found (required by sshd)`. I give up at this point. – DevOpsSauce Apr 13 '21 at 21:26
  • would you still adhere to this advice if you are using aws with AWS Systems Manager and have a secondary way to SSH into a bastion host? – alilland Nov 17 '22 at 17:27
  • I have this drilled into me so there might be other ways that work well; we have a lot of instances (GCE, AWS, Azure, and also Alibaba). The method I use works on all of these; not just aws so it was the best method for -us-. If you have an ssh fallback cool but do not forget ever to make a snapshot backup ;) – Rinzwind Nov 17 '22 at 17:42
1

Just because you try to separate your personal files on a dedicate volume doesn't mean you haven't added packages, changed configurations, or made other alterations to to the OS volume that will be lost with the accepted answer. Sometimes these are easy to restore, other times, not so much.

In this situation, you can make snapshots of your volumes and use them to spin up a new instance. From this instance you attempt the upgrade. If the upgrade runs into issues you still have your original 16.04 instance available and the snapshots to try again.