Proper order to upgrade Owncloud 9/Ubuntu 14 to latest version of 10/16


Hello all. I installed Owncloud 9.1 from an ovf and it’s been running great. Now that the desktop clients are upgrading they have stopped syncing so it’s time to upgrade. I have backups and this is a VM so i will be cloning the VM and doing the upgrade on the clone VM before touching production.

There are 14 users and this is accessed from the outside so i have security certificates so I would like to do the upgrade to preserve users and the certs.

what would be the correct order to do the upgrade.

run the do-release-upgrade from the command line to upgrade Ubuntu first and then run the owncloud package upgrade?

Owncloud 10 says that ubuntu 16.04 is the minimum release. Does that mean that the owncloud upgrade will not work on 14 and then do the release upgrade?

Should I upgrade Ubuntu, then download the owncloud manual upgrade and do the manually? If i preserved the certs and had to redo the users it would not be the worst thing in the world as the users are LDAP. I’m assuming I would have to redo the ldap connection?

Thanks for taking the time to read this.

Migrate and upgrade OwnCloud 9.0.11 to OwnCloud 10

My setup is more simple (I’m the only user, no LDAP) but my setup and goal are similar to yours.

I’ve tried to start upgrading VM from 14.04 LTS to 16.04 LTS doing “do-release-upgrade”, but after ending and restarting, the machine never ends booting, and gets stuck forever with the message “hrtimer: interrupt took 3274999 ns”… I’ve googled a bit, but I’m not an expert linux man, so I haven’t found the problem.

As I can’t upgrade to 16.04, as you say, I can’t upgrade to OC 10…



it looks to me like nearly the exact same question was asked only a few days ago in the thread below.


Hi J,

I recently just had to sink 3 days of my own into navigating a way from Ubuntu 14.04 and OC 8.0.2 (!) to something current. It was a real S#!tshow… but I can try to share how I went about it. I was personally able to snapshot my VPS and separate ‘owncloud data’ block storage device separately… so I could try different approaches to … inch… myself forward, and just revert back if things exploded on me. I also tried to take notes as complete as possible when doing so. They are terse, but hopefully they are of some help:

First focused on doing manual OC version upgrades to last 8.X release:

“successfully upgraded from OC 8.0.2 to 8.1.12, then to 8.2.11… Services are still left in maintenance mode”

At this point, I noticed that OC 8.2.11 was fixing a whole slew of bad file CACHE entries on my instance. my OwnCloud “data” volume is exceedingly slow, so this literally took HOURS to fix itself and work through the issues

Still at Ubuntu 14.04 and PHP 5, I cautiously upgraded to OC 9.0.11

This was successful, and I monitored for awhile, bringing services out of maintenance mode (To let family and friends have their clients sync… and tailing the owncloud log for indications that something had gone sideways). Everything appeared healthy… so I proceeded with my next big step;

Back to maintenance mode, I attempted to upgrade from PHP 5.X to PHP7

This was the most labour intensive part of my particular ordeal. My notes may not be 100%.

service apache2 stop

After adding the repository sources for PHP7 on my Ubuntu 14.04 instance… I installed the following packages:


I then purged the old PHP5:

apt-get purge php5-common

I also have a note about modifying a php.ini file to allow for ‘short tags’ (may or may not have been required):

“nano /etc/php/7.0/apache2/php.ini
something about short tags???”

I then enabled PHP7 in Apache with:

a2enmod php7.0

… and restarted the Apache webserver:

service apache2 restart

At this point, I again took things out of Maintenance mode and appeared to have a fully functional OC installation on PHP7 and Ubuntu 14.04

I then did a do-release-upgrade to 16.04 LTS, which succeeded without issue

Finally, I did another manual OC upgrade to version 10.0.10… which was successful

I now sit on 16.04 LTS w/ PHP 7.0 and OC 10.0.10. Eventually, the friends and family (and all their mobile apps) all sync’d to the server and all was right with the world again.

I hope some part of my own ordeal is of use to you.


Thank you both for posting those. It will be a great help next week. I will post back what happens


Wow! That was an epic trip.

I finally started from scratch and installed a new appliance. It’s great to see them based on Debian now. BTW, Univentions is a great platform!!!


I also had a non-booting VM after trying to update Ubuntu 14.04 LTS to 16.04 LTS. I ended up migrating ownCloud to a new Ubuntu 18.04 VM.

I would definitely clone your VM and get the upgrade process worked out on the test box first.

Here’s the simplified process of what I did (I have all the details written down if you’d like them):

  1. Install tar version of ownCloud 10.0.7 in separate folder on 14.04 box.
  2. Migrate ownCloud data/settings from package version that came with OVF to new tar version and adjust permissions as needed.
  3. Install and enable PHP 7.2 (backported)
  4. Setup Ubuntu 18.04 Server on new VM
  5. Install required prerequisites (for example, apache2, mysql-server, php7.2)
  6. Install tar version of ownCloud 10.0.7 in folder on 18.04 box (with same folder name as tar version on 14.04 box).
  7. Migrate ownCloud data/settings from tar version on 14.04 box to 18.04 box
  8. Install latest ownCloud package version on 18.04 box
  9. Migrate ownCloud data/settings from tar version to package version on 18.04
  10. Once everything is working remove tar version on 18.04 box

