Is it safe to upgrade AWS Ubuntu Instance running live sites? [closed]
In 2015, I created an AWS instance running 14.04. After 2.5 years, I am wondering is it a good idea to upgrade as I see this message every day when I login to it?
Welcome to Ubuntu 14.04.3 LTS (GNU/Linux 3.13.0-48-generic x86_64)
309 packages can be updated.
235 updates are security updates.
New release '16.04.4 LTS' available.
Run 'do-release-upgrade' to upgrade to it.
My questions are -
- Should I upgrade Ubuntu or leave it as it is? as any wrong package upgrade may break the server/live site.
- Is it safe to upgrade Ubuntu like this running do-release-upgrade or is there a better way to do it especially on live servers?
Thanks
Should I upgrade Ubuntu or leave it as it is? as any wrong package upgrade may break the server/live site.
Yes, you need to upgrade the cloud instance.
Is it safe to upgrade Ubuntu like this running do-release-upgrade
No.
or is there a better way to do it especially on live servers?
Yes, and there should be a how-to on this on the AWS platform (at least I know there is one on GCE so I expect there to be one on AWS too ;-) )
The general rule when dealing with cloud instances: prepare for failure. Screw up in any way and the instance is gone, dead, never ever to return.
The setup for an instance should be:
- a root disk that you create an instance with.
- a personal disk that gets added to the instance. This personal disk also has copies of all the files you edited on the root disk. This disk you also make backups off: you copy the disk in your dashboard so you have multiple copies. And if possible store them on another machine.
You do NOT use the upgrade tool from inside the operating system. Cloud instances that can not boot are -dead-. So if there is a failure where you would see a grub rescue when you use a normal desktop install you are screwed on a cloud instance.
But upgrading becomes a lot easier with cloud instances: you make a NEW root disk with the new OS and then attach a copy of your personal disk to the root disk where you examine the files you need to edit on the data disk for relevance. If this fails you still have your old instance. If it works all like you want you can start making backups of this setup and, over time, replace the old version backups with the new.
You can do sudo apt-get upgrade && sudo apt-get update
as this will apply those 309 updates. For the release upgrade, I would suggest you clone your machine and try there or create a new one with the new LTS as these operations are not recommended over SSH.