Upgrading Nextcloud after a while
Upgrade Procedure
I forgot how painful upgrading some software can be!
I hadn't upgraded my local Nextcloud instance for a while - I was running version 19 (apparently from July 2021) with the latest version being 27.
I naively thought I could jump straight from 19 to 27, but occ upgrade
told me
otherwise... I had to be on the latest minor of each branch, then upgrade to
branch + 1, and so on.
Fortunately, Nextcloud downloads' site lists the latest version for each major version.
So I just downloaded latest-19.tar.bz2
to latest-27.tar.bz2
, scp'ed them to
my Synology server, and for each version, I did:
sudo -u http php80 occ maintenance:mode --off
mv nextcloud nextcloud-<version_number>
tar xvjf latest-xx.tar.bz2
cp nextcloud-<version_number>/config/config.php nextcloud/config/
chown -R http:http nextcloud
sudo -u http php80 occ upgrade
sudo -u http php80 occ maintenance:mode --off
- Note that I had to use different versions of PHP depending on Nextcloud's version - I started with 7.4, and then had to switch to 8.0.
- Also, after each upgrade, I checked in the Admin's Settings > Overview page that the current version was correctly displayed, with the next version also shown (e.g. "version 20, upgrade to 21 available").
Synology specifics
Every time I have to dig into Synology over SSH, I keep telling myself that I should get rid of it and invest in a new hardware, and install FreeNAS on it.
A good example here is with Apache's logs - I couldn't find how to find Nextcloud's virtual host HTTP logs, as at some point I was running into issues.
I eventually found out that it was because of PHP's version (I had to switch from 7.4 to 8.0), but that was pure luck, and not because of a log error message, since I couldn't find those logs!
Tags: IT