Stuck between OS and NC versions

I’m currently running Nextcloud version 20.0.12 on Ubuntu 18.04.5 LTS GNU/Linux 4.15.0-151-generic x86_64.

I’d like to upgrade Ubuntu to 20.04.2 LTS but apparently I’ll have these issues:

  • You are currently running PHP 7.2.24-0ubuntu0.18.04.8. Upgrade your PHP version to take advantage of performance and security updates provided by the PHP Group as soon as your distribution supports it.
  • Nextcloud 20 is the last release supporting PHP 7.2. Nextcloud 21 requires at least PHP 7.3.
  • MariaDB version “10.1.48-MariaDB-0ubuntu0.18.04.1” is used. Nextcloud 21 will no longer support this version and requires MariaDB 10.2 or higher.

If I do an upgrade of Ubuntu, Nextcloud seems to fail to start. (I’m going to double check this since it’s in a VM and I can roll it back.)

But, am I better off exporting the user database and user data, then installing the latest version of Ubuntu and Nextcloud from scratch and importing the data back?

You need to check out why. Often, when upgrading ubuntu, not all required php modules were installed (List: So it mostly helped to install them with apt-get.

You can put your files back and resync everything. Calendars and contacts can be saved outside and reimported. But other app data is lost and sharing links etc. as well.

Sometimes the OS doesn’t upgrade cleanly. In this case you could backup Nextcloud, install a fresh Ubuntu 20.04 and then restore your NC 20 from backup. Then upgrade to NC 21. Since you are on a virtual machine, you can keep the old as complete backup in case something goes wrong.

1 Like

Thanks for the advice. It may go more smoothly after I have now upgraded Nextcloud to the 20 series.
I’d like to keep the existing setup of Ubuntu as I’ve got the automated Let’sEncrypt setup working, firewall rules in place, and especially what needs to be shared among accounts. (I have different accounts for my different computers, but some of them need the same files.) If I’d lose the sharing connections that would be a big negative at present.
Then again, it never hurts to revisit settings and make sure they’re still current/relevant.

Anyway, thanks for the tip and I’ve decided to try upgrading Ubuntu in place and fixing anything that may go wrong.

I appreciate the perspective.

I think this is my fix. I’m left with /etc/php/7.2/apache2 and /etc/php/7.4/ [no apache2] directory, no messages in Nextcloud log file, and scant messages in the other log files of relevance. I think the backup and restore to the running version is the best way to go about it.