Test our new work-in-progress upgrader script

I donĀ“t care about hardening permissions as long as my install is on my Synology and not reachable from the web. So I did not change anything after the original installation.

but I think the updater script/folder itself needs a changed permission, even if you stayed with the weak permissions. Iā€™m not 100% sure and without error message itā€™s hard to tell.

Just for those following, dear @LukasReschke promised to update the new updater to enable upgrading Nextcloud 9 to Nextcloud 10 some time this or next week :wink:

Of course help is welcomeā€¦ You know where the code is!

1 Like

IĀ“m running nextCloud 9.0.50 on a shared hosting (all-inkl) and IĀ“m not able to update to a newer version. Even the config.php-Hack (update.server.urlā€¦) won`t help. I only see this:

I tested all suggestions in this topic, but nothing works. Any ideas?
Otherwise I manual update nextcloud.

Unless the new updater app is tested and released, you should run manual updates on productive systems. Test the upgrader script only on test systems or if you can easily restore your backup.

Donā€™t panic - I backup my systems frequently and only do tests with an existing - and working - backup.

So just to let you knowā€¦

Following the guide on https://hagen.cocoate.com/2016/08/26/update-nextcloud-version-9-53-10-0/ (twittered by Nextclouders) gives me an error that nextcloud/data/ can not be accessed on my synology. Giving access to all users ends in an error that said rights should be 770. Fixing permissions/ownership within the Synology DSM let start up the updater and shot my data to the moon. The installation is not reachable anymore.

So updating Nextcloud is not better than updating owncloud was.

Trust in Nextcloud from now on: 0%.

Sounds like a permission problem. The folders should belong to the user who runs the php process. No idea what that would be on Synology. Can you open a new topic for that?

Hi shad,
donā€™t be so cruel. For the update/upgrade from Nextcloud 9.53 to 10.0 it is probably the last time that the old update method from former owncloud days needs to be used. And be honest, if you read any tutorial about any update/upgrade process on this planet the first sentence is usually: ā€œcreate a backup of your dataā€.
Have you fixed your installation in the meantime?

This is the transition time between still using the old, broken updater, and the new, still unreleased beta updater. The devs have been very, very clear about this, I mean the topic of this thread is ā€œtest our new work in progress upgraderā€. If you want reliability, then I suggest you wait for the stable release of the updater rather than trying a work in progress script and being surprised when it isnā€™t yet bug free (thatā€™s what the testing is needed for)

I donā€™t think your data is gone. To help you, please answer the following questions:

  1. where is the Nextcloud data folder and the Nextcloud web root?
  2. if the data folder is in the Nextcloud web root, are you sure you didnā€™t remove it? For me looks like you wanted to remove the old Nextcloud files, but you accidentally removed the data folder. (This can simple be done by rm -rf nextclour or rm -rf /var/www)
  3. what is the permission of the data directory? What is the user and group?
  4. what do you mean with ā€œthe installation is not reachableā€, do you get an error, a white page, a synology error? etc

If you didnā€™t removed your data yourself (which can be done very easily) I think your data isnā€™t gone.

Can a moderator move these posts to a new thread? Thanks!

Since you answered earlier in this topic, did you use the script provided in this topic? This script isnā€™t ready for the upgrade from NC 9.0.53 to NC 10.

This worked for me for an update to 9.0.52. It should also work for 10 at least if you do it manually.

`#!/bin/bash

chown -R http:http /volume1/web/owncloud/
chown -R http:http /volume1/web/owncloud/apps/
chown -R http:http /volume1/web/owncloud/config/
chown -R http:http /volume1/web/owncloud/themes/
chown -R http:http /volume1/owncloud/

chown http:http /volume1/web/owncloud/.htaccess

find /volume1/web/owncloud/ -type f -print0 | xargs -0 chmod 777

find /volume1/web/owncloud/ -type d -print0 | xargs -0 chmod 777
find /volume1/owncloud/ -type d -print0 | xargs -0 chmod 777

chmod 777 /volume1/web/owncloud/.htaccess`

You shouldnā€™t grant everybody access to your files even if you are alone on your system. The docs normally suggest that you use chmod 640 for files and 750 for folders.

As I said this is only for the updateā€¦
This is the script that is mentioned in the official documentation and is also used in several tutorials and blog posts.

I had (to be more exact still have) a backup but when I restored it and entered the nextcloud adress there was the updater again and - of course - it failed the second time. DonĀ“t know why because there should have been the old installation instead of an updater.

In hope that there will be a better update procedure after version 10 I will now use a brand new installation. The biggest fail by doing so is the fact that I have to search all documents together again. This is because I used the encryption. So my files may still be in the backuped installation but I donĀ“t think that I can decrypt them again in another installation or am I wrong (I used the same user/pw in the new installation)?

That is strange. Can you check the version of your backup? I suspect that the nextcloud code is already from a newer version, so you should delete everything except config/ and data/-folder and place the code of the version indicated in your config/config.php.

Hi,

as I understand this script should be able to do an owncloud - nextcloud upgrade.

On OC 9.0.2 I installed the updater script (got it just now from github) and added the updater server to the config file. In the admin section, switched channels from stable to daily and back, then ran the updater.

It says:

Initializing
Current version is 9.0.2.
No update available.

It seems to me that it doesnā€™t contact the correct update server and returns the latest OC version (or the current?).

Donā€™t think this is expected behavior - or is it? Can I use it to migrate to NC?

  • Sebastian

Used this script to upgrade from OC 9.02 to NC 9.0.53, today; will continue to 10 if possible.
Currently, I get stuck with the upgrade from NC 9.0.53 to 9.1
The apache error says:

PHP Fatal error: Uncaught Symfony\Component\Process\Exception\ProcessFailedException: The command ā€œphp /var/www/owncloud/occ --no-warnings config:list --private --output ā€œjsonā€ā€ failed.\nExit Code: 1(General error)\n\nOutput:\n================\nCould not open input file: /var/www/owncloud/occ\n\n\nError Output:\n================\n in /var/www/owncloud/updater/src/Utils/OccRunner.php:50\nStack trace:\n#0 /var/www/owncloud/updater/src/Utils/OccRunner.php(56): Owncloud\Updater\Utils\OccRunner->run(ā€˜config:list --pā€¦ā€™)\n#1 /var/www/owncloud/updater/src/Utils/ConfigReader.php(106): Owncloud\Updater\Utils\OccRunner->runJson(ā€˜config:list --pā€¦ā€™)\n#2 /var/www/owncloud/updater/src/Utils/ConfigReader.php(50): Owncloud\Updater\Utils\ConfigReader->load()\n#3 /var/www/owncloud/updater/src/Controller/IndexController.php(96): Owncloud\Updater\Utils\ConfigReader->init()\n#4 /var/www/owncloud/updater/src/Controller/IndexController.php(70): Owncloud\Updater\Controller\IndexController->isLoggedIn()\n#5 /var/www/owncloud/updater/index.php(28): Owncloud\Update in /var/www/owncloud/updater/src/Utils/OccRunner.php on line 50

Copied data from checkpoint back to where they were, retrying the same. Could only fix this by reverting to checkpoint and applying the manual update which went smooth.

@joergschulz The error message indicates, that the code of the shipped updater (based on the ownCloud one) is used. We disabled it, because it is broken. Could you verify that you downloaded this file and placed it to updater/index.php:

https://raw.githubusercontent.com/nextcloud/updater/add-simplified-updater/index.php