Some of this may have been unnecessary, but my goal was to get the 14.04 and 18.04 boxes as similar as possible before the migration to 18.04 (Both had PHP 7.2 and the same tar version of OwnCloud 10.0.7 when I migrated).


Hello All. Thanks again for the help.
I followed CTRLBREAK’s steps and everything was running well. I think I had a problem during the manual upgrade.

I renamed my /var/www/owncloud directory to owncloud-orig I then downloaded the tarball for owncloud version 10. I extracted it into /var/www so I should have a version 10 owncloud directory. I then copied my config.php and data directory into the new owncloud directory When I went to finish the upgrade with the occ command I get the following errors. I have made sure all the php7.0 modules are installed. I have found some similar posts but nothing they suggested has fixed this. Are errors like this able to be resolved or should I clone it and start the upgrade process again because I missed a step.

Again thanks for taking the time to respond.

sudo -u www-data php occ upgrade

An unhandled exception has been thrown:

Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [2002] No such file or directory in /var/www/owncloud/lib/private/DB/Connection.php:62

Stack trace:
#0 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OC\DB\Connection->connect()
#1 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\DBAL\Connection->getDatabasePlatformVersion()
#2 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): Doctrine\DBAL\Connection->detectDatabasePlatform()
#3 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(623): Doctrine\DBAL\Connection->getDatabasePlatform()
#4 /var/www/owncloud/lib/private/DB/Connection.php(144): Doctrine\DBAL\Connection->setTransactionIsolation(2)
#5 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(172): OC\DB\Connection->__construct(Array, Object(Doctrine\DBAL\Driver\PDOMySql\Driver), Object(Doctrine\DBAL\Configuration), Object(Doctrine\Common\EventManager))
#6 /var/www/owncloud/lib/private/DB/ConnectionFactory.php(145): Doctrine\DBAL\DriverManager::getConnection(Array, Object(Doctrine\DBAL\Configuration), Object(Doctrine\Common\EventManager))
#7 /var/www/owncloud/lib/private/Server.php(529): OC\DB\ConnectionFactory->getConnection(‘mysql’, Array)
#8 /var/www/owncloud/lib/composer/pimple/pimple/src/Pimple/Container.php(113): OC\Server->OC{closure}(Object(OC\Server))
#9 /var/www/owncloud/lib/private/AppFramework/Utility/SimpleContainer.php(108): Pimple\Container->offsetGet(‘DatabaseConnect…’)
#10 /var/www/owncloud/lib/private/ServerContainer.php(86): OC\AppFramework\Utility\SimpleContainer->query(‘DatabaseConnect…’)
#11 /var/www/owncloud/lib/private/Server.php(1213): OC\ServerContainer->query(‘DatabaseConnect…’)
#12 /var/www/owncloud/lib/private/Server.php(404): OC\Server->getDatabaseConnection()
#13 /var/www/owncloud/lib/composer/pimple/pimple/src/Pimple/Container.php(113): OC\Server->OC{closure}(Object(OC\Server))
#14 /var/www/owncloud/lib/private/AppFramework/Utility/SimpleContainer.php(108): Pimple\Container->offsetGet(‘AppConfig’)
#15 /var/www/owncloud/lib/private/ServerContainer.php(86): OC\AppFramework\Utility\SimpleContainer->query(‘AppConfig’)
#16 /var/www/owncloud/lib/private/Server.php(1143): OC\ServerContainer->query(‘AppConfig’)
#17 /var/www/owncloud/lib/private/Server.php(583): OC\Server->getAppConfig()
#18 /var/www/owncloud/lib/composer/pimple/pimple/src/Pimple/Container.php(113): OC\Server->OC{closure}(Object(OC\Server))
#19 /var/www/owncloud/lib/private/AppFramework/Utility/SimpleContainer.php(108): Pimple\Container->offsetGet(‘AppManager’)
#20 /var/www/owncloud/lib/private/ServerContainer.php(86): OC\AppFramework\Utility\SimpleContainer->query(‘AppManager’)
#21 /var/www/owncloud/lib/private/Server.php(1411): OC\ServerContainer->query(‘AppManager’)
#22 /var/www/owncloud/lib/private/legacy/app.php(346): OC\Server->getAppManager()
#23 /var/www/owncloud/lib/private/legacy/app.php(110): OC_App::getEnabledApps()
#24 /var/www/owncloud/lib/base.php(577): OC_App::loadApps(Array)
#25 /var/www/owncloud/lib/base.php(994): OC::init()
#26 /var/www/owncloud/console.php(64): require_once(’/var/www/ownclo…’)