OwnCloud 8.2.9 to NextCloud 9.0.55 migration - oc_mounts doesn't exist

Hello,

first of all greeting to all members of the Nextcloud community. I have been searching for answers in Google and on the OwnCloud + Nextcloud forums. Yet I have not been able to find any answers.

The problem is very weird, especially since it happens on the 2 instances of OwnCloud. I was trying to update form OC 8.2.9 to Nextcloud 9.0.55 and right at the beginning of ugrade process I receive information “An error has occured”.

Log file entry:
{"reqId":"DI2r2bzwJA7setRxACVg","remoteAddr":"*.*.*.253","app":"index","message":"Exception: {\"Exception\":\"Doctrine\\\\DBAL\\\\Exception\\\\TableNotFoundException\",\"Message\":\"An exception occurred while executing 'SELECTstorage_id,root_id,user_id,mount_pointFROMoc_mountsWHEREuser_id= ?' with params [\\\"email@email.com\\\"]:\\n\\nSQLSTATE[42S02]: Base table or view not found: 1146 Table '00059792_0000019.oc_mounts' doesn't exist\",\"Code\":0,\"Trace\":\"#0 \\\/cloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DBALException.php(116): Doctrine\\\\DBAL\\\\Driver\\\\AbstractMySQLDriver->convertException('An exception oc...', Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException))\\n#1 \\\/cloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(836): Doctrine\\\\DBAL\\\\DBALException::driverExceptionDuringQuery(Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOMySql\\\\Driver), Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException), 'SELECTstorage…’, Array)\n#2 \/cloud\/lib\/private\/db\/connection.php(184): Doctrine\\DBAL\\Connection->executeQuery(‘SELECT storage...', Array, Array, NULL)\\n#3 \\\/cloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Query\\\/QueryBuilder.php(206): OC\\\\DB\\\\Connection->executeQuery('SELECTstorage…’, Array, Array)\n#4 \/cloud\/lib\/private\/db\/querybuilder\/querybuilder.php(141): Doctrine\\DBAL\\Query\\QueryBuilder->execute()\n#5 \/cloud\/lib\/private\/files\/config\/usermountcache.php(188): OC\\DB\\QueryBuilder\\QueryBuilder->execute()\n#6 \/cloud\/lib\/private\/files\/config\/usermountcache.php(110): OC\\Files\\Config\\UserMountCache->getMountsForUser(Object(OC\\User\\User))\n#7 \/cloud\/lib\/private\/files\/config\/mountprovidercollection.php(97): OC\\Files\\Config\\UserMountCache->registerMounts(Object(OC\\User\\User), Array)\n#8 \/cloud\/lib\/private\/files\/filesystem.php(435): OC\\Files\\Config\\MountProviderCollection->registerMounts(Object(OC\\User\\User), Array)\n#9 \/cloud\/lib\/private\/files\/filesystem.php(353): OC\\Files\\Filesystem::initMountPoints(‘email@email…’)\n#10 \/cloud\/lib\/private\/util.php(223): OC\\Files\\Filesystem::init(‘email@email…’, ‘\/email@email…’)\n#11 \/cloud\/lib\/base.php(906): OC_Util::setupFS()\n#12 \/cloud\/index.php(47): OC::handleRequest()\n#13 {main}",“File”:"\/cloud\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Driver\/AbstractMySQLDriver.php",“Line”:53}",“level”:3,“time”:“2017-01-01T12:26:39+01:00”,“method”:“GET”,“url”:"/cloud/index.php/core/js/oc.js?v=b540ba4c098dd20fb128f34880d30f8d",“user”:“email@email.com”}`

And indeed on BOTH instances table oc_mounts is missing form database structure.
I also tried upgrading do OwnCloud 9.0.7 but with exactly same effect.

Any ideas? Thank you in advance!

How did you upgrade? Seems a bit similar to this topic, oc_mounts seems to be a new table in version 9 as well:

Have you tried just manually adding the new table into MySQL, either through the MySQL commandline or something like PHP? If there’s no data missing, just the need for a table to put them in, this might solve your problem…

Thank you for your support. Following Bugsbane advice I have:

  • prepared fresh instalation of Nextcloud 9.0.55
  • exported structure of the oc_mounts table from fresh instalation
  • imported it to OwnCloud 8.2.9. existing database - in order to add missing oc_mounts table to database
  • changed OC 8.2.9 folder (\cloud) name to (\cloud-bak)
  • uploaded Nextcloud 9.0.55 to FTP to \cloud folder
  • moved config.php and \data folder
  • via web browser I went to http:\domain\cloud
  • Nextcloud offered an upgrade
  • upgrade again resulted in notice: “An Error has occured”
  • however this time log showed something different:

{“reqId”:“muP9z0/00VJQEtvzxZgT”,“remoteAddr”:“IP REMOVED”,“app”:“index”,“message”:“Exception: {“Exception”:“OC\\NeedsUpdateException”,“Message”:”",“Code”:0,“Trace”:"#0 \/cloud\/lib\/private\/app.php(118): OC_App::loadApp(‘files’)\n#1 \/cloud\/lib\/private\/util.php(138): OC_App::loadApps(Array)\n#2 \/cloud\/lib\/base.php(968): OC_Util::setupFS()\n#3 \/cloud\/index.php(48): OC::handleRequest()\n#4 {main}",“File”:"\/cloud\/lib\/private\/app.php",“Line”:143}",“level”:3,“time”:“2017-01-16T19:36:53+01:00”,“method”:“GET”,“url”:"/cloud/index.php/core/js/oc.js?v=fa2aa51f1133973b99874d826ec8dd5d",“user”:"–",“version”:“8.2.9.4”}
{“reqId”:“08xiI4AU731ePVkFfEfG”,“remoteAddr”:“IP REMOVED”,“app”:“core”,“message”:“starting upgrade from 8.2.9.4 to 9.0.55.2”,“level”:0,“time”:“2017-01-16T19:36:59+01:00”,“method”:“GET”,“url”:"/cloud/core/ajax/update.php?requesttoken=KisIQ3MhR0EFRyQZES4FOB1WTEARMhQCdUYlHDZ4XDQ%3D%3Aerz90Y0vN%2BhZUtAss3xpWYPtMuwjNO9YyKAyDO6KF4c%3D",“user”:"–",“version”:“8.2.9.4”}
{“reqId”:“5J3uHdkvzrhvd3E84eE9”,“remoteAddr”:“IP REMOVED”,“app”:“index”,“message”:“Exception: {“Exception”:“OC\\NeedsUpdateException”,“Message”:”",“Code”:0,“Trace”:"#0 \/cloud\/lib\/private\/app.php(118): OC_App::loadApp(‘files’)\n#1 \/cloud\/lib\/private\/util.php(138): OC_App::loadApps(Array)\n#2 \/cloud\/lib\/base.php(968): OC_Util::setupFS()\n#3 \/cloud\/index.php(48): OC::handleRequest()\n#4 {main}",“File”:"\/cloud\/lib\/private\/app.php",“Line”:143}",“level”:3,“time”:“2017-01-16T19:39:23+01:00”,“method”:“GET”,“url”:"/cloud/index.php/core/js/oc.js?v=fa2aa51f1133973b99874d826ec8dd5d",“user”:"–",“version”:“8.2.9.4”}

I am clueless right now… any suggestions?

BUMP! Is there any chance that this migration issue will be solved?
Thank you in advance for any hints on the problem!