How to move users and data from (cent os httpd) NC 15.0.14 to (Debain 9 apache2) NC18.0.4

I have nextcloud version 15.0.4 installed on CentOS7 under apache (httpd) and I have about 1tb of data and about 10 users, I like to move the users and data on to Debain 9 strech (apache2) which is on my other machine. is there any step by step guide available, once users and data is migrated, i like to upgrade nextcloud to latest stable verison.

Thanks in advance

You have to go through all major updates (-> NC 16 -> NC17 -> NC18).

I would migrate database and data on a debian buster (php 7.3) and upgrade directly to NC 16 (which supports php 7.3). Then continue with two further major upgrades to NC 18. NC 18 supports runs out early next year, so prepare for the NC 19 upgrade already.

After each upgrade, login, check out that all the apps were enabled and the data of these apps can be upgraded (if required). In the admin section there are a few optimizations regarding database indices etc that you can run, I don’t recall in which version exactly.

For the upgrades, I’d do either a manual upgrade or use the upgrader app from the command line (sudo -u www-data php updater/updater.phar). Especially with more data and users, you don’t run in timeouts or memory limits.

Keep you initial CentOS setup in case something goes wrong with your upgrade, and/or do a full backup.