Migration from Owncloud fails: "Could not resolve principalPrefix!"

I tried to migrate from Owncloud 9.1.3 to Nextcloud. I made backup, removed the Owncloud Files, extracted the Nextcloud files, copied back config.php and the data folder and wanted to start “occ upgrade”. It starts the upgrade but after a while aborts with the error message below. This leaves me in a state between clouds, unable to access my data.

Error Message: “OCP\AppFramework\QueryException: Could not resolve principalPrefix! Class principalPrefix does not exist. Update failed”

I couldn’t find anything concerning “principalPrefix”. Does anyone else know more?


Nextcloud version (eg, 10.0.2): 11.0.1
Operating system and version (eg, Ubuntu 16.04): 14.04
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.20 (Ubuntu)
PHP version (eg, 5.6): 5.6.21

That sounds strange. Can you share some more details on how you updated? And from what version to which version? Did you update via FTP or SSH or what did you use? (if SSH, what where the commands you executed)

Happy to help on that! :slight_smile:

Hi Lukas!

I am so glad somebody is listening! :slight_smile:
I used SSH for the migration of Owncloud 9.1.3 to Nextcloud 11.0.1 on my Ubuntu 14.04. server and did the following steps:

  1. Enable maintenance mode on my Owncloud installation via CLI
  2. Then I copied the entire Owncloud folder to a temp directory
  3. I uninstalled the Owncloud deb-packages and manually emptied its folder
  4. I downloaded and extracted Nextcloud 11.0.1 into the former Owncloud folder
  5. I copied config.php back from the temp directory
  6. I tried to start the upgrade mode
  7. Then i starts to update the apps and after a while it cancels the upgrading process with the error message: OCP\AppFramework\QueryException: Could not resolve principalPrefix! Class principalPrefix does not exist. Update failed

As for the SSH commands, I used sudo -u www-data php5 occ maintenance:mode --on to switch Owncloud into maintenance mode and sudo -u www-data php5 occ upgrade to start the upgrade after extracting Nextcloud into the folder. I assume you are not interested in the commands used to copy and extract the files, but if you do let me know and I will happily provide them.

Thanks for your help!

Hi again,

do you suppose there is a chance of a quick fix or is it the better solution to try and roll-back?