I have received an old Nextcloud:
Ubuntu 16 ESM, Nextcloud 18, Apache2, php7.1, MySQL5, no containers. With good 2TB content.
That I want to upgrade to Ubuntu 22 LTS, with the latest Nextcloud, all in containers.
Is there anything to consider here?
I would proceed like this:
Backup Data folder and MySQL tables. Flatten everything, install OS, install Nextcloud 23 from Docker with MySQL. Stop Nextcloud, load SQL into container, reconnect data folder.
Or do I need to upgrade from version to version? NC18 → NC19 → NC20 → NC21 → NC22 → NC23
Thank you very much
YES, YOU DO NEED to upgrade from version to version NC18 → NC19 → NC20 → NC21 → NC22 → NC23
Also, i don’t really understand flatten everything … you mean freash system reinstall …
Please search this forum as these questions are asked and answered all the time. Please do make some level of visible effort to research your questions before you ask. It is much appreciated. Also…
You are missing the required support template. Please fill this form out and edit into your post.
This will give us the technical info and logs needed to help you! Thanks.
Please also note that not all PHP and MariaDB versions are supported for the respective Nextcloud versions. So you can not install e.g. Ubuntu 22.04 LTS on a new server and simply copy your old Nextcloud 18 - version on it to upgrade it then. This will not work. You have to use e.g. older PHP versions in the meantime.
If you only want to migrate the data you can use also this way:
- wait for Nextcloud 24 (because of PHP 8.1 in Ubuntu 22.04 LTS)
- install new server with Ubuntu 22.04 LTS and PHP 8.1 (default)
- install Nextcloud 24
- configure/create all users manually on the new Nextcloud
- copy 2 TB content manually to the users directorys
- use “occ files:scan --all” to import all files to the database/Nextcloud
→ you will lost all other informations e.g. all shares, contacts, …
Maybe this is an option for you.
Also you can create a new empty Nextcloud instance and all users can move their data on their own. Whatch this video. You need different names for your Nextclouds. They also lost all shares, contacts, …
Thanks, but this is the problem. This must not happen under any circumstances.
Then I would do the following:
- I switch to Ubuntu 22
- there I install Docker with MySQL 5.7+ 
- Docker with php 7.4
- upgrade from docker NC18 → NC19 → NC20 ->NC21
- upgrade with docker 8.0 
- upgrade from docker NC21 → NC22 → NC23
 the manual says “MySQL 5.7+” (plus), can I start with v8.0 or v8.1 right away?
 the php version used by Ubuntu22 doesn’t matter to me since I’m using docker?
Your approach sounds good. Make backups and do not destroy your old Nextcloud instance.
Why don’t you use MariaDB?
Ubuntu – Package Search Results -- mariadb-server
Ubuntu – Package Search Results -- mysql-server
But perhaps migration from MySQL to MariaDB is another project.