NextCloud Update to 27.1.9 fails - create backup failed

I’m trying to update NextCloud 27.1.6 to 27.1.9 via the CLI and it keeps failing during the create backup stage. This is the error message:

[ ] Create backup 
...PHP Notice:  copy(): Write of 341657 bytes failed with errno=14 Bad address in phar:///var/www/nextcloud/updater/updater.phar/lib/Updater.php on line 412
[✘] Create backup failed
Could not copy "/var/www/nextcloud/core/doc/user/_images/video_player_2.png" to "/mnt/dietpi_userdata/nextcloud_data/updater-ocz841ahprkg/backups/nextcloud-27.1.6.2-1715628150/core/doc/user/_images/video_player_2.png"

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

One of my first thoughts is that this is related to the ownership or permission of either the /var/www/nextcloud source folder or the destination folder /mnt/dietpi_userdata/nextcloud_data for the backup process.

I can use the file manager in Webmin to view and edit these folder attributes, but am not clear if that’s the issue. What should the ownership and permissions be of these two folders?

Any suggestions on further troubleshooting?

thanks!

Creating a bug report/issue

I have searched the existing open and closed issues

Required Information

  • DietPi version | 9.4.2
  • Distro version | Native PC (x86_64)
  • Kernel version | Linux DietPi 6.1.0-21-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.90-1 (2024-05-03) x86_64 GNU/Linux
  • Architecture | amd64
  • SBC model | Native PC (x86_64)
  • Power supply used | (EG: 5V 1A RAVpower)
  • SD card used | Internal HDD in mini PC

Additional Information (if applicable)

  • Software title | (EG: Nextcloud)
  • Was the software title installed freshly or updated/migrated?
  • Can this issue be replicated on a fresh installation of DietPi?
    ← If you sent a “dietpi-bugreport”, please paste the ID here →
  • Bug report ID | echo $G_HW_UUID

Steps to reproduce

Expected behaviour

Actual behaviour

Extra details

Problem solved – two png image files that are likely part of the Nextcloud GUI were corrupted (integrity issue?) and were hanging the back-up step of the Nextcloud point upgrade. I replaced them with copies from an older Nextcloud backup from a prior upgrade.

More details:

  1. File permissions appeared fine.
    The permissions and ownership of the source and destination folders appeared fine.

  2. Suspect files showed no hash results – integrity issues?
    Nextcloud appears to keep a copy of specific NC system files after an upgrade at /mnt/dietpi_userdata/nextcloud_data/update-[version number and time stamp]. This is where I found old copies of the two suspect png files and compared them to the newer files at /var/www/nextcloud/core/doc/user/_images/. Using the File Manager in Webmin, I noticed the suspect files in /var/www/ didn’t show any hash results when viewing their Properties. This led me to believe their was an integrity issues with these two files.

  3. Similar r/w errors when moving user data to external USB.
    I saw similar read/write errors on several user_data files when changing the location of the dietpi user_data from an internal HDD to an external USB. The script within the Dietpi_Drive_Manager to move the user_data caused the same errors on the same few files every time., which prevented me from using the external drive for user_data storage.
    I had successfully done this in the past, but maybe the user_data location was reset when I upgraded to Debian Bookworm circa October 2023.
    I had to delete the user_data files that were causing errors in order for the move to complete successfully so I could use the external USB for the user_data.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.