DB data restore after manual upgrade from 8.1.3 to 10.0.4

mysql
upgrade

#1

Steps to reproduce

  1. With a working owncloud 8.1.3 setup create a mysqldump as per doc.owncloud.org/server/latest/admin_manual/installation/source_installation.html
  2. Download download.owncloud.org/community/owncloud-10.0.4.tar.bz2 into a new web directory
  3. Follow vanilla install steps through webGUI as per doc.owncloud.org/server/latest/admin_manual/installation/source_installation.html (creates a new DB with generic content and admin credentials)
  4. Log into the webGUI successfully using these admin credentials)
  5. Follow mysql database restore process as per the documentation doc.owncloud.org/server/10.0/admin_manual/maintenance/restore.html (mysql -h [server] -u [username] -p[password] [db_name] < owncloud-dbbackup.bak)
  6. Try to log into the webGUI

Expected behaviour

Login to the webGUI succeeds and user credential and application data is available and accessible as it was prior to the upgrade

Actual behaviour

Trying to perform this upgrade fails with an error

sudo -u www-data php /path/to/occ upgrade

Going deeper into the rabbit hole (following the advice to deactivate those apps)
i.e. via

for i in activity files_locking files_pdfviewer files_videoviewer updater; do sudo -u www-data php /path/to/owncloud/occ app:disable $i; done

and re-running

sudo -u www-data php /path/to/occ upgrade

results in

Server configuration

Operating system:
Ubuntu 16.04.3 LTS 4.9.50-x86_64

Web server:
apache2 (2.4.18-2ubuntu3.5)

Database:
mariadb-server-10.0 (10.0.31-0ubuntu0.16.04.2)

PHP version:
PHP Version 7.0.22-0ubuntu0.16.04.1

ownCloud version: (see ownCloud admin page)
10.0.4

Updated from an older ownCloud or fresh install:
Fresh install (with attempted mysql dump restore from a 8.1.3 database)

Where did you install ownCloud from:
https://download.owncloud.org/community/owncloud-10.0.4.tar.bz2 following https://doc.owncloud.org/server/latest/admin_manual/installation/source_installation.html

Signing status (ownCloud 9.0 and above):

The content of config/config.php:

<?php
$CONFIG = array (
  'instanceid' => 'xxx',
  'passwordsalt' => 'xxx',
  'secret' => 'xxx',
  'trusted_domains' =>
  array (
    0 => 'xxx',
  ),
  'datadirectory' => '/path/to/owncloud/data',
  'overwrite.cli.url' => 'https://xxx/owncloud',
  'dbtype' => 'mysql',
  'version' => '10.0.4.4',
  'dbname' => 'xxx',
  'dbhost' => 'localhost',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'xxx',
  'dbpassword' => 'xxx',
  'logtimezone' => 'UTC',
  'installed' => true,
  'theme' => '',
  'loglevel' => 2,
  'maintenance' => true,
);

List of activated apps:

ownCloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Enabled:
  - calendar: 0.7.3
  - contacts: true
  - dav: true
  - federatedfilesharing: true
  - files: 1.1.10
  - files_external: true
  - files_sharing: 0.6.2
  - files_texteditor: 0.4
  - files_trashbin: 0.6.3
  - files_versions: 1.0.6
  - firstrunwizard: 1.1
  - gallery: 0.6.0
  - provisioning_api: 0.2
  - templateeditor: 0.1
Disabled:
  - comments
  - configreport
  - encryption
  - external
  - federation
  - files_videoplayer
  - market
  - notifications
  - systemtags
  - theme-example
  - updatenotification
  - user_external

Are you using external storage, if yes which one: local/smb/sftp/...
No

Are you using encryption: yes/no
No

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
No

Client configuration

Browser:
firefox 57.0.3+build1-0ubuntu0.16.04.1
Operating system:
Ubuntu 16.04.3 LTS

Logs

Web server error log

