Skip to content

[Bug]: backup fails during upgrade, copy() function called wrong #59248

@Szwendacz99

Description

@Szwendacz99

⚠️ This issue respects the following points: ⚠️

Bug description

I am trying to upgrade via command php updater/updater.phar from 32.0.6 to 32.0.7.
It fails on backup:

 php updater/updater.phar 
Nextcloud Updater - version: v32.0.2-1-g59d8255 dirty

[27-Mar-2026 10:10:29 UTC] PHP Warning:  Trying to access array offset on false in phar:///nextcloud/updater/updater.phar/lib/UpdateCommand.php on line 97
[27-Mar-2026 10:10:29 UTC] PHP Warning:  Trying to access array offset on false in phar:///nextcloud/updater/updater.phar/lib/UpdateCommand.php on line 97
Current version is 32.0.6.

Update to Nextcloud 32.0.7 available. (channel: "stable")
Following file will be downloaded automatically: https://github.com/nextcloud-releases/server/releases/download/v32.0.7/nextcloud-32.0.7.zip
Open changelog ↗

Steps that will be executed:
[ ] Check for expected files
[ ] Check for write permissions
[ ] Create backup
[ ] Downloading
[ ] Verify integrity
[ ] Extracting
[ ] Enable maintenance mode
[ ] Replace entry points
[ ] Delete old files
[ ] Move new files in place
[ ] Done

Start update? [y/N] y

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 ...[27-Mar-2026 10:10:31 UTC] PHP Warning:  copy(): The second argument to copy() function cannot be a directory in phar:///nextcloud/updater/updater.phar/lib/Updater.php on line 447
[✘] Create backup failed
Could not copy "/nextcloud/3rdparty/nextcloud/lognormalizer/COPYING" to "/nextcloud/data/updater-oc4pb0djdhh0/backups/nextcloud-32.0.6.1-1774606231//3rdparty"

Update failed. To resume or retry just execute the updater again.

Steps to reproduce

  1. have nc version 32.0.6
  2. Try upgrading to version 32.0.7 via php cli
  3. upgrade fails on backup step with error as above

Expected behavior

upgrade finishes

Nextcloud Server version

32

Operating system

Other

PHP engine version

PHP 8.4

Web server

Apache (supported)

Database engine version

PostgreSQL

Is this bug present after an update or on a fresh install?

Upgraded to a MAJOR version (ex. 31 to 32)

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

List of activated Apps

Nextcloud Signing status

Nextcloud Logs

Additional info

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    0. Needs triagePending check for reproducibility or if it fits our roadmap32-feedbackbug

    Type

    Projects

    Status

    To triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions