After moving the data to a new hard disk, Nextcloud does not upgrade

Creating a bug report/issue

Required Information


  • Distro version | Bulleye 0

  • Kernel version |Linux 5.15.32-v8+ #1538 SMP PREEMPT Thu Mar 31 19:40:39 BST 2022 aarch64 GNU/Linux

  • SBC model | RPi 4 Model B (aarch64)

  • Power supply used | (EG: 5V 1A RAVpower)

  • SD card used | SanDisk ultra

Additional Information (if applicable)

  • Software title | NEXTCLOUD
  • Was the software title installed freshly or updated/migrated?UPDATED
    ← If you sent a “dietpi-bugreport”, please paste the ID here →
  • Bug report ID | echo $G_HW_UUID

Steps to reproduce

  1. …Mount my New SSD 1 TB
  2. …Move Dietpi User Data to new SSD with "DietPi -Drive_Manager – Userdata &Swap options

Expected behaviour

  • …all my files moved correctly

Actual behaviour

Notification in Nextcloud "Current version is 24.0.1.

Update to Nextcloud 24.0.2 available. (channel: “stable”)"

  • Open Web updater — Start Update …

                                    ERROR in * ## Check for expected files
                                    The following extra files have been found:
                                    * nextcloud_data


Did you have the old drive attached still? How does it behaves if you remove it.

The old hard disk was already unmounted . I have physically disconnected it… but the error persists…
Everything else works perfectly…


Hmm the error message sounds like there is a /var/www/nextcloud/nextcloud_data, is that true?

ls -l /mnt/dietpi_userdata correctly points to the mount point of the external drive and contains nextcloud_data, and /var/www/nextcloud/config.php contains /mnt/dietpi_userdata/nextcloud_data as data location?

The error is when launch Nwextcloud update with web client.
Execute ls -l /mnt/dietpi_userdata rwxrwxrwx 1 root root 57 jun 23 08:04 /mnt/dietpi_userdata → /mnt/07c7e3b7-0b30-4d52-bbf3-85af1233875d/dietpi_userdata

And config.php is in var/www/nextcloud/config/ no in /var/www/nextcloud/ .
in config.php :
‘datadirectory’ => ‘/mnt/dietpi_userdata/nextcloud_data’,
Is all correct?


hmm, you could try to search the folder.

find / -name "nextcloud_data"
# find / -name "nextcloud_data"
find: ‘/proc/187390’: File or directory does not exist



excluding the backup folder is showing 3 times extcloud_data folder

  1. /root/nextcloud_data
  2. /mnt/07c7e3b7-0b30-4d52-bbf3-85af1233875d/dietpi_userdata/nextcloud_data
  3. /var/www/nextcloud/nextcloud_data

So I have to delete 2 folder?

Thanks !

have a look to the folder #1 and #3. It would be quite interesting what the content is. Personally I guyss the folder located in /var/www/nextcloud/ is creating the issues.

I just looked 1. /root/nextcloud_data
3. /var/www/nextcloud/nextcloud_data

and both are SYMLINKS…


Is true!.. i changed name of 3. /var/www/nextcloud/nextcloud_data to : old_nextcloud_data

and now , the error in webupdate of Nextcloud:

                       Check for expected files
                      The following extra files have been found:
                     .  Old_nextcloud_data

When execute ```
-xtype l
in var/www/nextcloud , the result is ./Old_nextcloud_data…
then the Symlink is broken…

I guess the symlink within /var/www/nextcloud/ should not be there.

So when I moved Dietpi user Data to a new ssd with Dietpi-Drive , the symlink to nextcloud_data did not move?
How move this symlink in right Path?


Can you check /var/www/nextcloud/config/config.php which data location is configured there?

EDIT: Ah sorry, you posted it above already. So if /var/www/nextcloud/nextcloud_data and /root/nextcloud_data are both symlink only, you can remove both. /mnt/dietpi_userdata/nextcloud_data is the only important directory which must contain the actual data then, respectively point to /mnt/<external_drive>/dietpi_userdata/nextcloud_data after you moved them to the external drive. No need to change the location in config.php as the old dir is symlinked to the new one automatically by dietpi-drive_manager.

Yes, after delete this Symlink … Nextcloud update perfectly!

Thanks guys!!
You are the best!!!

did you recall if how this link was created? usually it’s not needed nor created by our installer.

I think so, I used Dietpi-drive_Manager to copy the data to the new SSD but did not disconnect the old hard drive afterwards. Then Nextcloud still signaled me the lack of space (that’s why I had to put a new hard disk).
Then I looked in the Nextcloud documentation for the instructions to migrate the data to a new storage unit and they indicate that after copying the data , you have to give permissions on the new folders and… create the symbolic links… and… so I did believing to fix the error.
Everything was fine until I had to update Nextcloud.
So…we can say that it all started by not removing the old hard drive after copying the data to the new one.
Your first advice was valid but I knew it too late.

Thanks for everything!!!

1 Like