xxx.xxx.xxx.xxx - - [04/Jan/2018:10:05:21 +1000] "GET /owncloud/core/img/logo.svg HTTP/1.1" 304 201 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0"
xxx.xxx.xxx.xxx - - [04/Jan/2018:10:05:21 +1000] "GET /owncloud/core/img/actions/confirm.svg HTTP/1.1" 304 200 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0"
xxx.xxx.xxx.xxx - - [04/Jan/2018:10:05:21 +1000] "GET /owncloud/core/img/background.jpg HTTP/1.1" 304 202 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0"
xxx.xxx.xxx.xxx - - [04/Jan/2018:10:05:21 +1000] "GET /owncloud/core/vendor/browser-update/browser-update.js?=1515024321446 HTTP/1.1" 200 11334 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x8664; rv:57.0) Gecko/2010010
1 Firefox/57.0"
xxx.xxx.xxx.xxx - user [04/Jan/2018:10:05:21 +1000] "GET /owncloud/cron.php HTTP/1.1" 200 772 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0"
xxx.xxx.xxx.xxx - user [04/Jan/2018:10:10:45 +1000] "POST /owncloud/index.php/login HTTP/1.1" 303 5715 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0"
xxx.xxx.xxx.xxx - user [04/Jan/2018:10:10:46 +1000] "GET /owncloud/index.php/apps/files/ HTTP/1.1" 200 5651 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0"
xxx.xxx.xxx.xxx - user [04/Jan/2018:10:10:46 +1000] "GET /owncloud/index.php/core/js/oc.js?v=d7b98edf064f4a87fb2ffb306639e3f3 HTTP/1.1" 200 4615 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:57.0) Gecko/
20100101 Firefox/57.0"
xxx.xxx.xxx.xxx - user [04/Jan/2018:10:10:47 +1000] "GET /owncloud/cron.php HTTP/1.1" 200 772 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0"
xxx.xxx.xxx.xxx - user [04/Jan/2018:10:10:47 +1000] "PROPFIND /owncloud/remote.php/webdav/ HTTP/1.1" 207 3489 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0"
xxx.xxx.xxx.xxx - user [04/Jan/2018:10:10:47 +1000] "GET /owncloud/ocs/v2.php/apps/notifications/api/v1/notifications?format=json HTTP/1.1" 200 1054 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:57.0) Ge
cko/20100101 Firefox/57.0"
xxx.xxx.xxx.xxx - user [04/Jan/2018:10:10:47 +1000] "GET /owncloud/index.php/apps/files/ajax/getstoragestats.php?dir=%2F HTTP/1.1" 200 937 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:57.0) Gecko/201001
01 Firefox/57.0"
xxx.xxx.xxx.xxx - user [04/Jan/2018:10:10:47 +1000] "GET /owncloud/index.php/avatar/admin/28 HTTP/1.1" 200 983 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0"
xxx.xxx.xxx.xxx - user [04/Jan/2018:10:10:47 +1000] "GET /owncloud/index.php/apps/gallery/config?extramediatypes=1 HTTP/1.1" 200 1008 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:57.0) Gecko/20100101 Fi
refox/57.0"
xxx.xxx.xxx.xxx - user [04/Jan/2018:10:10:47 +1000] "GET /owncloud/index.php/avatar/admin/28 HTTP/1.1" 200 983 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0"
xxx.xxx.xxx.xxx - user [04/Jan/2018:10:10:56 +1000] "GET /owncloud/index.php/settings/users HTTP/1.1" 200 4823 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0"
xxx.xxx.xxx.xxx - user [04/Jan/2018:10:10:56 +1000] "GET /owncloud/index.php/core/js/oc.js?v=d7b98edf064f4a87fb2ffb306639e3f3 HTTP/1.1" 200 4615 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0"
xxx.xxx.xxx.xxx - user [04/Jan/2018:10:10:57 +1000] "GET /owncloud/cron.php HTTP/1.1" 200 772 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0"
xxx.xxx.xxx.xxx - user [04/Jan/2018:10:10:57 +1000] "GET /owncloud/index.php/settings/users/users?offset=0&limit=200&gid=&pattern= HTTP/1.1" 200 1355 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0"
xxx.xxx.xxx.xxx - user [04/Jan/2018:10:10:57 +1000] "GET /owncloud/ocs/v2.php/apps/notifications/api/v1/notifications?format=json HTTP/1.1" 200 1054 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0"
xxx.xxx.xxx.xxx - user [04/Jan/2018:10:10:57 +1000] "GET /owncloud/index.php/settings/users/stats HTTP/1.1" 200 921 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0"
xxx.xxx.xxx.xxx - user [04/Jan/2018:10:10:59 +1000] "GET /owncloud/index.php/logout?requesttoken=BlFhGHA3RDxeYxU8ejdXN0FdAHk%2BNkRUHSc1JyYGCBs%3D%3Abd9hEzqE7/BTOQ8Bt/tJXYsadFcNVONUQcWOEJADnB0%3D HTTP/1.1" 303 1583 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0"
xxx.xxx.xxx.xxx - user [04/Jan/2018:10:10:59 +1000] "GET /owncloud/index.php/login HTTP/1.1" 200 2929 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0"
xxx.xxx.xxx.xxx - user [04/Jan/2018:10:11:00 +1000] "GET /owncloud/index.php/core/js/oc.js?v=d7b98edf064f4a87fb2ffb306639e3f3 HTTP/1.1" 200 3661 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0"
xxx.xxx.xxx.xxx - - [04/Jan/2018:10:11:00 +1000] "GET /owncloud/core/vendor/browser-update/browser-update.js?=1515024660364 HTTP/1.1" 200 11334 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x8664; rv:57.0) Gecko/20100101 Firefox/57.0"
xxx.xxx.xxx.xxx - user [04/Jan/2018:10:11:00 +1000] "GET /owncloud/cron.php HTTP/1.1" 200 772 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0"
xxx.xxx.xxx.xxx - user [04/Jan/2018:10:13:34 +1000] "POST /owncloud/index.php/login HTTP/1.1" 200 2892 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0"
xxx.xxx.xxx.xxx - user [04/Jan/2018:10:13:34 +1000] "GET /owncloud/index.php/core/js/oc.js?v=5001bd3b523bc0efb416ad9a0768e18e HTTP/1.1" 503 7530 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0"
xxx.xxx.xxx.xxx - user [04/Jan/2018:10:15:08 +1000] "GET /owncloud/core/ajax/update.php?requesttoken=ImIBGHc%2FUR1HeA1Ef28AAQYhIj4lKGkBX2cPPQVkKQA%3D%3Ai0Uk6Lbm30kw%2F7LK0jeJNaZRj6xxIUodsYR8LTc%2F0NA%3D HTTP/1.1" 200 2625 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0"
xxx.xxx.xxx.xxx - user [04/Jan/2018:10:16:17 +1000] "GET /owncloud/index.php/login HTTP/1.1" 200 7492 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0"
xxx.xxx.xxx.xxx - user [04/Jan/2018:10:16:17 +1000] "GET /owncloud/index.php/core/js/oc.js?v=5001bd3b523bc0efb416ad9a0768e18e HTTP/1.1" 503 7530 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0"
xxx.xxx.xxx.xxx - user [04/Jan/2018:10:16:48 +1000] "GET /owncloud/index.php/login HTTP/1.1" 200 2892 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0"
xxx.xxx.xxx.xxx - user [04/Jan/2018:10:16:49 +1000] "GET /owncloud/index.php/core/js/oc.js?v=5001bd3b523bc0efb416ad9a0768e18e HTTP/1.1" 503 7530 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0"
xxx.xxx.xxx.xxx - user [04/Jan/2018:10:22:38 +1000] "GET /owncloud/index.php/login HTTP/1.1" 503 12457 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0"
xxx.xxx.xxx.xxx - - [04/Jan/2018:10:22:39 +1000] "GET /owncloud/core/js/maintenance-check.js?v=5001bd3b523bc0efb416ad9a0768e18e HTTP/1.1" 200 879 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0"
xxx.xxx.xxx.xxx - user [04/Jan/2018:10:22:39 +1000] "GET /owncloud/index.php/core/js/oc.js?v=5001bd3b523bc0efb416ad9a0768e18e HTTP/1.1" 200 3335 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0"

