Got lost in space when upgrading from Ubuntu 17.10 to 18.04

just upgraded a server to latest Ubuntu Linux Release and forgot to check NC version. Now I got stuck. On the server there was still an older Nextcloud 12 running which now does not run on current PHP 7.2. Going back to php7.0 on Bionic seems not to work. What options do I have without messing everything up? Does occ commandline upgrade from 12 to 13 work on PHP 7.2?

Right now i am thinking about moving everything to another server still running PHP 7.1, making NC upgrade from 12 to 13 there and moving back everything.

Hello there, I had an ‘enjoyable’ evening updating my server to 18.04 as well. The main issue for me was the updated php. I went in and reinstalled all the php modules as per the admin doc.
Also this post helped as well: New Nextcloud Server Incorrect PHP Version

I also reinput the php.ini settings in as many php.ini files as I could find - I think there were about 3 or 4!

Finally a reboot or 2 along the way got it going.

I feel your pain! I managed to re-enter Earth’s atmosphere, but more by luck than judgement!

Good luck

Good morning, ja the last evening was like the opening scene in Gravity (https://www.youtube.com/watch?v=E4nL-eoqBPA). Not really “enjoyable”. Thank you for your encouragement. :wink:

Today I will move data and database to a new Ubuntu host still running on older ubuntu with php 7.1 or 7.0. Missing mods are not my concern. This pity happend because I did not check NC version before upgrading the distro Having said this: Everybody should keep this in mind, before upgrading.

If somebody else has a more elegant solution for this problem, go ahead!

@enoch85 is managing our vm images based on Ubuntu 16.04. Did you already test on 18.04 and have some experience to share? There are a few more topics with 18.04 and php 7.2, since Ubuntu is quite popular, we should make sure it works properly…

I’ll test my upgrade process later today and document what I can.

1 Like

@tflidd I didn’t upgrade any current VMs on 16.04, but I’m about to release a 18.04 VM which runs on PHP 7.2 without any issues at all. I think I will release the new one on Monday, but until then you can test it here: https://cloud.techandme.se/s/whxC00V1I0l4CY8

Regarding the original issue I think it’s just a matter of system administration.

Thanks for the quick feedback. I was afraid of all the problems that there might be a problem with the php packages. For myself, I’m still on the old version and I’ll wait some time before I upgrade :wink: And the vm-images are a nice thing to have a quick look & feel …

Yes on another 18.04 server and NC 13 everything runs pretty well. Of course some apache mods are missing, but easy to add after Upgrade process. The missing mods (as far as I know):

sudo apt install php7.2-zip, php7.2-xml, php7.2-mysql

Of course these mods should be a2enmodded if not enabled by default.

I’ve also added python3.7-minimal, but I am not sure if this package is really needed by Nextcloud.

Good lord that’s not a comfortable experience at all.

To get up and running, I had to:

sudo a2enmod php7.2 as 7.1 was removed.

Following this, I reinstalled all base php modules as @jakobssystems did:

sudo apt install php7.2-gd php7.2-mbstring php7.2-curl php7.2-xml php7.2-zip php7.2-mysql

Then, edited /etc/php/7.2/apache/php.ini in order to add in the Opcache settings, max-upload and memory limit modifications.

With a restart of Apache, it’s all back up and working fine.

I was not given a PHP 7.2 version of apcu, dompdf or redis but those don’t appear to be affected, as the server is not reporting issues with any.

2 Likes

If this isn’t the right place to ask this, my apologies. I installed the VM for Hyper-V (purchased). I’m a newbie. For me to update to the 18.04 VM, is the link you provided correct for Hyper-V? Or, since I’m already up and running, is it better just to update Ubuntu only? I’m currently on 16.04, of course, with NC 13.1.

Perhaps this is something to report back to the Ubuntu community. As far as I know, they roll out the new LTS version upgrade only for the first point release (June or July), so until then it only hits the curious people.

We’ve got a Ubuntu guy kicking about the forum don’t we? @kyrofa?

1 Like

The link is valid for 10 days. If we within that time release a new version, you are free to download that. If the time expired though, you have to buy it again.

Yeah, Ubuntu guy here, although I haven’t tried this myself yet (I wouldn’t have the same issues anyway, since I run the snap). My servers always run LTS releases, and 16.04 is supported for several more years. Unless there are features I need, I gain nothing from upgrading, but there is always the potential for issues. Also, if I may offer some advice: don’t experiment on production. At least create a clone of your instance, or set a VM setup the same way, and try that first.

As far as I know, they roll out the new LTS version upgrade only for the first point release (June or July), so until then it only hits the curious people.

This is only correct for LTS releases (they get offered the upgrade only on point release). Other releases are offered it immediately. If you must upgrade, I suggest waiting until point release.

Okay today’s update: I’ve found another much more elegant solution for this issue:

  1. Get all required mods, enable them and set opcache settings as Jason mentioned

  2. wget current NC 13 version from https://download.nextcloud.com/server/release/nextcloud-13-0-2.zip

  3. Empty your old NC webfolder and unzip the new NC 13 contents in there. (my data folder is outside /www in /var/data) and chown everything for www-data

  4. Open your NC in your Webbrowser and enter your existing username and mysql connection information.

  5. The initial setup assistant detects and updates all data and apps to NC 13 automatically

  6. If you’re using 2F-TOTP Auth disable it with occ console, login with your user and renew your TOTP. After this enable 2F-Auth wiith occ again. You have to do this with each user.

  7. Mark Watney is back on Earth…

(everything seems to work though theming background and logo were missing)