Migration from owncloud 10.3.0 to Nextcloud

Hello, I have a few problems with migrating from owncloud 10.3.0:
I tried to follow this guide: https://nextcloud.com/migration/, but got this error message after running the updater and going to the main site:

Exception: Updates between multiple major versions and downgrades are unsupported

The updater tried to install nextcloud 12.0.12. This also has the problem that nextcloud 12 does not support php 7.3, although I could move it to a lower php version temporary for the upgrade.

Is there a different way to migrate from owncloud 10.3.0 to nextcloud?

Unfortunately the direct migration from the latest ownCloud 10.3 version to Nextcloud isn’t supported yet, because it couldn’t been tested. The tried migration wouldn’t most likely also not work, because your on ownCloud 10.3 and not 10.0.
This information might help you doing manual migration:

https://docs.nextcloud.com/server/17/admin_manual/maintenance/migrating_owncloud.html

Thanks for your pointers! I finally managed to migrate to nextcloud using these steps:
This is pretty sketchy, because I disabled several safety checks, but in case someone wants to do it:

  1. Manual upgrade according to https://docs.nextcloud.com/server/17/admin_manual/maintenance/migrating_owncloud.html
  2. Manually allow php 7.3 (index.php and lib/versioncheck.php) in nextcloud 12.0.13
  3. Force upgrade between major versions (my initial issue) in lib/private/Updater.php by removing the line throw new \Exception('Updates between multiple major…
  4. Follow https://github.com/nextcloud/server/issues/14549 to fix the error that occurs
  5. UPDATE oc_filecache set mtime=0
  6. UPDATE oc_filecache set storage_mtime=0
  7. /3rdparty/pear/archive_tar/Archive/Tar.php:639 remove “&” in front of func_get_args() (https://www.dotkernel.com/php-troubleshooting/fix-installing-pear-packages-with-php-7-2/)
  8. run updater from settings (remove php check again (only until nexcloud 14 is installed)) until newest version is installed

After doing this I noticed that some files have last edited dates in the future. This is probably due to setting mtime to 0.

2 Likes

I was brave (and careless) enough to try your steps mentioned above to migrate my OC 10.3.x to NC 12.0.13. Most of the steps worked well but the last step still throws this error:

Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'ALTER TABLE oc_filecache CHANGE `fileid` `fileid` INT AUTO_INCREMENT NOT NULL, CHANGE `parent` `parent` INT DEFAULT 0 NOT NULL, CHANGE `mtime` `mtime` INT DEFAULT 0 NOT NULL, CHANGE `storage_mtime` `storage_mtime` INT DEFAULT 0 NOT NULL':

SQLSTATE[HY000]: General error: 3780 Referencing column 'file_id' and referenced column 'fileid' in foreign key constraint 'FK_F0C3D55B93CB796C' are incompatible.

Any clue what to do? Thank you.

This might give you an idea what need to be done:

Deleting all CONSTRAINTS helped me. Thank you. I wasnt so sure about doing this since I was using OC 10.3. In all the other posts there was the talk of OC 10.1.

1 Like

I’m glad to hear it worked for you! For step 4 I also deleted all (I think 2) foreign keys. Since I migrated everything works fine, so I think this isn’t as bad as I initially thought :slight_smile: