Nextcloud version: 13.0.5.2
Operating system and version: Ubuntu 18.04
Apache or nginx version: (using snap image)
PHP version: (using snap image)
The issue you are facing:
Yesterday I setup an external WebDAV storage on my nextcloud instance. It holds much more storage capacity than my Nextcloud instance itself so I decided to move my ~15GB of pictures onto the external storage ‘folder’ that Nextcloud had created.
To see if things worked as expected I started by moving a small folder with roughly 500MB worth of pictures to the external storage. This took some time, as expected, but worked perfectly. I could see that the folder had been ‘removed’ from my Nextcloud storage and appeared as expected in the external storage. File size and everything was correct.
Then I started to move over the ~15GB worth of files to the external storage. I let it do it’s thing and after a while I could see all the pictures were now on the external storage. But this is where things get weird. The folder in my Nextcloud instance that held the images appeared to still be there, unchanged (unmoved).
However, when I SSH-ed into the server I found that the images were in fact gone. Trying to download any image in the web interface resulted in a 404. I found out that I had the option to use the nextcloud.occ files:scan --all
command to trigger a rescan. And sure enough, that made everything work as intended again, I could now see the image folder only in the external storage and no longer on the Nextcloud instance.
Another bug that I encountered was when I almost deleted the ~15GB worth of images. So I was at the point where I thought that the move had failed because the Nextcloud folder still held the images in it. What I did was I deleted the pictures on the external storage to retry the move operation.
However, to my shock, during this time I found out that the pictures were also no longer in the Nextcloud instance when SSH-ing into the machine. Freaking out over the fact that I at this moment was deleting nearly 5 years worth of pictures I immediately rebooted my server to stop the process.
When I checked the external storage it seemed like nothing had been deleted. So I started an experiment where I copied a file on the external storage and then deleted it. And lo-and-behold the nextcloud log was spammed with errors (shared below). However the file did get deleted in the end.
TL;DR:
- Moving large folders to external storage causes Nextcloud to not update the ‘current’ state of files.
- Deleting files on external storage causes errors but deletes the file nonetheless.
Is this the first time you’ve seen this error?: Yes
Steps to replicate it:
- Hook up a WebDAV external storage
- Move over a large amount of files (not sure on size, ~15GB worked for me) to the external storage
- Look at the Nextcloud folder that had the files in it. They should still be there.
The output of your Nextcloud log in Admin > Logging:
Link to the JSON. Note that these errors are for 1 file being deleted, and were repeated at least 50 times during the operation.
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
<?php
$CONFIG = array (
'apps_paths' =>
array (
0 =>
array (
'path' => '/snap/nextcloud/current/htdocs/apps',
'url' => '/apps',
'writable' => false,
),
1 =>
array (
'path' => '/var/snap/nextcloud/current/nextcloud/extra-apps',
'url' => '/extra-apps',
'writable' => true,
),
),
'supportedDatabases' =>
array (
0 => 'mysql',
),
'memcache.locking' => '\\OC\\Memcache\\Redis',
'memcache.local' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
'host' => '/tmp/sockets/redis.sock',
'port' => 0,
),
'passwordsalt' => 'REDACTED',
'secret' => 'REDACTED',
'trusted_domains' =>
array (
0 => 'localhost',
1 => 'nextcloud.homs.codes',
),
'datadirectory' => '/var/snap/nextcloud/common/nextcloud/data',
'overwrite.cli.url' => 'http://localhost',
'dbtype' => 'mysql',
'version' => '13.0.5.2',
'dbname' => 'nextcloud',
'dbhost' => 'localhost:/tmp/sockets/mysql.sock',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'nextcloud',
'dbpassword' => 'REDACTED',
'installed' => true,
'instanceid' => 'ocdcds1ms1mu',
'mail_from_address' => 'REDACTED',
'mail_smtpmode' => 'php',
'mail_smtpauthtype' => 'LOGIN',
'mail_domain' => 'REDACTED',
);
The output of your Apache/nginx/system log in /var/log/____
:
No logs were appended for Apache/systemlog during any of the operations.