Automatic apt upgrade from 8.1.8.2 > 9.1.2.5 broken installation

upgrade
help

#1

Please help us by providing the following info. Before posting please also check the pinned "Known issues" threads and make sure that you're running the latest available version for your oC release: https://owncloud.org/changelog/

Steps to reproduce
1. apt-get update && apt-get upgrade
2. site went into maintenance mode
3. site tells me it can't upgrade between major versions

Expected behaviour
I have apt scheduled to automatically update. We were running owncloud 8.1.8.2 on a Ubuntu 14.04 server install. The apt update moved us to 9.1.2.5 and put owncloud in maintenance mode. It won't come out of maintenance mode as it says upgrades between major versions is not supported.

Actual behaviour
I get prompted to run the upgrade assistant, and then informed that upgrades between major versions is not supported

Server configuration
Operating system: Ubuntu 14.04
Web server: Apache 2.4.7-1ubuntu4
Database: mysql 5.5.35+dfsg-1ubuntu1
PHP version: php 5.5.9+dfsg-1ubuntu4
ownCloud version (see ownCloud admin page): /var/www/owncloud/version says 9.1.2.5
Updated from an older ownCloud or fresh install: /var/www/owncloud/config/config.php says 8.1.8.2
Special configuration (external storage, external authentication, reverse proxy, server-side-encryption): n/a

ownCloud log (data/owncloud.log)

Please paste possible errors in the following code block, see https://central.owncloud.org/t/how-to-find-webserver-or-oc-logfile-enable-php-logfile/808 for more info

\"Message\":\"\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/legacy\\\/app.php(120): OC_App::loadApp('files')\\n#1 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/legacy\\\/util.php(135): OC_App::loadApps(Array)\\n#2 \\\/var\\\/www\\\/owncloud\\\/lib\\\/base.php(890): OC_Util::setupFS()\\n#3 \\\/var\\\/www\\\/owncloud\\\/index.php(54): OC::handleRequest()\\n#4 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/legacy\\\/app.php\",\"Line\":148}","level":3,"time":"2017-02-03T15:39:02+00:00","method":"GET","url":"\/index.php\/core\/js\/oc.js?v=9c06620151f743f5baef439af7e096a8","user":"--"}
{"reqId":"RyGB2Dz\/0y\/KJ0zESusj","remoteAddr":"192.168.21.69","app":"index","message":"Exception: {\"Exception\":\"OC\\\\NeedsUpdateException\",\"Message\":\"\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/legacy\\\/app.php(120): OC_App::loadApp('files')\\n#1 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/legacy\\\/util.php(135): OC_App::loadApps(Array)\\n#2 \\\/var\\\/www\\\/owncloud\\\/lib\\\/base.php(890): OC_Util::setupFS()\\n#3 \\\/var\\\/www\\\/owncloud\\\/index.php(54): OC::handleRequest()\\n#4 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/legacy\\\/app.php\",\"Line\":148}","level":3,"time":"2017-02-09T16:17:01+00:00","method":"GET","url":"\/index.php\/core\/js\/oc.js?v=9c06620151f743f5baef439af7e096a8","user":"--"}
{"reqId":"b0hYc3WlAco402ZXtriH","remoteAddr":"192.168.21.69","app":"core","message":"starting upgrade from 8.1.8.2 to 9.1.2.5","level":0,"time":"2017-02-09T16:17:05+00:00","method":"GET","url":"\/core\/ajax\/update.php?requesttoken=PVEIJwo0PA4WZxxzLQ9XLXgBJyVuFQcbKi4BExF%2BIUs%3D%3AQ7KsabkFG3d5WedgJ2JM6zDqhMDjvHQy5309UtrArsc%3D","user":"--"}
{"reqId":"b0hYc3WlAco402ZXtriH","remoteAddr":"192.168.21.69","app":"core","message":"Exception: {\"Exception\":\"Exception\",\"Message\":\"Updates between multiple major versions and downgrades are unsupported.\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Updater.php(150): OC\\\\Updater->doUpgrade('9.1.2.5', '8.1.8.2')\\n#1 \\\/var\\\/www\\\/owncloud\\\/core\\\/ajax\\\/update.php(193): OC\\\\Updater->upgrade()\\n#2 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Updater.php\",\"Line\":210}","level":3,"time":"2017-02-09T16:17:05+00:00","method":"GET","url":"\/core\/ajax\/update.php?requesttoken=PVEIJwo0PA4WZxxzLQ9XLXgBJyVuFQcbKi4BExF%2BIUs%3D%3AQ7KsabkFG3d5WedgJ2JM6zDqhMDjvHQy5309UtrArsc%3D","user":"--"}
{"reqId":"KMvw3eOhEMI1XgOsYq6c","remoteAddr":"192.168.21.69","app":"index","message":"Exception: {\"Exception\":\"OC\\\\NeedsUpdateException\",\"Message\":\"\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/legacy\\\/app.php(120): OC_App::loadApp('files')\\n#1 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/legacy\\\/util.php(135): OC_App::loadApps(Array)\\n#2 \\\/var\\\/www\\\/owncloud\\\/lib\\\/base.php(890): OC_Util::setupFS()\\n#3 \\\/var\\\/www\\\/owncloud\\\/index.php(54): OC::handleRequest()\\n#4 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/legacy\\\/app.php\",\"Line\":148}","level":3,"time":"2017-02-10T09:57:05+00:00","method":"GET","url":"\/index.php\/core\/js\/oc.js?v=9c06620151f743f5baef439af7e096a8","user":"--"}
{"reqId":"oQXfirLzMJViKAo3NJJ0","remoteAddr":"192.168.21.69","app":"index","message":"Exception: {\"Exception\":\"OC\\\\NeedsUpdateException\",\"Message\":\"\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/legacy\\\/app.php(120): OC_App::loadApp('files')\\n#1 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/legacy\\\/util.php(135): OC_App::loadApps(Array)\\n#2 \\\/var\\\/www\\\/owncloud\\\/lib\\\/base.php(890): OC_Util::setupFS()\\n#3 \\\/var\\\/www\\\/owncloud\\\/index.php(54): OC::handleRequest()\\n#4 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/legacy\\\/app.php\",\"Line\":148}","level":3,"time":"2017-02-10T10:04:46+00:00","method":"GET","url":"\/index.php\/core\/js\/oc.js?v=9c06620151f743f5baef439af7e096a8","user":"--"}
{"reqId":"R62esZoAh7\/2+lVs9ALs","remoteAddr":"","app":"cli","message":"Memcache \\OC\\Memcache\\APCu not available for local cache","level":1,"time":"2017-02-21T11:06:01+00:00","method":"--","url":"--","user":"--"}
{"reqId":"R62esZoAh7\/2+lVs9ALs","remoteAddr":"","app":"cli","message":"Memcache \\OC\\Memcache\\APCu not available for distributed cache","level":1,"time":"2017-02-21T11:06:01+00:00","method":"--","url":"--","user":"--"}
{"reqId":"\/TzjcWbGRpvVVsuxJFVa","remoteAddr":"","app":"cli","message":"Memcache \\OC\\Memcache\\APCu not available for local cache","level":1,"time":"2017-02-21T11:06:35+00:00","method":"--","url":"--","user":"--"}
{"reqId":"\/TzjcWbGRpvVVsuxJFVa","remoteAddr":"","app":"cli","message":"Memcache \\OC\\Memcache\\APCu not available for distributed cache","level":1,"time":"2017-02-21T11:06:35+00:00","method":"--","url":"--","user":"--"}

