I'm running 16.04 on several cloud servers, stock hardware, no GUI, all LAMP. I want to upgrade from 16.04 to 18.04.

What can we do before or during an upgrade to give us a better chance of success? Getting a backup is obvious. Might we have a better chance of success if we do something to simplify the installation? Maybe do a pre-upgrade of some components? To ensure the process isn't interrupted if my SSH connection dies, I'll use an HTTP-based virtual console.

I just want to avoid a failed upgrade, downtime, inability to access the server to fix it, and other grief. I don't want to miss doing something that others might think is obvious, expected, or good practice.

1 Answer 1


From my experiences, I recommend cloning your production server(s) and test the upgrade on the clone first. I usually cloned my physical server to a virtual machine on my laptop in such a case, the process will be likely easier in the cloud.

I’ve never had any problems with the upgrade itself (like getting stuck in the middle, died SSH, etc.) but something might stop working after the upgrade if you depend on some default settings which change during the upgrade, use a non-Ubuntu software, etc. You can detect such problems by running the clone.

To ensure the process isn't interrupted if my SSH connection dies, I'll use an HTTP-based virtual console.

Upgrading through SSH is officially not recommended but it can be done. The installer provides a backup SSH server (on a different port) for the case something goes wrong. And since the installer runs the upgrade in a screen session, you can reconnect to it using an HTTP-based virtual console even when it was started using SSH.

Maybe do a pre-upgrade of some components?

I’d discourage you from this idea. The installer knows the right order to gradually upgrade packages. Don’t disrupt it by potentially introducing unnecessary conflicts.

  • I did a dry run on a backup. It failed due to a required configuration setting in PostgreSQL for PLV8. This caused dependencies to fail to upgrade, Python3 and others failed with old dependencies, then it died on setup of systemd. Commenting out one config line allowed the entire upgrade to succeed after a few retries. This is exactly the kind of weird unknown I'd like to avoid. I'm not looking for a successful update for this specific release. This is more about general notes for any update to catch those kinds of things before the event. I will leave this question open for a while. Thanks.
    – TonyG
    Jun 25, 2019 at 18:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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