Migrating OwnCloud 9.1.1 to NextCloud 12.0.4

Migrating OwnCloud 9.1.1 to NextCloud 12.0.4

Hosting Cloud: AlibabaCloud ECS
NextCloud Reference

Backup

Backup Files

  • config
  • database
  • the data directory

Migration

cd /path/to/owncloud //Default Path: /var/www/html/owncloud
wget https://download.nextcloud.com/server/installer/migrator/index.php
mv index.php.1 updater/index.php

Use browser with URL
your.owncloudserver.com/updater/index.php

and login

The updater will then start to proceed

After the Process, "Keep maintenance mode active?"
Yes:
Back to terminal

sudo -u www-data php occ upgrade

No:Web based updater
It will suggest to use command line because the system is too large to update this way

sudo -u www-data php occ maintenance:mode --off

Possible issues

PHP 5.5

Upgrade to PHP 5.6

sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php5.6 php5.6-mbstring php5.6-mcrypt php5.6-mysql php5.6-xml \
php5.6-apcu php5.6-zip php5.6-gd php5.6-curl
sudo a2dismod php5
sudo a2enmod php5.6
sudo service apache2 restart

Missing add-apt-repository command

sudo apt-get install software-properties-common python-software-properties

Permission Problem

sudo chown -R www-data:www-data /var/www/nextcloud 

File not show up after a upgrade

sudo -u www-data php console.php files:scan --all

Upgrade to the newest version

Updater

Manually

Strong Directory Permission

Show Comments