Update to OC 10.4.1 failed

Hello,

Yesterday I tried to update to 10.4.1 from web admin interface, but the update has failed.
Linux nuc 4.19.0-9-amd64 #1 SMP Debian 4.19.118-2+deb10u1 (2020-06-07) x86_64 GNU/Linux
Debian 10 buster

Here is log from my /var/www/owncloud/iscsi_data folder (replaces a data folder in my installation):

[info] Execution of upgrade:detect command started
[info] ownCloud 10.3.2.2 found
[info] Execution of upgrade:detect command stopped. Exit code is 0
[info] Execution of upgrade:checkSystem command started
[info] Execution of upgrade:checkSystem command stopped. Exit code is 2
[info] Execution of upgrade:detect command started
[info] ownCloud 10.3.2.2 found
[info] Execution of upgrade:detect command stopped. Exit code is 0
[info] Execution of upgrade:checkSystem command started
[info] Execution of upgrade:checkSystem command stopped. Exit code is 2
[info] Execution of upgrade:detect command started
[info] ownCloud 10.3.2.2 found
[info] Execution of upgrade:detect command stopped. Exit code is 0
[info] Execution of upgrade:checkSystem command started
[info] Execution of upgrade:checkSystem command stopped. Exit code is 2
[info] Execution of upgrade:detect command started
[info] ownCloud 10.3.2.2 found
[info] Execution of upgrade:detect command stopped. Exit code is 0
[info] Execution of upgrade:checkSystem command started
[info] Execution of upgrade:checkSystem command stopped. Exit code is 0
[info] Execution of upgrade:checkpoint command started
[info] Execution of upgrade:checkpoint command stopped. Exit code is 0
[info] Execution of upgrade:detect command started
[info] ownCloud 10.3.2.2 found
[info] Execution of upgrade:detect command stopped. Exit code is 0
[info] Execution of upgrade:executeCoreUpgradeScripts command started
[debug] Replacing 3rdparty
[debug] Replacing config
[debug] Replacing core
[debug] Replacing l10n
[debug] Replacing lib
[debug] Replacing ocm-provider
[debug] Replacing ocs
[debug] Replacing ocs-provider
[debug] Replacing resources
[debug] Replacing settings
[debug] Replacing .htaccess
[debug] Replacing .mailmap
[debug] Replacing .tag
[debug] Replacing .user.ini
[debug] Replacing AUTHORS
[debug] Replacing CHANGELOG.md
[debug] Replacing console.php
[debug] Replacing COPYING
[debug] Replacing cron.php
[debug] Replacing db_structure.xml
[debug] Replacing index.html
[debug] Replacing index.php
[debug] Replacing indie.json
[debug] Replacing occ
[debug] Replacing public.php
[debug] Replacing remote.php
[debug] Replacing robots.txt
[debug] Replacing status.php
[debug] Replacing version.php
[debug] Replacing README.md
[info] Execution of upgrade:executeCoreUpgradeScripts command stopped. Exit code is 0
[info] Execution of upgrade:executeCoreUpgradeScripts command started
[debug] Replacing 3rdparty
[debug] Replacing config
[debug] Replacing core
[debug] Replacing l10n
[debug] Replacing lib
[debug] Replacing ocm-provider
[debug] Replacing ocs
[debug] Replacing ocs-provider
[debug] Replacing resources
[debug] Replacing settings
[debug] Replacing .htaccess
[debug] Replacing .mailmap
[debug] Replacing .tag
[debug] Replacing .user.ini
[debug] Replacing AUTHORS
[debug] Replacing CHANGELOG.md
[debug] Replacing console.php
[debug] Replacing COPYING
[debug] Replacing cron.php
[debug] Replacing db_structure.xml
[debug] Replacing index.html
[debug] Replacing index.php
[debug] Replacing indie.json
[debug] Replacing occ
[debug] Replacing public.php
[debug] Replacing remote.php
[debug] Replacing robots.txt
[debug] Replacing status.php
[debug] Replacing version.php
[debug] Replacing README.md
[info] Execution of upgrade:executeCoreUpgradeScripts command stopped. Exit code is 0
[info] Execution of upgrade:restartWebServer command started
[info] Execution of upgrade:restartWebServer command stopped. Exit code is 0
[info] Execution of upgrade:postUpgradeCleanup command started
[debug] Moving updater/app
[debug] Moving updater/application.php
[debug] Moving updater/box.json
[debug] Moving updater/composer.json
[debug] Moving updater/composer.lock
[debug] Moving updater/CHANGELOG.md
[debug] Moving updater/CONTRIBUTING.md
[debug] Moving updater/COPYING-AGPL
[debug] Moving updater/index.php
[debug] Moving updater/pub
[debug] Moving updater/src
[debug] Moving updater/vendor
[debug] Moving updater/README.md
[debug] Moving updater/.travis.yml
[debug] Moving updater/.scrutinizer.yml
[debug] Moving updater/nbproject
[error] Integrity check failed
[error]
In OccRunner.php line 164:

[Symfony\Component\Process\Exception\ProcessFailedException]
The command “php /var/www/owncloud/occ --no-warnings integrity:check-core”
failed.

Exit Code: 1(General error)

Working directory: /var/www/owncloud/updater

Output:

- files_trashbin:
  - EXTRA_FILE:
    - lib/TrashExpiryManager.php:
      - expected:
      - current: 1523ba686255434d93b960029989853ce239102aaa8bcae502267f50

205976a678e3612d51d13764d3341f0a04e654d883b16810230d50df0a1f7f6e06ea47ee
- files_sharing:
- EXTRA_FILE:
- lib/Controller/RemoteOcsController.php:
- expected:
- current: b6b7974c10de211b3f87708d6bd50f9d0743164394421d0270f3476a
423db7c92a80dbc0a69bd1a14b7a025d2ada1c2556cad47fdec79d3b84931c38b47f303e
- dav:
- EXTRA_FILE:
- lib/Connector/Sabre/PublicDavLocksPlugin.php:
- expected:
- current: b09051dc54f7ea0651c1d7ee66a386b7cff9dc66dd834268df46a21d
35562ba6d8b6723b39099c293e00effb1a52fc53967e79f073a1ee5eb765d89c2b4c763e
- files:
- EXTRA_FILE:
- lib/Command/CheckCache.php:
- expected:
- current: 8ecbe361148c80fd3b431318fdd917f22199e6f48f86a55e5ac10831
383a4d2c90ffaa4497e2df40fbb6b40d00875317d8b3d3691cd9591f7f91eddf31c8279a

Error Output:

Exception trace:
at /var/www/owncloud/updater/src/Utils/OccRunner.php:164
Owncloud\Updater\Utils\OccRunner->runAsProcess() at /var/www/owncloud/updater/src/Utils/OccRunner.php:82
Owncloud\Updater\Utils\OccRunner->run() at /var/www/owncloud/updater/src/Command/PostUpgradeCleanupComma
nd.php:71
Owncloud\Updater\Command\PostUpgradeCleanupCommand->execute() at /var/www/owncloud/updater/vendor/symfon
y/console/Command/Command.php:255
Symfony\Component\Console\Command\Command->run() at /var/www/owncloud/updater/vendor/symfony/console/App
lication.php:982
Symfony\Component\Console\Application->doRunCommand() at /var/www/owncloud/updater/src/Console/Applicati
on.php:227
Owncloud\Updater\Console\Application->doRunCommand() at /var/www/owncloud/updater/vendor/symfony/console
/Application.php:255
Symfony\Component\Console\Application->doRun() at /var/www/owncloud/updater/src/Console/Application.php:
207
Owncloud\Updater\Console\Application->doRun() at /var/www/owncloud/updater/vendor/symfony/console/Applic
ation.php:148
Symfony\Component\Console\Application->run() at /var/www/owncloud/updater/src/Controller/IndexController
.php:180
Owncloud\Updater\Controller\IndexController->ajaxAction() at /var/www/owncloud/updater/src/Controller/In
dexController.php:118
Owncloud\Updater\Controller\IndexController->dispatch() at /var/www/owncloud/updater/index.php:29

upgrade:postUpgradeCleanup

[info] Execution of upgrade:postUpgradeCleanup command stopped. Exit code is 0

Made a stupid beginner mistake - didn’t backup my data and database :frowning:
Is there any way how to recover the installation, please?

Any ideas appreciated.

First, make a backup now, then we can be sure that we don’t make the situation worse.

I haven’t ever used the updater, so I have no clue how it works. But reading the error message gives me hope:

So that sounds to me the upgrade has already run, was successfull, but for some reason it wasn’t able to run the cleanup properly.

What you can try is (you will need to log in as root):

  1. Move your old owncloud installation folder out of the way.
  2. Download and unpack the 10.4.1 release in /var/www/. This will create a new, clean owncloud folder.
  3. Copy your *config.php files in the config of your old broken installation into the new one.
  4. Make sure you have the same permissions on all files as in the previous installation. A little trick:
chmod -R --ref /var/www/owncloud-old /var/www/owncloud
chown -R --ref /var/www/owncloud-old /var/www/owncloud
# with --ref /path/to/some/file/or/folder the permissions and ownership of the reference will be applied to your folder 
  1. You will also have to double check inside your owncloud folder as for example the folder apps might have slightly different permissions
  2. check whether you can run occ status or if it shows an error message. If it does post it here, it will tell us more about the problems. You might have to rerun occ upgrade or turn off the maintenance mode occ ma:mo --off (or both)
1 Like

Thanks a lot for reply mate :slight_smile:

I’ll try that soon. But… I am not sure about the ownership - I’ve changed it to www-data to be sure that all the components and data files are readable to the web server process.
I’ll try that anyway and let know the results.

Hello mate,

thanks a lot for helping me.
Probably there was an error in the permissions - I’ve tried what you suggested and OC works properly now :+1:
Now I have to improve my backups :slight_smile: to be sure I can go back any time I need.

2 Likes