Upgrade & Migrate from Debian 7 / Nextcloud 13 to Debian 10 / Nextcloud 18

Hi Everyone,
productivly we still run Nextcloud 13.0.12 on an Debian 7 (with only php5 and the usual stuff). Now I want to migrate & update this. The target System: Debian 10 and current 18 Version of Nextcloud.

In short: What is the correct way of migrating & updating the Nextcloud version?

Long story:

Since on the old Debian 7 there is only php5 I can’t simple upgrade to 14 and ran the old 13 for quite some time. Now it’s time…
I already set up a proper Debian 10 with nginx & MariaDB - I manually rsynced my 230GB of user data to the new server as well as dumped the DB and re-imported it on the new machine. As written in the manuals for manual update: I renamed my /nextcloud/ directory and downloaded the current version of Nextcloud. When I start the console update process I ran into this: Cannot manually upgrade from 11.0.3 I did the dirty manual fix of Updater.php and then the update process went well - I can login into my nextcloud but got some error in the nextcloud.log.

So my general question: Which is the correct way of migrating & updating my nextcloud installation from the 13 to the 18 version? Is my “dirty” & “just tried” way OK and the only way or are there any other better paths to follow?

Thx!!

Here you should find everything you need.
https://docs.nextcloud.com/server/latest/admin_manual/maintenance/migrating.html?highlight=migrate

https://docs.nextcloud.com/server/latest/admin_manual/maintenance/upgrade.html

:slight_smile:

Thanks!

The main failure is the PHP Version: On the old Debian7 I’ve got php5. The current Nextcloud 13 works with this. I can’t upgrade to Nextcloud 14 (in any way) because 14 needs a newer php version

On the Debian 10 I’ve got php7.3 out of the box which Nextcloud 13 doesn’t like anymore.

So I can’t use any update mechanism on the one machine and can’t get “my” Nextcloud running on the new machine. The skipping of major releases isn’t supported.

So I must get php7.2 on the Debian 10 so my old Nextcloud 13 can run there and then do upgrades to 14-15-16-17-18, eh?!

Yes, I’m afraid you have to take the long way around. :sweat_smile:

gah… does nextcloud 13 support Debian 10? In the official documents it says Debian 8 & 9…

The critical thing is the php version:

php 7.3 is supported since NC 16. So before putting it on your new system it needs to be upgraded to at least version NC 15.

For the upgrade to NC 14 and NC 15 you need php 7.0, 7.1, or 7.2. I am not sure if you can use some external php 7 packages on your Debian 7 (like dotdeb). You could also move the setup in a virtual machine with the right php version, do the upgrades and migrate back to your new machine. In theory it mainly needs the config file and the database (I think someone managed to do it like this with his setup on a hosting provider and he migrated just the database on a local machine for the upgrades).

1 Like

@Spacey two playbooks https://github.com/ReinerNippes to give you a nextcloud x on debian 9/10 in “minutes”. and a backup solution with restic.

get a new debian that supports your old php version. run the playbook. migrate to a nextcloud version ready to support newer php version. backup. dump that debian machine. create a debian 10 machine. run playbook. restore.

if you need debian 8 i don’t know if the playbook is working. (ubuntu 16 was. long time not tested.) or use the docker version and check if there are docker images around with your old nc version.

just brainstormed. not tested. doesn’t work for linux newbies. :wink:

Thanks - I’ll check this out and give it a try…

I managed easily to install php 7.2. on a Debian 10 ( https://www.itzgeek.com/how-tos/linux/debian/how-to-install-php-7-3-7-2-7-1-on-debian-10-debian-9-debian-8.html ). I guess I can transfer my current install to that server and then update.

I don’t “need” any old Debian. I’d like to have the current 10 version and stay up to date :wink:
It’s the usual hazzle: I couldn’t upgrade the “old” nextcloud 13 to 14 because of the old PHP. I copied the VM month’s ago and tried to update the PHP but that didn’t work out well so it ran like it did the last time. But now it’s time again to change this old stuff…