Moving to new server and upgrading

I have an owncloud 8.2.11 server and want to migrate to a new server with the latest 12.0.4 nextcloud. This new server will take over general file serving from the original machine and many of the data files have already been copied over. The original machine is running redhat 6.6, php 5.6.25, and mariadb 5.5.

The new server already has nextcloud 12.0.4 running on redhat 7.4, php 7.1.8 and mariadb 10.2 and works fine with the existing datafiles for users (authenticating via ldap). A post about 11 months ago mentioned a comparable situation and wondered if there were a way to just get the database of what has been shared updated as a separate operation, thus making the transition quicker. Alternatively, I could just tell users they will need to reshare files and we are starting over. I’d like to minimize downtime.

The answer then (and perhaps the same answer now) was to migrate the database via a series of versions of owncloud and nextcloud until one gets to the version desired. The update process as described elsewhere depends on having a working earlier version already running. How do I export from one machine and import to another? Can I even run owncloud 8.2 on the new server with newer versions of php and mariadb? There are instructions online for migrating owncloud from one server to another and these proceed by backing up owncloud and then restoring it. There are a plethora of options and I’d appreciate suggestions.

The current repos I have on the old system would allow an in place update from owncloud 8.2 to 10.0.4 Does that make sense as a first step? On the newer system, rpms are tied to older versions of php and don’t seem useful. But it seems I could get the 8.2.11 owncloud tarball, get that running on the new system and proceed from there. So:

OC 8.2 -> NewSystem OC 8.2 -> (via updater) NC 12
OC 8.2 -> OC 10 -> NewSystem OC 10 -> (via updater) NC 12

Unfortunately, you can’t just import an older database into a newer setup.

That is still the only way to keep all data. But there is no direct way to merge this setup with your newer setup already running on NC 12.

The migration page has been updated recently and shows the best migration path for your setup:

ownCloud 8.2.x -> Nextcloud 9.0.x -> Nextcloud 10.0.x -> …

You need to be careful about the php-compability, php 7.1 is explicitly supported since NC 11. So I would first upgrade on your old machine up to NC 11 or NC 12. And then move everything to your new server.

Since you are doing a couple of upgrades, I would do manual upgrades which are less problematic (delete everything but the data and config folder, place new code from the targballs, fix permissions and run occ upgrade command) . Packages are sometimes tricky with dependencies. The updater app works quite decently since NC 11 (you can start it from command line to avoid timeouts, it should respect the right order). Don’t forget after each upgrade to login and check if the apps are all enabled and their data has also been updated. Especially the transition from OC 8.2 to NC 9.0 is important where the calendar and contact data are moved to the core.