I am trying to upgrade from 28.0.3 to 28.0.5 (and further on to 29), but the command-line updater fails as follows:
# sudo -u wwwrun /usr/bin/php /data/ownCloud/updater/updater.phar --no-interaction
Nextcloud Updater - version: v28.0.2rc2-1-gba2e50f dirty
Current version is 28.0.3.
Update to Nextcloud 28.0.5 available. (channel: "stable")
Following file will be downloaded automatically: https://download.nextcloud.com/server/releases/nextcloud-28.0.5.zip
Open changelog ↗
Updater run in non-interactive mode.
Start update
Info: Pressing Ctrl-C will finish the currently running step and then stops the updater.
[✔] Check for expected files
[✔] Check for write permissions
[✘] Create backup failed
Could not copy "/data/ownCloud/composer.lock" to "/data/ownCloud/data/updater-oc06twnzrsh4/backups/nextcloud-28.0.3.2-1714549902/composer.lock"
Update failed. To resume or retry just execute the updater again.
Needless to say that “executing the updater again” does not help. Usually, problems like this are due to file permission issues. However, this seems not to be the case here.
The Nextcloud updater creates the backup directory hierarchy /data/updater-oc06twnzrsh4/backups/nextcloud-28.0.3.2-1714549902 successfully as well as the target file composer.lock within that directory. However, that file has a size of zero.
As the wwwrun user, I was able to copy /data/ownCloud/composer.lock to /data/ownCloud/data/updater-oc06twnzrsh4/backups/nextcloud-28.0.3.2-1714549902/composer.lock without problems and with the destination file having the same contents as the source file.
Here’s the relevant portion of the updater.log:
2024-05-01T07:51:42+0000 tPg8PQWvoI [info] end of checkForUpdate() Update to Nextcloud 28.0.5 available. (channel: "stable")<br /><span class="light">Following file will be downloaded automatically:</span> <code class="light">https://download.nextcloud.com/server/releases/nextcloud-28.0.5.zip</code><br /><a class="external_link" href="https://nextcloud.com/changelog/#28-0-5" target="_blank" rel="noreferrer noopener">Open changelog ↗</a>
2024-05-01T07:51:42+0000 tPg8PQWvoI [info] updater run in non-interactive mode
2024-05-01T07:51:42+0000 tPg8PQWvoI [info] updater started
2024-05-01T07:51:42+0000 tPg8PQWvoI [info] executeStep request for step "1"
2024-05-01T07:51:42+0000 tPg8PQWvoI [info] startStep("1")
2024-05-01T07:51:42+0000 tPg8PQWvoI [info] checkForExpectedFilesAndFolders()
2024-05-01T07:51:42+0000 tPg8PQWvoI [info] end of checkForExpectedFilesAndFolders()
2024-05-01T07:51:42+0000 tPg8PQWvoI [info] endStep("1")
2024-05-01T07:51:42+0000 tPg8PQWvoI [info] executeStep request for step "2"
2024-05-01T07:51:42+0000 tPg8PQWvoI [info] startStep("2")
2024-05-01T07:51:42+0000 tPg8PQWvoI [info] checkWritePermissions()
2024-05-01T07:51:42+0000 tPg8PQWvoI [info] end of checkWritePermissions()
2024-05-01T07:51:42+0000 tPg8PQWvoI [info] endStep("2")
2024-05-01T07:51:42+0000 tPg8PQWvoI [info] executeStep request for step "3"
2024-05-01T07:51:42+0000 tPg8PQWvoI [info] startStep("3")
2024-05-01T07:51:42+0000 tPg8PQWvoI [info] createBackup()
2024-05-01T07:51:42+0000 tPg8PQWvoI [info] backup folder location: /data/ownCloud/data/updater-oc06twnzrsh4/backups/nextcloud-28.0.3.2-1714549902/
2024-05-01T07:51:42+0000 tPg8PQWvoI [error] executeStep request failed with other exception
2024-05-01T07:51:42+0000 tPg8PQWvoI [error] Exception: Exception
Message: Could not copy "/data/ownCloud/composer.lock" to "/data/ownCloud/data/updater-oc06twnzrsh4/backups/nextcloud-28.0.3.2-1714549902/composer.lock"
Code:0
Trace:
#0 phar:///data/ownCloud/updater/updater.phar/lib/UpdateCommand.php(374): NC\Updater\Updater->createBackup()
#1 phar:///data/ownCloud/updater/updater.phar/lib/UpdateCommand.php(237): NC\Updater\UpdateCommand->executeStep()
#2 phar:///data/ownCloud/updater/updater.phar/vendor/symfony/console/Command/Command.php(255): NC\Updater\UpdateCommand->execute()
#3 phar:///data/ownCloud/updater/updater.phar/vendor/symfony/console/Application.php(1021): Symfony\Component\Console\Command\Command->run()
#4 phar:///data/ownCloud/updater/updater.phar/vendor/symfony/console/Application.php(275): Symfony\Component\Console\Application->doRunCommand()
#5 phar:///data/ownCloud/updater/updater.phar/vendor/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun()
#6 phar:///data/ownCloud/updater/updater.phar/updater.php(10): Symfony\Component\Console\Application->run()
#7 /data/ownCloud/updater/updater.phar(14): require('...')
#8 {main}
File:phar:///data/ownCloud/updater/updater.phar/lib/Updater.php
Line:456
2024-05-01T07:51:42+0000 tPg8PQWvoI [info] rollbackChanges("3")
2024-05-01T07:51:42+0000 tPg8PQWvoI [info] unlink .step
2024-05-01T07:51:42+0000 tPg8PQWvoI [info] end of rollbackChanges()