I just did a migration from owncloud 10.0.9.5 with php 7.2 on ubuntu 18.04 this weekend. It did take all weekend but I got it completely working.
Step 0: backup your stuff, specifically, backup your database and your oc directory, the data is not touched during this process
Step 1: make a new VM with ubuntu 16.04. Trying to get php7.0 to work on 18.04 was a huge chunk of time, suffice it to say, you can’t.
Step 2: Copy your /var/www/owncloud (or wherever you put owncloud) to the VM. Your data directory is NOT important at all for any of this, so you don’t need to tar all that data up. Another note on the data directory, mine is a NFS mount point not in /var/www/owncloud, on the VM i had to recreate the path to my data directory and create a totally empty file called ‘.ocdata’. The command ‘touch /path/to/oc/data/.ocdata’ worked and got owncloud happy.
Step 3: Copy your database files to the new VM. For me using mysql this was the /var/lib/mysql/owncloud
Step 4: install apache and your database and set everything up like you normally would. nextcloud/owncloud use a lot of php modules so just keep trying to access the web page looking at the error logs until you install all those wonderful php modules.
Step 5: once you get your owncloud working again in your ubuntu 16.04 vm with php7.0 follow the migration instructions, put the index.php file in the updater directory and the upgrade from OC 10.0.9.5 -> NC 12.0.12 will work.
Step 6: while still in the ubuntu 16.04 VM you need to log into your admin account and upgrade to nextcloud 13.* (whatever the stable build is). Now this build will be able to work with php7.2
Step 7: tar up your nextcloud directory and database directory and un-tar them where they go on your 18.04 server, overwrite all files (you did the backup right?)
Step 8: navigate to your installation, it should now work and be nextcloud 13, you can now upgrade to NC 14. (my upgrade to 14 failed through the webGUI, I just did it through CLI and it worked just fine)
Step 9: have a beer