nextcloud

Nextcloud’s new Updater app (how to)

We made our first experiencies and became more and more familiar with the new Nextcloud Updater app. Having regards to the official documenation (https://docs.nextcloud.com/server/10/admin_manual/maintenance/update.html) we provide a mini “how to” for your personal environment on a Raspberry or oDroid SBC.


(1) First create a dedicated pre-update-backupfile of your Nextcloud database
(2) Start Upgrade within Nextcloud
(2.1) exception handling
(3) Start Upgrade within your administrator secure shell
(4) Verify the upgrade within Nextcloud


In Genereal the new Nextcloud Updater app works as shown below:

  • Creates a backup directory under your Nextcloud data directory
    /var/nc_data/updater_backup
  • Downloads and extracts updated package content into
    /var/nc_data/updater_backup/packageVersion
  • Makes a copy of your current Nextcloud instance, except for your data directory, to
    /var/nc_data/updater_backup/currentVersion-randomstring
  • Moves all directories (except nc_data, config & themes) from the current instance to
    /var/nc_data/updater_backup/tmp
  • Moves all directories from
    /var/nc_data/updater_backup/packageVersion
    to the current version
  • Copies your old config.php to the new /var/www/nextcloud/config/ directory

(1) First create a dedicated pre-update-backupfile of your Nextcloud database

sudo -s
mysqldump --lock-tables -hlocalhost -unextcloud -pyourpassword nextcloud > nextcloud-sqlbkp_`date +"%Y%m%d"`.bak

(2) Start Upgrade within Nextcloud

Then log in as Nextcloud Administrator and switch to the Administrator panel:

© c-rieger.de

Scroll down and start running the new Updater app:

© c-rieger.de © c-rieger.de&copy, c-rieger.de

At least select “Yes (for usage with command line tool)” to finish the upgrade using Nextcloud’s command line (chapter 3)

&copy, c-rieger.de

or select “No (for usage of the web based updater)” to finish the upgrade using the web-ui:

© c-rieger.de © c-rieger.de

(2.1) exception handling

Updater message: “The following extra files have been found

© c-rieger.de

Solution: remove the directory (e.g. temp) from within /var/www/nextcloud

rm -R /var/www/nextcloud/temp

Please adjust the path accordingly to the error message.

Updater message: “The following places can not be written to:

© c-rieger.de

Solution: set the permissions to the nginx or apache web-user (e.g. www-data)

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

or run the permission.sh skript. Please adjust the path accordingly to the error message.

(3) Start Upgrade within your administrator secure shell

Change to your ssh session to execute the finale upgrade process.

cd /var/www/nextcloud
sudo -u www-data php occ upgrade

&copy, c-rieger.de

Finally we just have to set the maintenance mode to “off”

&copy, c-rieger.de

(4) Verify the upgrade within Nextcloud

Excellent, Nextcloud was already upgrated

© c-rieger.de

Enjoy your new Nextcloud!