Integrity status for oC9+

This ownCloud instance is currently in maintenance mode, which may take a while.
This page will refresh itself when the ownCloud instance is available again.
Contact your system administrator if this message persists or appeared unexpectedly.
Thank you for your patience..

#2

See the documentation at [1] how to do a correct upgrade when skipping major releases (8.2 and 9.0).

[1] https://doc.owncloud.org/server/latest/admin_manual/maintenance/package_upgrade.html#upgrading-across-skipped-releases


#3

The thing is that says I should use my package manager to move to the next minor update:

  1. Add the repository of your current version (e.g. 8.1.x)
  2. Upgrade your current version to the latest point release (e.g. 8.1.10) via your package manager

However my "package manager" in this case apt, thinks the earliest available version is 9.1.2.5, and I used to have 8.1.8.2 installed, so I can't do as it asks and use my package manager to move to 8.1.x as it's not longer in the package repository.

I don't want to try and manually fix it in place, because apt keeps intefering with the owncloud files.

I think my solution is to move my data and database to a new host, and manually install 8.1.x and then step through the upgrades, but I have no idea what process to do this and if there are anything I need to take into account recovering the data from an "apt" installation to a "tarball" installation, or if it's even possible.

Really annoyed at whoever it was that decided to bump the version in the package manager, so that it would break upon upgrade.


#4

Please read the linked documentation which shows you where you can get the repositories providing each major release.


#5

do you have a link - because I can't find any repo's for older versions of the software, the ones on the download page only provide the current version, and the documentation that says I should do what you suggest don't provide any repos.

https://doc.owncloud.org/server/latest/admin_manual/maintenance/package_upgrade.html#skipped-release-upgrade-label


#6

You’ll find repositories of previous ownCloud major releases in the ownCloud Server Changelog.

-> https://owncloud.org/changelog/

-> 8.1 -> http://software.opensuse.org/download/package?project=isv:ownCloud:community:8.1&package=owncloud
-> 8.2 -> https://download.owncloud.org/download/repositories/8.2/owncloud
-> 9.0 -> https://download.owncloud.org/download/repositories/9.0/owncloud
-> 9.1 -> https://download.owncloud.org/download/repositories/9.1/owncloud


#7

thanks I'll try this!


#8

Okay so I removed the current /etc/apt/sources.list.d/owncloud.list and replaced it with the 8.1.x version from the linked document (ubuntu 14.04 8.1.x).

then i removed owncloud with "apt-get remove owncloud" and installed the 8.1.x version with "apt-get install owncloud".

Now when I visit the webpage I get maintenance page telling me to manually upgrade so I do:

$ sudo -u www-data /var/www/owncloud/occ upgrade
ownCloud or one of the apps require upgrade - only a limited number of commands are available
Set log level to debug - current level: 'Debug'
Checked database schema update
OC\HintException: Missing memcache class \OC\Memcache\APCu for local cache
Update failed
Maintenance mode is kept active
Reset log level to 'Debug'


#9

Okay I have fixed the above issue with APCu by tweaking my php5 config to force load it (I know this is not ideal but I need to recover the data before moving to a fresh insallation).

I have now managed to step through all the intermediary releases up to current, thank you for the links you provided!


#10

Nice that you got it to work.

If you want to stay at one major release you can use:

https://download.owncloud.org/download/repositories/9.1/owncloud

instead of

https://download.owncloud.org/download/repositories/stable/owncloud

This avoids that you're getting automatically upgraded to a next major release if it hits the "stable" repository


#11

thats really good info to know - thanks!