I have Nextcloud version 25.0.13 running on Ubuntu 20.04 LTS with PHP 7.4.3.
As far as I know, these systems are too old to get updated via the web app. I tried to copy the installation to an Ubuntu 24.04 instance, but here it says that PHP is too young:
This version of Nextcloud is not compatible with PHP>=8.2.
You are currently running 8.3.6.
Any ideas how I can move the current instance to the new server and/or update to a newer Nextcloud version?
I have the exact same issue.
I’ll update if I find a solution.
I already tried dist upgrade to 22 LTS and then manually upgrade nextcloud to latest and that failed so I restored from backup and will try something else this weekend.
-Muddy
I had the same idea, going to 22.04 and the to 24.04, but that also failed with a number of curious errors.
I have now decided to do a fresh installation and copy over the settings and contents. As I have not activated many extensions and not many users are there, I hope that it will not end up in too much manual work
Cheers,
Thanks a lot! i tried out already some of the things mentined in the thread, but ran into many new problems. So I will try to start with a clean installation and try to copy over settings & content.
The Script will add the required apt sources to obtain php 7.4.
After you have done that, you can install exactly the same modules on the new server as you had on the old server.
This will give you a list of those packages on the old server:
dpkg -l|awk '/^[hiu]i\s+[^\s]*php/{print$2}'
Then you can copy all the php.ini files into the new server. The php updater script can migrate those old settings to the new php versions.
Thanks ernolf, but its not an option on the current server to change the PHP version.
I think my current plan to install a brand new instance on the new server and then copy over the content should be the best one. I have just a few users, few hudreds GB data (which needs to be copied over anyway), some shares and some calendars. The “share” table seems to be the same and the calendars can be exported/imported.
I did write a simple one liner to sync over my apps since they were not all the defaults. I’ll leave here if it helps. Run from the /var/www directory if you have nextcloud.backup as your original data directory during the upgrade. Change names, paths as needed.
for DIR in $(ls -1 nextcloud.old/apps/);do echo "$DIR";if [[ $(ls -1 nextcloud/apps/"$DIR" 2>/dev/null) ]];then echo FOUND;else echo MISSING;rsync -av --progress nextcloud.old/apps/"$DIR" nextcloud/apps/;fi;done
After finally getting to 26 was able to upgrade using the normal administration gui to upgrade to 27.