Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Error while migrating from Owncloud 10.1.0 to Nextcloud 12.0.13 #14549
I ran into an error while attempting to migrate from Owncloud 10.1.0 to Nextcloud. I had read that the proper migration path for Owncloud 10.0.x was to migrate to Nextcloud 12.0.x, so I downloaded Nextcloud 12.0.13. Since I have backups of my data, configuration and database I attempted the migration.
I followed the manual migration instructions at: https://docs.nextcloud.com/server/15/admin_manual/maintenance/manual_upgrade.html
To start the upgrade process I first edited version.php to allow upgrading from Owncloud 10.1.0.
the upgrade fails because of this exception:
To solve this, I needed to remove the foreign key constraints.
The output was:
Next, I looked at the oc_persistent_locks table by doing:
In this table there were two constraints. The first was:
To remove the constraint and key I used the following:
I used the same method to remove the second constraint and key (oc_filecache). It seems this same error was detailed in this issue, which helped point me in the right direction.
After this I was able to complete the upgrade process successfully.
Operating system: Ubuntu 18.04.2
Web server: Apache2
PHP version: 7.1.26
Nextcloud version: 12.0.13
Updated from an older Nextcloud/ownCloud or fresh install: Updated from Owncloud 10.1.0
Where did you install Nextcloud from: Archive
I had to edit version.php to add owncloud 10.1.0 to the supported versions
List of activated apps:
Are you using external storage, if yes which one: No
Are you using encryption: No
Are you using an external user-backend, if yes which one: No
Browser: Google Chrome Version 72.0.3626.119
Operating system: Windows 7 64-bit
the following helped me to migrate owncloud 10.2.0.5 to nextcloud:
I noticed it has been closed, but I don't see any actual resolution. And I don't expect it to come from the NextCloud 12 release, actually, as that is an unmaintained release. The main problem is that the update server of NextCloud states that to migrate from OwnCloud 10.1.x or 10.2.x, you need to download NextCloud release 12. But NextCloud 12 doesn't support upgrading from these newer versions of OwnCloud, so I guess this migration feature needs to be updated in the current release of NextCloud and the update server needs to start suggesting a newer release.
I'm fine with starting a new issue, but the contents will be the same as no actual fix has been implemented, except for doing more manual work.
Or is the official stance of NextCloud: migrating from OwnCloud >= 10.1.0 is not supported without manually editting version.php file and manually modifying the database? In that case, maybe the guide on https://nextcloud.com/migration/ should be updated to reflect that.
I guess there is no upgrade path from OwnCloud 10.1.x or 10.2.x to Nextcloud without manual steps. Your summorized the current state quite well. Nextcloud 12 is EOL so another release is unlikely but a direct migration to Nextcloud 15 is not possible.
@nextcloud/server-triage what do you suggest? Sure the migration is a one-time action but there should be some kind of documentation or automation for this case.
It's on my todo to look for a solution that allows migrating to a newer nextcloud. Unluckily this involves a lot of testing and risk for the data, also basically we need to run the upgrade steps from nc12 to nc17, although you are on 17. That makes it a bit complicated.
Also we have to check for the database and php versions on the way. Because making a migration where you have to replace the database or php version is not the best idea.
@nickvergessen That does sound like it makes it a lot more complicated. It really all depends on the desire to keep supporting migration paths from ownCloud. Currently it seems that it is a recommended / supported migration, but it currently fails when you come from an up-to-date ownCloud version.
In my case, it's slightly more painful as I'd thought: let me do the migration to NextCloud today. I should probably first start with upgrading ownCloud to the latest version. I was coming from 1.0.2 from which the migration to NextCloud seems to be supported. Only after I verified that the upgrade to 10.2.1 succeeded and removed the backups I found out that I'd be better of not having done that.
Anyway. Given the complexity of supporting the migration from OC in NC17, is it totally unthinkable to consider doing another minor upgrade to NC12, with the only change adding migration support from OC >= 10.1.0? And if it is, maybe it can be considered to update the script linked to in the migration guide ( https://download.nextcloud.com/server/installer/migrator/index.php ) to automate these steps when OC >= 10.1.0 is detected?