ownCloud log (data/owncloud.log)

{"reqId":"ALmnZHyGlzh8IXInA6Hp","level":3,"time":"2018-01-04T00:13:34+00:00","remoteAddr":"xxx.xxx.xxx.xxx","user":"--","app":"index","method":"GET","url":"\/owncloud\/index.php\/core\/js\/oc.js?v=5001bd3b523bc0efb416ad9a0768e18e","message":"Exception: {\"Exception\":\"OC\\NeedsUpdateException\",\"Message\":\"\",\"Code\":0,\"Trace\":\"#0 \/path\/to\/owncloud\\/lib\\/private\\/legacy\\/app.php(128): OC_App::loadApp('files')\n#1 \/path\/to\/owncloud\\/lib\\/private\\/legacy\\/util.php(145): OC_App::loadApps(Array)\n#2 \/path\/to\/owncloud\\/lib\\/base.php(928): OC_Util::setupFS()\n#3 \/path\/to\/owncloud\\/index.php(56): OC::handleRequest()\n#4 {main}\",\"File\":\"\/path\/to\/owncloud\\/lib\\/private\\/legacy\\/app.php\",\"Line\":192}"}
{"reqId":"dzRyoxdY5QlP6aCYpQio","level":0,"time":"2018-01-04T00:15:08+00:00","remoteAddr":"xxx.xxx.xxx.xxx","user":"--","app":"core","method":"GET","url":"\/owncloud\/core\/ajax\/update.php?requesttoken=ImIBGHc%xxx%3D%3Ai0Uk6Lbm30kw%2F7LK0jeJNaZRj6xxIUodsYR8LTc%2F0NA%3D","message":"starting upgrade from 10.0.4.4 to 10.0.4.4"}
{"reqId":"dzRyoxdY5QlP6aCYpQio","level":3,"time":"2018-01-04T00:15:08+00:00","remoteAddr":"xxx.xxx.xxx.xxx","user":"--","app":"core","method":"GET","url":"\/owncloud\/core\/ajax\/update.php?requesttoken=ImIBGHc%xxx%3D%3Ai0Uk6Lbm30kw%2F7LK0jeJNaZRj6xxIUodsYR8LTc%2F0NA%3D","message":"Exception: {\"Exception\":\"OC\\RepairException\",\"Message\":\"Upgrade is not possible\",\"Code\":0,\"Trace\":\"#0 \/path\/to\/owncloud\\/lib\\/private\\/Repair.php(88): OC\\Repair\\Apps->run(Object(OC\\Repair))\n#1 \/path\/to\/owncloud\\/lib\\/private\\/Updater.php(221): OC\\Repair->run()\n#2 \/path\/to\/owncloud\\/lib\\/private\\/Updater.php(108): OC\\Updater->doUpgrade('10.0.4.4', '10.0.4.4')\n#3 \/path\/to\/owncloud\\/core\\/ajax\\/update.php(190): OC\\Updater->upgrade()\n#4 {main}\",\"File\":\"\/path\/to\/owncloud\\/lib\\/private\\/Repair\\/Apps.php\",\"Line\":196}"}
{"reqId":"q2WK8yZe402HSztBe4Je","level":3,"time":"2018-01-04T00:16:17+00:00","remoteAddr":"xxx.xxx.xxx.xxx","user":"--","app":"index","method":"GET","url":"\/owncloud\/index.php\/core\/js\/oc.js?v=5001bd3b523bc0efb416ad9a0768e18e","message":"Exception: {\"Exception\":\"OC\\NeedsUpdateException\",\"Message\":\"\",\"Code\":0,\"Trace\":\"#0 \/path\/to\/owncloud\\/lib\\/private\\/legacy\\/app.php(128): OC_App::loadApp('files')\n#1 \/path\/to\/owncloud\\/lib\\/private\\/legacy\\/util.php(145): OC_App::loadApps(Array)\n#2 \/path\/to\/owncloud\\/lib\\/base.php(928): OC_Util::setupFS()\n#3 \/path\/to\/owncloud\\/index.php(56): OC::handleRequest()\n#4 {main}\",\"File\":\"\/path\/to\/owncloud\\/lib\\/private\\/legacy\\/app.php\",\"Line\":192}"}
{"reqId":"nbo7Df2OzrNQtNrQF5Ll","level":3,"time":"2018-01-04T00:16:49+00:00","remoteAddr":"xxx.xxx.xxx.xxx","user":"--","app":"index","method":"GET","url":"\/owncloud\/index.php\/core\/js\/oc.js?v=5001bd3b523bc0efb416ad9a0768e18e","message":"Exception: {\"Exception\":\"OC\\NeedsUpdateException\",\"Message\":\"\",\"Code\":0,\"Trace\":\"#0 \/path\/to\/owncloud\\/lib\\/private\\/legacy\\/app.php(128): OC_App::loadApp('files')\n#1 \/path\/to\/owncloud\\/lib\\/private\\/legacy\\/util.php(145): OC_App::loadApps(Array)\n#2 \/path\/to\/owncloud\\/lib\\/base.php(928): OC_Util::setupFS()\n#3 \/path\/to\/owncloud\\/index.php(56): OC::handleRequest()\n#4 {main}\",\"File\":\"\/path\/to\/owncloud\\/lib\\/private\\/legacy\\/app.php\",\"Line\":192}"}
{"reqId":"nnhs2kepYVEndozarq3f","level":0,"time":"2018-01-04T00:17:19+00:00","remoteAddr":"","user":"--","app":"core","method":"--","url":"--","message":"starting upgrade from 10.0.4.4 to 10.0.4.4"}
{"reqId":"nnhs2kepYVEndozarq3f","level":3,"time":"2018-01-04T00:17:19+00:00","remoteAddr":"","user":"--","app":"core","method":"--","url":"--","message":"Exception: {\"Exception\":\"OC\\RepairException\",\"Message\":\"Upgrade is not possible\",\"Code\":0,\"Trace\":\"#0 \/path\/to\/owncloud\\/lib\\/private\\/Repair.php(88): OC\\Repair\\Apps->run(Object(OC\\Repair))\n#1 \/path\/to\/owncloud\\/lib\\/private\\/Updater.php(221): OC\\Repair->run()\n#2 \/path\/to\/owncloud\\/lib\\/private\\/Updater.php(108): OC\\Updater->doUpgrade('10.0.4.4', '10.0.4.4')\n#3 \/path\/to\/owncloud\\/core\\/Command\\/Upgrade.php(254): OC\\Updater->upgrade()\n#4 \/path\/to\/owncloud\\/lib\\/composer\\/symfony\\/console\\/Command\\/Command.php(262): OC\\Core\\Command\\Upgrade->execute(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#5 \/path\/to\/owncloud\\/lib\\/composer\\/symfony\\/console\\/Application.php(826): Symfony\\Component\\Console\\Command\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#6 \/path\/to\/owncloud\\/lib\\/composer\\/symfony\\/console\\/Application.php(189): Symfony\\Component\\Console\\Application->doRunCommand(Object(OC\\Core\\Command\\Upgrade), Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#7 \/path\/to\/owncloud\\/lib\\/composer\\/symfony\\/console\\/Application.php(120): Symfony\\Component\\Console\\Application->doRun(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#8 \/path\/to\/owncloud\\/lib\\/private\\/Console\\/Application.php(162): Symfony\\Component\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#9 \/path\/to\/owncloud\\/console.php(106): OC\\Console\\Application->run()\n#10 \/path\/to\/owncloud\\/occ(11): require_once('\\/path\\/to\\/publi...')\n#11 {main}\",\"File\":\"\/path\/to\/owncloud\\/lib\\/private\\/Repair\\/Apps.php\",\"Line\":196}"}
{"reqId":"nH6xqYPgNqjdCJ3qxTGe","level":0,"time":"2018-01-04T00:22:49+00:00","remoteAddr":"","user":"--","app":"core","method":"--","url":"--","message":"starting upgrade from 10.0.4.4 to 10.0.4.4"}
{"reqId":"nH6xqYPgNqjdCJ3qxTGe","level":3,"time":"2018-01-04T00:22:49+00:00","remoteAddr":"","user":"--","app":"core","method":"--","url":"--","message":"Exception: {\"Exception\":\"Exception\",\"Message\":\"An exception occurred while executing 'INSERT INTO oc_jobs (class, argument, last_run, last_checked) VALUES(?, ?, ?, ?)' with params [\\"\\\\OC\\\\Authentication\\\\Token\\\\DefaultTokenCleanupJob\\", \\"null\\", 0, 1515025369]:\n\nSQLSTATE[42S22]: Column not found: 1054 Unknown column 'last_checked' in 'field list'\",\"Code\":0,\"Trace\":\"#0 \/path\/to\/owncloud\\/lib\\/private\\/Updater.php(108): OC\\Updater->doUpgrade('10.0.4.4', '10.0.4.4')\n#1 \/path\/to\/owncloud\\/core\\/Command\\/Upgrade.php(254): OC\\Updater->upgrade()\n#2 \/path\/to\/owncloud\\/lib\\/composer\\/symfony\\/console\\/Command\\/Command.php(262): OC\\Core\\Command\\Upgrade->execute(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#3 \/path\/to\/owncloud\\/lib\\/composer\\/symfony\\/console\\/Application.php(826): Symfony\\Component\\Console\\Command\\Command->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#4 \/path\/to\/owncloud\\/lib\\/composer\\/symfony\\/console\\/Application.php(189): Symfony\\Component\\Console\\Application->doRunCommand(Object(OC\\Core\\Command\\Upgrade), Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#5 \/path\/to\/owncloud\\/lib\\/composer\\/symfony\\/console\\/Application.php(120): Symfony\\Component\\Console\\Application->doRun(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#6 \/path\/to\/owncloud\\/lib\\/private\\/Console\\/Application.php(162): Symfony\\Component\\Console\\Application->run(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))\n#7 \/path\/to\/owncloud\\/console.php(106): OC\\Console\\Application->run()\n#8 \/path\/to\/owncloud\\/occ(11): require_once('\\/path\\/to\\/publi...')\n#9 {main}\",\"File\":\"\/path\/to\/owncloud\\/lib\\/private\\/Updater.php\",\"Line\":229}"}

So my question is:

What's the recommended (and working) way to restore the data from a 8.1.3 mysql DB dump into the freshly created 10.0.4 DB?

Is there a DB migration process / step / script that I have overlooked?

Thanks a lot in advance,
daebi