Test our new work-in-progress upgrader script

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

I am pretty sure I used the NC updater. During entry of conf.php password, the NextCloud logo has been displayed. config.php pointed to Nextcloud. I have seen the same on my test environment where OC components had been deleted the time I switched from OC to NC.
So, we have to look for another reason.

I can try to reset my test to the state of last week and retry the update if I have the time to do it tonight. Necessary? Prod, I wont reset :wink:

So you replaced the file? Only then our new upgrader script is used. Because the called code is only in the shipped version of the updater/ folder (which is the ownCloud one :frowning: ).

Sorry for this.

Update worked for me today after removing /assets empty folder and doing chown -R www-data:www-data . in Nextcloud folder (I had permission error with no details about folders with errors).

Updated from 9.1.0.16 (10.0 beta) to 10.0.1 RC1.

After update, update script page still proposes to Continue update:

After I already used the updater to go from 9.0.51 to 9.0.52, I failed to upgrade tot 9.0.53 today:

[Exception] Unable to copy /var/lib/owncloud/data//updater-data/_oc_upgrade/9.0.52.0/config/config.php to /var/www/nextcloud/config/config.php

The directory /var/www/nextcloud/config doesnā€™t exist, but /var/www/nextcloud/, owned by www-data:www-data and containig folders apps, themes and updater does.

Notably there wasnā€™t any rollback so Iā€™m stranded with an broken Nextcloud, but will try to revert back using the checkpoint manually. This worked: cp -ar checkpoint/9.0.52.0-57de9fc2ab719/core/. /var/www/nextcloud

Thanks for this feedback. This is know - the .step file is not yet deleted. You can do this manually: remove the file in data/updater-INSTANCEID/.step

Our updater script doesnā€™t do checkpoints but simply places the saved code into backups - this therefore looks like you used the old updater and not our new updater script in here. This updater script needs to be placed manually in the folder updater/.

Hi,

Iā€™m trying to upgrade forme ownCloud 8.2.2. to nextCloud 10, on a ā€˜testā€™ server, with the script.

So, Iā€™ve put the script in /updater/index.php ; add the line, 'updater.server.url' => 'https://updates.nextcloud.org/updater_server/',, then got back to my ownCloud admin, choose ā€œDailyā€ for the updating channel. With that, I can start the upgrade process but, the step 3 (replacement), fails and I get this error message : ā€œUnable to move /Library/Server/Web/Data/Sites/cloud.nicolasserver5.lan/_oc-upgrade/100.0.0.0/core/updater to /Library/Server/Web/Data/Sites/cloud.nicolasserver5.lan/updaterā€

However, the access rights are good.

I also wanted to try directly by accessing the script, but how do I generate the updater secret manually?

Thanks for help :slight_smile:

We now ship this new upgrader script in 9.0.54 and 10.0.1. If you want to test this in previous versions use the steps from Help testing the 9.0.54RC1 and 10.0.1RC1

To see if you are in the correct version of the updater check out the two pictures in https://github.com/nextcloud/updater/issues/39#issuecomment-250399443

I will close this ticket here now. Thanks for all your feedback.

@nicojack: try the steps I linked in the first paragraph.

2 Likes